@sellmate/design-system 1.7.2 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/cjs/{sanitize-inline-html-BZCCwH_U.js → sanitize-inline-html-CRCAeQ46.js} +28 -2
  2. package/dist/cjs/sd-callout.cjs.entry.js +2 -2
  3. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
  4. package/dist/cjs/sd-dropdown-button.cjs.entry.js +1 -1
  5. package/dist/cjs/sd-guide.cjs.entry.js +1 -1
  6. package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -2
  7. package/dist/cjs/sd-select_3.cjs.entry.js +3 -3
  8. package/dist/cjs/sd-table.cjs.entry.js +14 -12
  9. package/dist/collection/components/sd-callout/sd-callout.css +2 -2
  10. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +3 -3
  11. package/dist/collection/components/sd-table/sd-table.css +3 -2
  12. package/dist/collection/components/sd-table/sd-table.js +13 -11
  13. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -2
  14. package/dist/collection/utils/html/sanitize-inline-html.js +28 -2
  15. package/dist/components/p-BE4tnQ2Z.js +1 -0
  16. package/dist/components/{p-CwRItc2J.js → p-Bx9dlLbs.js} +1 -1
  17. package/dist/components/p-D7g33VZR.js +1 -0
  18. package/dist/components/{p-ZSGGRCNc.js → p-DKwnEkHE.js} +1 -1
  19. package/dist/components/p-gqfJ-KUj.js +1 -0
  20. package/dist/components/sd-callout.js +1 -1
  21. package/dist/components/sd-confirm-modal.js +1 -1
  22. package/dist/components/sd-dropdown-button.js +1 -1
  23. package/dist/components/sd-guide.js +1 -1
  24. package/dist/components/sd-key-value-table.js +1 -1
  25. package/dist/components/sd-modal-container.js +1 -1
  26. package/dist/components/sd-select-listbox.js +1 -1
  27. package/dist/components/sd-select.js +1 -1
  28. package/dist/components/sd-table.js +1 -1
  29. package/dist/components/sd-tr.js +1 -1
  30. package/dist/design-system/design-system.esm.js +1 -1
  31. package/dist/design-system/{p-c73cadc7.entry.js → p-1632a28d.entry.js} +1 -1
  32. package/dist/design-system/p-25204798.entry.js +1 -0
  33. package/dist/design-system/{p-bd4e5141.entry.js → p-8528ba1e.entry.js} +1 -1
  34. package/dist/design-system/p-BE4tnQ2Z.js +1 -0
  35. package/dist/design-system/{p-969665c0.entry.js → p-aa28712a.entry.js} +1 -1
  36. package/dist/design-system/{p-54086285.entry.js → p-cf685d90.entry.js} +1 -1
  37. package/dist/design-system/{p-78c2fd6d.entry.js → p-db826b91.entry.js} +1 -1
  38. package/dist/design-system/{p-2d3d25bd.entry.js → p-eb18d812.entry.js} +1 -1
  39. package/dist/esm/{sanitize-inline-html-DopVneZA.js → sanitize-inline-html-BE4tnQ2Z.js} +28 -2
  40. package/dist/esm/sd-callout.entry.js +2 -2
  41. package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
  42. package/dist/esm/sd-dropdown-button.entry.js +1 -1
  43. package/dist/esm/sd-guide.entry.js +1 -1
  44. package/dist/esm/sd-pagination_4.entry.js +0 -2
  45. package/dist/esm/sd-select_3.entry.js +3 -3
  46. package/dist/esm/sd-table.entry.js +14 -12
  47. package/hydrate/index.js +46 -20
  48. package/hydrate/index.mjs +46 -20
  49. package/package.json +1 -1
  50. package/dist/components/p-CARYLqH9.js +0 -1
  51. package/dist/components/p-DopVneZA.js +0 -1
  52. package/dist/components/p-_zllPZMm.js +0 -1
  53. package/dist/design-system/p-97b405aa.entry.js +0 -1
  54. package/dist/design-system/p-DopVneZA.js +0 -1
@@ -1,6 +1,13 @@
1
1
  'use strict';
2
2
 
3
- const ALLOWED_INLINE_TAGS = new Set(['B', 'STRONG', 'I', 'EM', 'BR', 'SPAN']);
3
+ const ALLOWED_INLINE_TAGS = new Set(['A', 'B', 'STRONG', 'I', 'EM', 'BR', 'SPAN']);
4
+ // 태그별 허용 속성. 미등록 태그는 COMMON_ALLOWED_ATTRS만 적용
5
+ const ALLOWED_ATTRS_BY_TAG = {
6
+ A: new Set(['href', 'target', 'rel', 'class']),
7
+ };
8
+ const COMMON_ALLOWED_ATTRS = new Set(['class']);
9
+ // javascript:, data: 등 위험 프로토콜 차단 — 상대 URL과 안전한 스킴만 허용
10
+ const SAFE_HREF_RE = /^(https?:|mailto:|tel:|\/|#|\.)/i;
4
11
  const DROP_CONTENT_TAGS = new Set([
5
12
  'SCRIPT',
6
13
  'STYLE',
@@ -39,8 +46,27 @@ const sanitizeNode = (node, doc) => {
39
46
  return;
40
47
  }
41
48
  Array.from(element.childNodes).forEach(child => sanitizeNode(child));
42
- Array.from(element.attributes).forEach(attr => element.removeAttribute(attr.name));
43
49
  if (ALLOWED_INLINE_TAGS.has(tagName)) {
50
+ // React HTML 문자열 호환: className → class 정규화
51
+ if (element.hasAttribute('className')) {
52
+ const val = element.getAttribute('className');
53
+ element.removeAttribute('className');
54
+ if (!element.hasAttribute('class')) {
55
+ element.setAttribute('class', val);
56
+ }
57
+ }
58
+ const allowedAttrs = ALLOWED_ATTRS_BY_TAG[tagName] ?? COMMON_ALLOWED_ATTRS;
59
+ Array.from(element.attributes).forEach(attr => {
60
+ if (!allowedAttrs.has(attr.name)) {
61
+ element.removeAttribute(attr.name);
62
+ }
63
+ });
64
+ if (tagName === 'A') {
65
+ const href = element.getAttribute('href');
66
+ if (href !== null && href !== '' && !SAFE_HREF_RE.test(href)) {
67
+ element.removeAttribute('href');
68
+ }
69
+ }
44
70
  return;
45
71
  }
46
72
  const parent = element.parentNode;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-BGwB03Tk.js');
4
- var sanitizeInlineHtml = require('./sanitize-inline-html-BZCCwH_U.js');
4
+ var sanitizeInlineHtml = require('./sanitize-inline-html-CRCAeQ46.js');
5
5
 
6
6
  const callout$1 = {
7
7
  radius: "8",
@@ -91,7 +91,7 @@ const TYPE_ICON = {
91
91
  danger: 'warningFill',
92
92
  };
93
93
 
94
- const sdCalloutCss = () => `@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}`;
94
+ const sdCalloutCss = () => `@charset "UTF-8";sd-callout{display:block;width:100%}sd-callout .sd-callout{display:inline-flex;align-items:stretch;width:inherit;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}`;
95
95
 
96
96
  const SdCallout = class {
97
97
  constructor(hostRef) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-BGwB03Tk.js');
4
- var sanitizeInlineHtml = require('./sanitize-inline-html-BZCCwH_U.js');
4
+ var sanitizeInlineHtml = require('./sanitize-inline-html-CRCAeQ46.js');
5
5
  var component_modal = require('./component.modal-BFelrSMx.js');
6
6
 
7
7
  const CONFIRM_MODAL_DEFAULT_BUTTON = {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-BGwB03Tk.js');
4
- var sanitizeInlineHtml = require('./sanitize-inline-html-BZCCwH_U.js');
4
+ var sanitizeInlineHtml = require('./sanitize-inline-html-CRCAeQ46.js');
5
5
  var sdButton_config = require('./sd-button.config-BSHkfgdC.js');
6
6
  var system = require('./system-CdAyz3ej.js');
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-BGwB03Tk.js');
4
4
  var system = require('./system-CdAyz3ej.js');
5
- var sanitizeInlineHtml = require('./sanitize-inline-html-BZCCwH_U.js');
5
+ var sanitizeInlineHtml = require('./sanitize-inline-html-CRCAeQ46.js');
6
6
 
7
7
  const guide = {
8
8
  button: {
@@ -602,8 +602,6 @@ const SdTr = class {
602
602
  return this.tableEl.getCellClassSync(this.rowKey, fieldName);
603
603
  }
604
604
  getFramePaddingStyle(field) {
605
- if (!this._dense)
606
- return undefined;
607
605
  if (!(this.tableEl?.isCellUseFrameSync?.(this.rowKey, field) ?? false))
608
606
  return undefined;
609
607
  return { padding: `${sdTable_config.TABLE_BODY_LAYOUT.framePadding}px` };
@@ -318,7 +318,7 @@ const SdSelectListbox = class {
318
318
  label: '전체',
319
319
  };
320
320
  get showSelectAll() {
321
- return this.useSelectAll && this.isMulti;
321
+ return this.useSelectAll && this.isMulti && this.getAllNonDisabledLeaves().length > 0;
322
322
  }
323
323
  getAllNonDisabledLeaves() {
324
324
  const collect = (opts) => opts.flatMap(o => {
@@ -637,9 +637,9 @@ const SdSelectListbox = class {
637
637
  '--listbox-max-height': this.maxHeight ?? '260px',
638
638
  '--listbox-radius': `${sdSelect_config.LIST_BOX_LAYOUT.radius}px`,
639
639
  };
640
- return (index.h("div", { key: '7505e221ddb890880f0ba5088c3fdc76700e3b2f', class: "sd-select-listbox", style: cssVars }, this.showSearch && (index.h("sd-select-list-item-search", { key: '54b97ad40c5e7abe92b478689d09337843736652', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), index.h("div", { key: 'f7417f923cc34cbb2c2a56ae70ed54701d013d3d', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
640
+ return (index.h("div", { key: '49f10bc8511fedcc0224729593498273088e16a3', class: "sd-select-listbox", style: cssVars }, this.showSearch && (index.h("sd-select-list-item-search", { key: '2eab7f77c0e900f90a79b2b2e9a7e60da2349409', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), index.h("div", { key: '46407c47a1d24ee8d997060c2b54f2443c163700', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
641
641
  this.listEl = el;
642
- } }, this.showSelectAll && (index.h("sd-select-list-item", { key: '5e8cfcb1f9f0953b9eaa6fc73de992b52a0a23d7', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (index.h("div", { class: "sd-select-listbox__empty" }, sdSelect_config.EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (index.h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
642
+ } }, this.showSelectAll && (index.h("sd-select-list-item", { key: '9c4a35e6515fb9bc9cd4feafc69a44c432b75139', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (index.h("div", { class: "sd-select-listbox__empty" }, sdSelect_config.EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (index.h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
643
643
  }
644
644
  static get watchers() { return {
645
645
  "searchKeyword": [{
@@ -19,7 +19,7 @@ let nanoid = (size = 21) => {
19
19
  return id
20
20
  };
21
21
 
22
- const sdTableCss = () => `sd-table,:host{display:block;width:100%;max-width:100%;min-width:0}sd-table *,:host *{box-sizing:border-box}.sd-table__container{height:var(--table-height, 100%);width:var(--table-width, 100%);max-width:100%;min-width:0;color:#222222;display:flex;flex-direction:column}.sd-table__wrapper{width:100%;min-width:0;height:var(--table-container-height, 400px);border:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);border-radius:var(--table-radius, 8px);overflow:hidden}.sd-table__wrapper--use-top{border-radius:0 0 var(--table-radius, 8px) var(--table-radius, 8px)}.sd-table__scroll-container{width:100%;height:100%;display:flex;flex-direction:column;position:relative;font-family:var(--table-body-font-family, inherit);font-weight:var(--table-body-font-weight, 400);font-size:var(--table-body-font-size, 12px);line-height:var(--table-body-line-height, 20px);text-decoration:var(--table-body-text-decoration, none);overflow:auto;background:#FFFFFF}.sd-table__scroll-container--loading{overflow:hidden !important;pointer-events:none}.sd-table__scroll-container--no-data{overflow:hidden;pointer-events:none}.sd-table__no-data{position:absolute;top:36px;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;font-size:var(--table-body-font-size, 12px);color:#888888;pointer-events:none;z-index:200;background:rgba(255, 255, 255, 0.6)}.sd-table__no-data-header-overlay{position:absolute;top:0;left:0;right:0;height:36px;background:rgba(255, 255, 255, 0.6);z-index:210;pointer-events:none}.sd-table__no-data-content{pointer-events:auto;min-height:60px;width:100%;display:flex;align-items:center;justify-content:center}.sd-table__loading{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center;pointer-events:none}.sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table--selectable sd-thead,.sd-table--selectable sd-tbody{--selectable:true}.sd-table--sticky-header sd-thead thead{position:sticky;top:0;z-index:120}.sd-table--sticky-column sd-thead,.sd-table--sticky-column sd-tbody{--sticky-column:true}.sd-table--scrolled-left sd-thead,.sd-table--scrolled-left sd-tbody{--scrolled-left:true}.sd-table--scrolled-right sd-thead,.sd-table--scrolled-right sd-tbody{--scrolled-right:true}.sd-table--resizable sd-thead{--resizable:true}.sd-table--no-data sd-thead{opacity:0.4}.sd-table__pagination{position:relative;background:#F9F9F9;height:48px;display:flex;align-items:center;justify-content:center;border:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);margin-top:-1px;border-radius:var(--table-radius, 8px)}.sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}`;
22
+ const sdTableCss = () => `sd-table,:host{display:block;width:100%;height:var(--table-host-height);max-width:100%;min-width:0}sd-table *,:host *{box-sizing:border-box}.sd-table__container{height:100%;width:var(--table-width, 100%);max-width:100%;min-width:0;color:#222222;display:flex;flex-direction:column}.sd-table__wrapper{width:100%;min-width:0;height:calc(100% - var(--pagination-height, 0px));border:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);border-radius:var(--table-radius, 8px);overflow:hidden}.sd-table__wrapper--use-top{border-radius:0 0 var(--table-radius, 8px) var(--table-radius, 8px)}.sd-table__scroll-container{width:100%;height:100%;display:flex;flex-direction:column;position:relative;font-family:var(--table-body-font-family, inherit);font-weight:var(--table-body-font-weight, 400);font-size:var(--table-body-font-size, 12px);line-height:var(--table-body-line-height, 20px);text-decoration:var(--table-body-text-decoration, none);overflow:auto;background:#FFFFFF}.sd-table__scroll-container--loading{overflow:hidden !important;pointer-events:none}.sd-table__scroll-container--no-data{overflow:hidden;pointer-events:none}.sd-table__no-data{position:absolute;top:36px;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;font-size:var(--table-body-font-size, 12px);color:#888888;pointer-events:none;z-index:200;background:rgba(255, 255, 255, 0.6)}.sd-table__no-data-header-overlay{position:absolute;top:0;left:0;right:0;height:36px;background:rgba(255, 255, 255, 0.6);z-index:210;pointer-events:none}.sd-table__no-data-content{pointer-events:auto;min-height:60px;width:100%;display:flex;align-items:center;justify-content:center}.sd-table__loading{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center;pointer-events:none}.sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table--selectable sd-thead,.sd-table--selectable sd-tbody{--selectable:true}.sd-table--sticky-header sd-thead thead{position:sticky;top:0;z-index:120}.sd-table--sticky-column sd-thead,.sd-table--sticky-column sd-tbody{--sticky-column:true}.sd-table--scrolled-left sd-thead,.sd-table--scrolled-left sd-tbody{--scrolled-left:true}.sd-table--scrolled-right sd-thead,.sd-table--scrolled-right sd-tbody{--scrolled-right:true}.sd-table--resizable sd-thead{--resizable:true}.sd-table--no-data sd-thead{opacity:0.4}.sd-table__pagination{position:relative;background:#F9F9F9;height:48px;display:flex;align-items:center;justify-content:center;border:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);margin-top:-1px;border-radius:var(--table-radius, 8px)}.sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}`;
23
23
 
24
24
  const SdTable = class {
25
25
  constructor(hostRef) {
@@ -828,9 +828,11 @@ const SdTable = class {
828
828
  const isNoData = this.rowCount === 0 && !this.isLoading;
829
829
  const paginationHeight = this.pagination && this.rowCount > 0 && !this.useVirtualScroll ? 48 : 0;
830
830
  const noDataTotalHeight = 36 + this.noDataBodyHeight;
831
- const effectiveTableHeight = isNoData
832
- ? `max(${this.height || '96px'}, ${noDataTotalHeight}px)`
833
- : this.height || '100%';
831
+ const hostHeight = isNoData
832
+ ? this.height !== undefined
833
+ ? `max(${this.height}, ${noDataTotalHeight}px)`
834
+ : `max(${noDataTotalHeight}px, 100%)`
835
+ : (this.height ?? '100%');
834
836
  const hostStyle = {
835
837
  '--table-radius': `${sdTable_config.TABLE_RADIUS}px`,
836
838
  '--table-border-color': sdTable_config.TABLE_BORDER.color,
@@ -841,26 +843,26 @@ const SdTable = class {
841
843
  '--table-body-line-height': `${sdTable_config.TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
842
844
  '--table-body-text-decoration': sdTable_config.TABLE_BODY_TYPOGRAPHY.textDecoration,
843
845
  '--table-selectable-width': `${sdTable_config.TABLE_SELECTABLE_COLUMN_WIDTH}px`,
846
+ '--table-host-height': hostHeight,
844
847
  };
845
- return (index.h(index.Host, { key: '4596e04bd57aca00fa6378fd26ce33a06a795eaf', style: hostStyle }, index.h("div", { key: '11a20d327410b0be659cede32917164e036e796c', class: "sd-table__container", style: {
848
+ return (index.h(index.Host, { key: '57f92f3d10b928ca964c2ac9917f7dd64991591f', style: hostStyle }, index.h("div", { key: 'ea3de705492e1c6c7f99d251e9d6e07136c72ce1', class: "sd-table__container", style: {
846
849
  '--table-width': this.width,
847
- '--table-height': effectiveTableHeight,
848
- '--table-container-height': `calc(${effectiveTableHeight} - ${paginationHeight}px)`,
849
- } }, index.h("div", { key: 'f4f3acf584dc4eacdae25b11aa2b62b73ffab949', class: {
850
+ '--pagination-height': `${paginationHeight}px`,
851
+ } }, index.h("div", { key: '12ef88f9b81c94980806038924b194d143d3895a', class: {
850
852
  'sd-table__wrapper': true,
851
853
  'sd-table__wrapper--use-top': this.useTop,
852
- } }, index.h("div", { key: 'c8ab618b9c990a22b8e9466a5bfb5f02f4de8b12', class: {
854
+ } }, index.h("div", { key: 'b592db122ecf7f22903c9a49ebfb36138f7e18d6', class: {
853
855
  'sd-table__scroll-container': true,
854
856
  'sd-table__scroll-container--loading': this.isLoading,
855
857
  'sd-table__scroll-container--no-data': isNoData,
856
- } }, this.isLoading && (index.h("div", { key: 'a696933a70799ba282fc743281d0af27fd691a2e', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, index.h("sd-circle-progress", { key: 'cba6ac47367ef6499bf338b9b757ee74fdd7e6c1', indeterminate: true }))), isNoData && (index.h(index.h.Fragment, null, index.h("div", { key: '6e22156bf5b0fb9814d9bf9cad57506758c6284b', class: "sd-table__no-data-header-overlay" }), index.h("div", { key: 'b72f9fabcc8acb8e700ad55acc4d7aff08355a1c', class: "sd-table__no-data" }, index.h("div", { key: '43f271a8803121362f16e8153748328658f073ec', class: "sd-table__no-data-content", ref: el => {
858
+ } }, this.isLoading && (index.h("div", { key: '5e6badf9334ed7390f19d3c5df7335ea0efa25c4', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, index.h("sd-circle-progress", { key: '70bd57550b67c5d737bf8c6e7984703b963637f9', indeterminate: true }))), isNoData && (index.h(index.h.Fragment, null, index.h("div", { key: '280a829ddf5275c62a8310d3fe6914863e6b79d5', class: "sd-table__no-data-header-overlay" }), index.h("div", { key: '35f7584702b61c076ebcf61d16fedb30390e7cca', class: "sd-table__no-data" }, index.h("div", { key: 'a67af0bf322ebfa55fc515a63b6c299676fa4aa5', class: "sd-table__no-data-content", ref: el => {
857
859
  this.noDataContentEl = el;
858
860
  if (el)
859
861
  this.syncNoDataContentObserver();
860
- } }, index.h("slot", { key: '4b8533115bbc81962b80c9c2533fe4b44a87193c', name: "no-data" }, index.h("span", { key: 'd94c4f7cf9eca7901b99434f712480a7b20c869a' }, this.resolvedNoDataLabel)))))), index.h("table", { key: 'a9a353aca09124ed8a82fcd2f8a0a7de09b234f5', class: this.tableClasses }, this.autoThead ? (index.h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, index.h("sd-thead", { rows: this.rows ?? [] }))) : (index.h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (index.h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, index.h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (index.h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
862
+ } }, index.h("slot", { key: '5bc8cf68c461359358edddfa085ee4121d6a3c24', name: "no-data" }, index.h("span", { key: '01cb29dc03a084530ef47170515066da65110aa3' }, this.resolvedNoDataLabel)))))), index.h("table", { key: 'e0f05c5ceab477809b0b26ddf2dc7a3fc5963076', class: this.tableClasses }, this.autoThead ? (index.h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, index.h("sd-thead", { rows: this.rows ?? [] }))) : (index.h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (index.h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, index.h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (index.h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
861
863
  this.pagination.rowsPerPage > 0 &&
862
864
  this.rowCount > 0 &&
863
- !this.useVirtualScroll && (index.h("div", { key: '8afeb9398c3d7540a54b9a3660fb9685ae1cddca', class: "sd-table__pagination" }, index.h("sd-pagination", { key: 'e2cbb3f7414f65b81ab2d33eaec5d9f28bed6cc8', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (index.h("sd-select", { key: 'ce723544dbc7e4cc0d77ced3b685b8575cf67e6f', value: this.useInternalPagination
865
+ !this.useVirtualScroll && (index.h("div", { key: '6f06c639cfc61e6be21ca9b598054ad17a07b879', class: "sd-table__pagination" }, index.h("sd-pagination", { key: '2edf2f1b0db1a34b080c82c99da5ff416fb6a325', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (index.h("sd-select", { key: '427db7075794819ebe0ce11e063480e87defc8b9', value: this.useInternalPagination
864
866
  ? this.innerRowsPerPage
865
867
  : this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
866
868
  if (!this.isRowsPerPageValue(e.detail))
@@ -1,12 +1,12 @@
1
1
  @charset "UTF-8";
2
2
  sd-callout {
3
3
  display: block;
4
- width: fit-content;
4
+ width: 100%;
5
5
  }
6
6
  sd-callout .sd-callout {
7
7
  display: inline-flex;
8
8
  align-items: stretch;
9
- width: fit-content;
9
+ width: inherit;
10
10
  border: var(--sd-callout-border-width) solid var(--sd-callout-border);
11
11
  border-radius: var(--sd-callout-radius);
12
12
  background-color: var(--sd-callout-bg);
@@ -29,7 +29,7 @@ export class SdSelectListbox {
29
29
  label: '전체',
30
30
  };
31
31
  get showSelectAll() {
32
- return this.useSelectAll && this.isMulti;
32
+ return this.useSelectAll && this.isMulti && this.getAllNonDisabledLeaves().length > 0;
33
33
  }
34
34
  getAllNonDisabledLeaves() {
35
35
  const collect = (opts) => opts.flatMap(o => {
@@ -348,9 +348,9 @@ export class SdSelectListbox {
348
348
  '--listbox-max-height': this.maxHeight ?? '260px',
349
349
  '--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
350
350
  };
351
- return (h("div", { key: '7505e221ddb890880f0ba5088c3fdc76700e3b2f', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: '54b97ad40c5e7abe92b478689d09337843736652', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: 'f7417f923cc34cbb2c2a56ae70ed54701d013d3d', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
351
+ return (h("div", { key: '49f10bc8511fedcc0224729593498273088e16a3', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: '2eab7f77c0e900f90a79b2b2e9a7e60da2349409', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '46407c47a1d24ee8d997060c2b54f2443c163700', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
352
352
  this.listEl = el;
353
- } }, this.showSelectAll && (h("sd-select-list-item", { key: '5e8cfcb1f9f0953b9eaa6fc73de992b52a0a23d7', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
353
+ } }, this.showSelectAll && (h("sd-select-list-item", { key: '9c4a35e6515fb9bc9cd4feafc69a44c432b75139', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
354
354
  }
355
355
  static get is() { return "sd-select-listbox"; }
356
356
  static get encapsulation() { return "shadow"; }
@@ -2,6 +2,7 @@ sd-table,
2
2
  :host {
3
3
  display: block;
4
4
  width: 100%;
5
+ height: var(--table-host-height);
5
6
  max-width: 100%;
6
7
  min-width: 0;
7
8
  }
@@ -11,7 +12,7 @@ sd-table *,
11
12
  }
12
13
 
13
14
  .sd-table__container {
14
- height: var(--table-height, 100%);
15
+ height: 100%;
15
16
  width: var(--table-width, 100%);
16
17
  max-width: 100%;
17
18
  min-width: 0;
@@ -23,7 +24,7 @@ sd-table *,
23
24
  .sd-table__wrapper {
24
25
  width: 100%;
25
26
  min-width: 0;
26
- height: var(--table-container-height, 400px);
27
+ height: calc(100% - var(--pagination-height, 0px));
27
28
  border: var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);
28
29
  border-radius: var(--table-radius, 8px);
29
30
  overflow: hidden;
@@ -801,9 +801,11 @@ export class SdTable {
801
801
  const isNoData = this.rowCount === 0 && !this.isLoading;
802
802
  const paginationHeight = this.pagination && this.rowCount > 0 && !this.useVirtualScroll ? 48 : 0;
803
803
  const noDataTotalHeight = 36 + this.noDataBodyHeight;
804
- const effectiveTableHeight = isNoData
805
- ? `max(${this.height || '96px'}, ${noDataTotalHeight}px)`
806
- : this.height || '100%';
804
+ const hostHeight = isNoData
805
+ ? this.height !== undefined
806
+ ? `max(${this.height}, ${noDataTotalHeight}px)`
807
+ : `max(${noDataTotalHeight}px, 100%)`
808
+ : (this.height ?? '100%');
807
809
  const hostStyle = {
808
810
  '--table-radius': `${TABLE_RADIUS}px`,
809
811
  '--table-border-color': TABLE_BORDER.color,
@@ -814,26 +816,26 @@ export class SdTable {
814
816
  '--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
815
817
  '--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
816
818
  '--table-selectable-width': `${TABLE_SELECTABLE_COLUMN_WIDTH}px`,
819
+ '--table-host-height': hostHeight,
817
820
  };
818
- return (h(Host, { key: '4596e04bd57aca00fa6378fd26ce33a06a795eaf', style: hostStyle }, h("div", { key: '11a20d327410b0be659cede32917164e036e796c', class: "sd-table__container", style: {
821
+ return (h(Host, { key: '57f92f3d10b928ca964c2ac9917f7dd64991591f', style: hostStyle }, h("div", { key: 'ea3de705492e1c6c7f99d251e9d6e07136c72ce1', class: "sd-table__container", style: {
819
822
  '--table-width': this.width,
820
- '--table-height': effectiveTableHeight,
821
- '--table-container-height': `calc(${effectiveTableHeight} - ${paginationHeight}px)`,
822
- } }, h("div", { key: 'f4f3acf584dc4eacdae25b11aa2b62b73ffab949', class: {
823
+ '--pagination-height': `${paginationHeight}px`,
824
+ } }, h("div", { key: '12ef88f9b81c94980806038924b194d143d3895a', class: {
823
825
  'sd-table__wrapper': true,
824
826
  'sd-table__wrapper--use-top': this.useTop,
825
- } }, h("div", { key: 'c8ab618b9c990a22b8e9466a5bfb5f02f4de8b12', class: {
827
+ } }, h("div", { key: 'b592db122ecf7f22903c9a49ebfb36138f7e18d6', class: {
826
828
  'sd-table__scroll-container': true,
827
829
  'sd-table__scroll-container--loading': this.isLoading,
828
830
  'sd-table__scroll-container--no-data': isNoData,
829
- } }, this.isLoading && (h("div", { key: 'a696933a70799ba282fc743281d0af27fd691a2e', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: 'cba6ac47367ef6499bf338b9b757ee74fdd7e6c1', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: '6e22156bf5b0fb9814d9bf9cad57506758c6284b', class: "sd-table__no-data-header-overlay" }), h("div", { key: 'b72f9fabcc8acb8e700ad55acc4d7aff08355a1c', class: "sd-table__no-data" }, h("div", { key: '43f271a8803121362f16e8153748328658f073ec', class: "sd-table__no-data-content", ref: el => {
831
+ } }, this.isLoading && (h("div", { key: '5e6badf9334ed7390f19d3c5df7335ea0efa25c4', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: '70bd57550b67c5d737bf8c6e7984703b963637f9', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: '280a829ddf5275c62a8310d3fe6914863e6b79d5', class: "sd-table__no-data-header-overlay" }), h("div", { key: '35f7584702b61c076ebcf61d16fedb30390e7cca', class: "sd-table__no-data" }, h("div", { key: 'a67af0bf322ebfa55fc515a63b6c299676fa4aa5', class: "sd-table__no-data-content", ref: el => {
830
832
  this.noDataContentEl = el;
831
833
  if (el)
832
834
  this.syncNoDataContentObserver();
833
- } }, h("slot", { key: '4b8533115bbc81962b80c9c2533fe4b44a87193c', name: "no-data" }, h("span", { key: 'd94c4f7cf9eca7901b99434f712480a7b20c869a' }, this.resolvedNoDataLabel)))))), h("table", { key: 'a9a353aca09124ed8a82fcd2f8a0a7de09b234f5', class: this.tableClasses }, this.autoThead ? (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, h("sd-thead", { rows: this.rows ?? [] }))) : (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
835
+ } }, h("slot", { key: '5bc8cf68c461359358edddfa085ee4121d6a3c24', name: "no-data" }, h("span", { key: '01cb29dc03a084530ef47170515066da65110aa3' }, this.resolvedNoDataLabel)))))), h("table", { key: 'e0f05c5ceab477809b0b26ddf2dc7a3fc5963076', class: this.tableClasses }, this.autoThead ? (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, h("sd-thead", { rows: this.rows ?? [] }))) : (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
834
836
  this.pagination.rowsPerPage > 0 &&
835
837
  this.rowCount > 0 &&
836
- !this.useVirtualScroll && (h("div", { key: '8afeb9398c3d7540a54b9a3660fb9685ae1cddca', class: "sd-table__pagination" }, h("sd-pagination", { key: 'e2cbb3f7414f65b81ab2d33eaec5d9f28bed6cc8', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: 'ce723544dbc7e4cc0d77ced3b685b8575cf67e6f', value: this.useInternalPagination
838
+ !this.useVirtualScroll && (h("div", { key: '6f06c639cfc61e6be21ca9b598054ad17a07b879', class: "sd-table__pagination" }, h("sd-pagination", { key: '2edf2f1b0db1a34b080c82c99da5ff416fb6a325', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: '427db7075794819ebe0ce11e063480e87defc8b9', value: this.useInternalPagination
837
839
  ? this.innerRowsPerPage
838
840
  : this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
839
841
  if (!this.isRowsPerPageValue(e.detail))
@@ -157,8 +157,6 @@ export class SdTr {
157
157
  return this.tableEl.getCellClassSync(this.rowKey, fieldName);
158
158
  }
159
159
  getFramePaddingStyle(field) {
160
- if (!this._dense)
161
- return undefined;
162
160
  if (!(this.tableEl?.isCellUseFrameSync?.(this.rowKey, field) ?? false))
163
161
  return undefined;
164
162
  return { padding: `${TABLE_BODY_LAYOUT.framePadding}px` };
@@ -1,4 +1,11 @@
1
- const ALLOWED_INLINE_TAGS = new Set(['B', 'STRONG', 'I', 'EM', 'BR', 'SPAN']);
1
+ const ALLOWED_INLINE_TAGS = new Set(['A', 'B', 'STRONG', 'I', 'EM', 'BR', 'SPAN']);
2
+ // 태그별 허용 속성. 미등록 태그는 COMMON_ALLOWED_ATTRS만 적용
3
+ const ALLOWED_ATTRS_BY_TAG = {
4
+ A: new Set(['href', 'target', 'rel', 'class']),
5
+ };
6
+ const COMMON_ALLOWED_ATTRS = new Set(['class']);
7
+ // javascript:, data: 등 위험 프로토콜 차단 — 상대 URL과 안전한 스킴만 허용
8
+ const SAFE_HREF_RE = /^(https?:|mailto:|tel:|\/|#|\.)/i;
2
9
  const DROP_CONTENT_TAGS = new Set([
3
10
  'SCRIPT',
4
11
  'STYLE',
@@ -37,8 +44,27 @@ const sanitizeNode = (node, doc) => {
37
44
  return;
38
45
  }
39
46
  Array.from(element.childNodes).forEach(child => sanitizeNode(child, doc));
40
- Array.from(element.attributes).forEach(attr => element.removeAttribute(attr.name));
41
47
  if (ALLOWED_INLINE_TAGS.has(tagName)) {
48
+ // React HTML 문자열 호환: className → class 정규화
49
+ if (element.hasAttribute('className')) {
50
+ const val = element.getAttribute('className');
51
+ element.removeAttribute('className');
52
+ if (!element.hasAttribute('class')) {
53
+ element.setAttribute('class', val);
54
+ }
55
+ }
56
+ const allowedAttrs = ALLOWED_ATTRS_BY_TAG[tagName] ?? COMMON_ALLOWED_ATTRS;
57
+ Array.from(element.attributes).forEach(attr => {
58
+ if (!allowedAttrs.has(attr.name)) {
59
+ element.removeAttribute(attr.name);
60
+ }
61
+ });
62
+ if (tagName === 'A') {
63
+ const href = element.getAttribute('href');
64
+ if (href !== null && href !== '' && !SAFE_HREF_RE.test(href)) {
65
+ element.removeAttribute('href');
66
+ }
67
+ }
42
68
  return;
43
69
  }
44
70
  const parent = element.parentNode;
@@ -0,0 +1 @@
1
+ const e=new Set(["A","B","STRONG","I","EM","BR","SPAN"]),t={A:new Set(["href","target","rel","class"])},n=new Set(["class"]),s=/^(https?:|mailto:|tel:|\/|#|\.)/i,r=new Set(["SCRIPT","STYLE","IFRAME","OBJECT","EMBED","META","LINK","BASE","NOSCRIPT"]),l=a=>{if(a.nodeType===Node.COMMENT_NODE)return void a.remove();if(a.nodeType!==Node.ELEMENT_NODE)return;const o=a,c=o.tagName;if(r.has(c))return void o.remove();if(Array.from(o.childNodes).forEach((e=>l(e))),e.has(c)){if(o.hasAttribute("className")){const e=o.getAttribute("className");o.removeAttribute("className"),o.hasAttribute("class")||o.setAttribute("class",e)}const e=t[c]??n;if(Array.from(o.attributes).forEach((t=>{e.has(t.name)||o.removeAttribute(t.name)})),"A"===c){const e=o.getAttribute("href");null===e||""===e||s.test(e)||o.removeAttribute("href")}return}const f=o.parentNode;if(null!=f){for(;o.firstChild;)f.insertBefore(o.firstChild,o);f.removeChild(o)}},a=e=>{const t="undefined"==typeof document?null:document.createElement("template");return null==t?(e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;"))(e):(t.innerHTML=e,Array.from(t.content.childNodes).forEach((e=>l(e))),t.innerHTML)};export{a as s}
@@ -1 +1 @@
1
- import{p as t,H as o,c as s,h as a,t as e}from"./p-pwNG5WaX.js";import{s as i}from"./p-DopVneZA.js";import{m as d}from"./p-DOXMJi-V.js";import{d as n}from"./p-B6L3bPm2.js";import{d as l}from"./p-DhtKHJ7-.js";import{d as m}from"./p-DQj-S8AC.js";import{d as c}from"./p-wLoP3KMv.js";const r={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},f={positive:"notificationOutline",negative:"warningOutline",default:null},h={positive:d.modal.confirm.positive.icon,negative:d.modal.confirm.negative.icon,default:""},b=Number(d.modal.confirm.title.icon),p=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??r[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=this.resolvedType,o=f[t],s=h[t];return a("div",{key:"c41a58f13b95da7f1f0aea3620abf239dcb116b6",class:"sd-confirm-modal"},a("sd-ghost-button",{key:"bdc1bc374934c2f9745f567b4e6ffd55ec3675ce",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&a("sd-icon",{key:"ff16ebde448157e657eb74e1b0c5f4a331cf396a",class:"sd-confirm-modal__icon",name:o,size:b,color:s}),a("h2",{key:"d718b2ae6f6e92f8c77ec821b78924ffbe267d12",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),a("div",{key:"a3909abde84c4d6987c9036a705cba4aa7d01ea6",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&a("div",{key:"29a4bf80ab75d973544c0a29c87133c9ef8a5aab",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)})))),this.showContentBox&&a("div",{key:"93eb2c75728cf26969a229a876f9217b4e00c63a",class:"sd-confirm-modal__content-box"},this.tagContents?a("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):a("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&a("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&a("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&a("div",{key:"730fd073ade9b8788de77d36fc4aeddd0b304c07",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)}))))),a("div",{key:"059fd87fb39b8e2976fcb671c7dd78310324119f",class:"sd-confirm-modal__button"},this.subButtonLabel&&a("sd-button",{key:"6b320645505c099783a4a6704e96e9261054c7dc",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),a("sd-button",{key:"d6a4554a7db861ae7afc610a629591224946d990",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function g(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(e(t))||customElements.define(e(t),p);break;case"sd-button":customElements.get(e(t))||n();break;case"sd-ghost-button":customElements.get(e(t))||l();break;case"sd-icon":customElements.get(e(t))||m();break;case"sd-tag":customElements.get(e(t))||c()}}))}export{p as S,g as d}
1
+ import{p as t,H as o,c as s,h as a,t as e}from"./p-pwNG5WaX.js";import{s as i}from"./p-BE4tnQ2Z.js";import{m as d}from"./p-DOXMJi-V.js";import{d as n}from"./p-B6L3bPm2.js";import{d as l}from"./p-DhtKHJ7-.js";import{d as m}from"./p-DQj-S8AC.js";import{d as c}from"./p-wLoP3KMv.js";const r={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},f={positive:"notificationOutline",negative:"warningOutline",default:null},h={positive:d.modal.confirm.positive.icon,negative:d.modal.confirm.negative.icon,default:""},b=Number(d.modal.confirm.title.icon),p=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??r[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=this.resolvedType,o=f[t],s=h[t];return a("div",{key:"c41a58f13b95da7f1f0aea3620abf239dcb116b6",class:"sd-confirm-modal"},a("sd-ghost-button",{key:"bdc1bc374934c2f9745f567b4e6ffd55ec3675ce",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&a("sd-icon",{key:"ff16ebde448157e657eb74e1b0c5f4a331cf396a",class:"sd-confirm-modal__icon",name:o,size:b,color:s}),a("h2",{key:"d718b2ae6f6e92f8c77ec821b78924ffbe267d12",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),a("div",{key:"a3909abde84c4d6987c9036a705cba4aa7d01ea6",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&a("div",{key:"29a4bf80ab75d973544c0a29c87133c9ef8a5aab",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)})))),this.showContentBox&&a("div",{key:"93eb2c75728cf26969a229a876f9217b4e00c63a",class:"sd-confirm-modal__content-box"},this.tagContents?a("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):a("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&a("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&a("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&a("div",{key:"730fd073ade9b8788de77d36fc4aeddd0b304c07",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)}))))),a("div",{key:"059fd87fb39b8e2976fcb671c7dd78310324119f",class:"sd-confirm-modal__button"},this.subButtonLabel&&a("sd-button",{key:"6b320645505c099783a4a6704e96e9261054c7dc",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),a("sd-button",{key:"d6a4554a7db861ae7afc610a629591224946d990",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function g(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(e(t))||customElements.define(e(t),p);break;case"sd-button":customElements.get(e(t))||n();break;case"sd-ghost-button":customElements.get(e(t))||l();break;case"sd-icon":customElements.get(e(t))||m();break;case"sd-tag":customElements.get(e(t))||c()}}))}export{p as S,g as d}
@@ -0,0 +1 @@
1
+ import{p as t,H as e,c as s,h as i,t as h}from"./p-pwNG5WaX.js";import{c as o,d as r,f as l,E as n,e as c}from"./p-C4uWhzoG.js";import{d}from"./p-Cye8r1MG.js";import{d as a}from"./p-DQj-S8AC.js";import{d as u}from"./p-DP0Dp12H.js";import{d as m}from"./p-EcuI_UmK.js";const p=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.optionSelect=s(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=e=>e.flatMap((e=>e.disabled?[]:e.children?t(e.children):[e]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const e=this.getSelectedValues(),s=t.filter((t=>e.has(t.value))).length;return 0!==s&&(s===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?o(this.options):this.options.length)>=r}get filteredOptions(){if(""===this.searchKeyword)return this.options;if(this.isDepth)return l(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((e=>e.label.toLowerCase().includes(t)))}get isEmpty(){return this.isDepth?0===o(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const e=this.getSelectedValues();if(0===e.size)return!1;const s=this.collectVisibleLeaves(t);if(0===s.length)return!1;const i=s.filter((t=>e.has(t.value))).length;return 0!==i&&(i===s.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const e=this.getSelectedValues(),s=this.collectVisibleLeaves(t);return{selected:s.filter((t=>e.has(t.value))).length,total:s.length}}findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const e=this.findOriginalOption(t.value,this.options);return e?this.collectLeaves(e).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const e=[];this.showSelectAll&&e.push(t.SELECT_ALL_OPTION);const s=t=>{for(const i of t){const t=!!i.children;(!t||this.isMulti)&&!i.disabled&&e.push(i),t&&i.children&&i.children.length>0&&s(i.children)}};return s(this.filteredOptions),e}isSelectAllOption(e){return this.showSelectAll&&e.value===t.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const e=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...t.SELECT_ALL_OPTION,children:e},leaves:e})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const e=this.navigableOptions[this.focusedIndex];return null!=e&&e.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const e=this.navigableOptions.findIndex((e=>e.value===t.value));e>=0&&(this.focusedIndex=e)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const e=this.navigableOptions;if("ArrowDown"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%e.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?e.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=e.length)return;t.preventDefault(),t.stopPropagation();const s=e[this.focusedIndex];this.isSelectAllOption(s)?this.emitSelectAll():this.emitOptionSelect(s)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,e=t?.querySelector(".sd-select-list-item--focused");if(!t||!e)return;const s=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.top<s.top?t.scrollTop+=i.top-s.top:i.bottom>s.bottom&&(t.scrollTop+=i.bottom-s.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,e=1){return t.map((t=>{const s=!!t.children;return[i("sd-select-list-item",{option:t,depth:e,isSelected:s?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),s&&t.children?this.renderOptions(t.children,e+1):null]}))}render(){return i("div",{key:"49f10bc8511fedcc0224729593498273088e16a3",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${c.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"2eab7f77c0e900f90a79b2b2e9a7e60da2349409",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"46407c47a1d24ee8d997060c2b54f2443c163700",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"9c4a35e6515fb9bc9cd4feafc69a44c432b75139",option:t.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(t.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(t.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},n):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}static get style(){return":host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}"}},[513,"sd-select-listbox",{type:[1],options:[16],value:[8],emitValue:[4,"emit-value"],useSearch:[4,"use-search"],useSelectAll:[4,"use-select-all"],triggerWidth:[1,"trigger-width"],maxWidth:[1,"max-width"],maxHeight:[1,"max-height"],searchKeyword:[32],isScrolled:[32],focusedIndex:[32]},void 0,{searchKeyword:[{resetFocusOnFilter:0}]}]);function f(){"undefined"!=typeof customElements&&["sd-select-listbox","sd-checkbox","sd-icon","sd-select-list-item","sd-select-list-item-search"].forEach((t=>{switch(t){case"sd-select-listbox":customElements.get(h(t))||customElements.define(h(t),p);break;case"sd-checkbox":customElements.get(h(t))||d();break;case"sd-icon":customElements.get(h(t))||a();break;case"sd-select-list-item":customElements.get(h(t))||u();break;case"sd-select-list-item-search":customElements.get(h(t))||m()}}))}export{p as S,f as d}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as i,t as o}from"./p-pwNG5WaX.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-B6L3bPm2.js";import{d as h}from"./p-Cye8r1MG.js";import{d as a}from"./p-DmDGMDzt.js";import{d}from"./p-CwQTEZWO.js";import{d as n}from"./p-DQj-S8AC.js";import{d as c}from"./p-DCFqtVBm.js";import{d as p}from"./p-DP0Dp12H.js";import{d as u}from"./p-EcuI_UmK.js";import{d as m}from"./p-CARYLqH9.js";import{d as f}from"./p-DoREs-rv.js";import{d as b}from"./p-D6cUtm8p.js";const g=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}type="default";value=null;options=[];placeholder="선택";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options).find((t=>t.value===this.value));return t?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),l=Math.max(window.innerHeight-e.bottom-s-i,0),h=Math.max(e.top-s-i,0),a=Math.max(l,h),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,a)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"3c188cbdd8c612e78780d18c03acc382d32080c9",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"be596d399856ed966408ba1525fea9dbdf8fcc7e",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"f8a29b1ac2469c60af8c7101d05157674566f00f",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"3cef3f95f69b09d0e4e8f6b01615df4cca031cff",...e},i("sd-select-listbox",{key:"e8833c547aa2e8084754c7a439d3860df5c97e5b",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function w(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),g);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-icon":customElements.get(o(t))||n();break;case"sd-portal":customElements.get(o(t))||c();break;case"sd-select-list-item":customElements.get(o(t))||p();break;case"sd-select-list-item-search":customElements.get(o(t))||u();break;case"sd-select-listbox":customElements.get(o(t))||m();break;case"sd-select-trigger":customElements.get(o(t))||f();break;case"sd-tooltip":customElements.get(o(t))||b()}}))}export{g as S,w as d}
1
+ import{p as t,H as e,c as s,h as i,t as o}from"./p-pwNG5WaX.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-B6L3bPm2.js";import{d as h}from"./p-Cye8r1MG.js";import{d as a}from"./p-DmDGMDzt.js";import{d}from"./p-CwQTEZWO.js";import{d as n}from"./p-DQj-S8AC.js";import{d as c}from"./p-DCFqtVBm.js";import{d as p}from"./p-DP0Dp12H.js";import{d as u}from"./p-EcuI_UmK.js";import{d as m}from"./p-D7g33VZR.js";import{d as f}from"./p-DoREs-rv.js";import{d as g}from"./p-D6cUtm8p.js";const b=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}type="default";value=null;options=[];placeholder="선택";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options).find((t=>t.value===this.value));return t?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),l=Math.max(window.innerHeight-e.bottom-s-i,0),h=Math.max(e.top-s-i,0),a=Math.max(l,h),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,a)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"3c188cbdd8c612e78780d18c03acc382d32080c9",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"be596d399856ed966408ba1525fea9dbdf8fcc7e",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"f8a29b1ac2469c60af8c7101d05157674566f00f",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"3cef3f95f69b09d0e4e8f6b01615df4cca031cff",...e},i("sd-select-listbox",{key:"e8833c547aa2e8084754c7a439d3860df5c97e5b",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function w(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),b);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-icon":customElements.get(o(t))||n();break;case"sd-portal":customElements.get(o(t))||c();break;case"sd-select-list-item":customElements.get(o(t))||p();break;case"sd-select-list-item-search":customElements.get(o(t))||u();break;case"sd-select-listbox":customElements.get(o(t))||m();break;case"sd-select-trigger":customElements.get(o(t))||f();break;case"sd-tooltip":customElements.get(o(t))||g()}}))}export{b as S,w as d}
@@ -0,0 +1 @@
1
+ import{p as t,H as e,h as s,d as i,t as r}from"./p-pwNG5WaX.js";import{T as o}from"./p-sZMi_32I.js";import{T as l,j as a,c as n,b as h}from"./p-DGyTYauz.js";import{d}from"./p-Cye8r1MG.js";import{d as c}from"./p-DQj-S8AC.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}columns;selectable;stickyColumn;rowKey="";row={};separator=null;tableId="";columnWidths=[];isVisible=!0;spansVersion=0;_columns=[];_selectable=!1;_stickyColumn={left:0,right:0};_scrolledLeft=!1;_scrolledRight=!1;_dense=!1;tableEl=null;componentWillLoad(){this.row=this.row??{},this.syncTableContext(),this.columnWidths=this.columnWidths??[],this.resolveConfig(),this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.updateVisibilitySync()}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),s=e instanceof ShadowRoot?e.host:null,i=t??s;this.tableEl=i;const r=i?.getTableIdSync?.(),l=i?.getAttribute(o),a=(null!=r&&""!==r&&"undefined"!==r?r:null)??(null!=l&&""!==l&&"undefined"!==l?l:null)??"";""!==a&&a!==this.tableId&&(this.tableId=a)}resolveConfig(){const t=this.tableEl?.getConfigSync?.();this._columns=this.columns??t?.columns??[],this._selectable=this.selectable??t?.selectable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._scrolledLeft=t?.scrolledLeft??!1,this._scrolledRight=t?.scrolledRight??!1,this._dense=t?.dense??!1,t?.columnWidths&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths])}async refreshConfig(){this.resolveConfig()}async bumpSpansVersion(){this.spansVersion=this.spansVersion+1}async updateVisibility(){this.updateVisibilitySync()}updateVisibilitySync(){const t=parseInt(this.rowKey,10),e=this.tableEl?.getPaginationInfoSync?.();this.isVisible=!e||t>=e.startIndex&&t<e.endIndex}async setColumnWidths(t){this.columnWidths=t}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.isSelected())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}formatValue(t){return null==t?"":"number"==typeof t?t.toLocaleString():String(t)}getCellValue(t){const{field:e,format:s,name:i}=t,r="function"==typeof e?e(this.row):""!==e?this.row[e]:this.row[i];return s?s(r,this.row):this.formatValue(r)}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),0)+(this._selectable?52:0),s=this.columnWidths.filter(((e,s)=>s>=this.visibleColumns.length-(this._stickyColumn.right||0)&&s>t)).reduce(((t,e)=>t+e),0),i=this.visibleColumns[t],r={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${s}px`};return i?.autoWidth||(r.width=`${this.columnWidths[t]}px`,r.minWidth=`${this.columnWidths[t]}px`,r.maxWidth=`${this.columnWidths[t]}px`),r}isSelected(){return!!this.tableEl?.isRowSelectedSync&&this.tableEl.isRowSelectedSync(this.row)}handleSelect(){this.tableEl?.updateRowSelectSync&&this.tableEl.updateRowSelectSync(this.row)}getSpanFor(t){if(this.tableEl?.getSpanSync)return this.tableEl.getSpanSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}isCovered(t){return!!this.tableEl?.isCoveredSync&&this.tableEl.isCoveredSync(this.rowKey,t,this._columns)}getCellClassFor(t){if(this.tableEl?.getCellClassSync)return this.tableEl.getCellClassSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}getFramePaddingStyle(t){if(this.tableEl?.isCellUseFrameSync?.(this.rowKey,t))return{padding:`${l.framePadding}px`}}expandCellClass(t){return null==t||""===t?{}:Object.fromEntries(t.split(/\s+/).filter(Boolean).map((t=>[t,!0])))}render(){const t=this._stickyColumn.left||0,e=this._stickyColumn.right||0,r=this.visibleColumns.slice(0,t),o=this.visibleColumns.slice(t,this.visibleColumns.length-e),d=this.visibleColumns.slice(this.visibleColumns.length-e),c=this.tableEl?.hasRowspanSync?.()??!1,p=this.tableEl?.hasUseFrameInRowSync?.(this.rowKey)??!1,b=this._dense&&!p?l.dense:l.default,f={display:this.isVisible?"":"none","--table-body-height":`${b.height}px`,"--table-body-padding-y":`${b.paddingY}px`,"--table-body-padding-x":`${l.paddingX}px`,"--table-body-font-family":h.fontFamily,"--table-body-font-weight":h.fontWeight,"--table-body-font-size":`${h.fontSize}px`,"--table-body-line-height":`${h.lineHeight}px`,"--table-body-text-decoration":h.textDecoration,"--table-border-color":n.color,"--table-border-width":`${n.width}px`,"--table-separator-color":a.color,"--table-separator-width":`${a.width}px`,"--table-separator-dense-width":`${a.denseWidth}px`};return s(i,{style:f},null!=this.separator?s("tr",{class:{tr:!0,"tr--separator":!0,"tr--separator--dense":4===this.separator}},s("td",{colSpan:this.visibleColumns.length+(this._selectable?1:0),class:"td td--separator"})):s("tr",{class:{tr:!0,"tr--no-hover":c}},this._selectable&&s("td",{class:{td:!0,"td--selected":!0,"sticky-left":!0,"sticky-left-edge":0===t,"is-scrolled-left":0===t&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},s("sd-checkbox",{value:this.isSelected(),onSdUpdate:()=>this.handleSelect()})),r.map(((e,i)=>{if(this.isCovered(i))return null;const r="string"==typeof e.field?e.field:e.name,o=this.getSpanFor(e),l=this.getCellClassFor(e);return s("td",{key:e.name,rowSpan:o?.rowspan,colSpan:o?.colspan,class:{td:!0,[`td--${e.align||"left"}`]:!0,"sticky-left":!0,"sticky-left-edge":i===t-1,"is-scrolled-left":i===t-1&&this._scrolledLeft,[`${e.tdClass}`]:Boolean(e.tdClass),...this.expandCellClass(l)},style:{...this.getStickyStyle(i),...this.getFramePaddingStyle(r)}},s("slot",{name:`${this.tableId}-${r}-${this.rowKey}`},s("span",null,this.getCellValue(e))))})),o.map(((e,i)=>{const r=t+i;if(this.isCovered(r))return null;const o="string"==typeof e.field?e.field:e.name,l=this.getSpanFor(e),a=this.getCellClassFor(e);return s("td",{key:e.name,rowSpan:l?.rowspan,colSpan:l?.colspan,class:{td:!0,[`td--${e.align||"left"}`]:!0,[`${e.tdClass}`]:Boolean(e.tdClass),...this.expandCellClass(a)},style:{...this.getStickyStyle(r),...this.getFramePaddingStyle(o)}},s("slot",{name:`${this.tableId}-${o}-${this.rowKey}`},s("span",null,this.getCellValue(e))))})),d.map(((t,i)=>{const r=this.visibleColumns.length-e+i;if(this.isCovered(r))return null;const o="string"==typeof t.field?t.field:t.name,l=this.getSpanFor(t),a=this.getCellClassFor(t);return s("td",{key:t.name,rowSpan:l?.rowspan,colSpan:l?.colspan,class:{td:!0,[`td--${t.align||"left"}`]:!0,"sticky-right":!0,"sticky-right-edge":0===i,"is-scrolled-right":0===i&&this._scrolledRight,[`${t.tdClass}`]:Boolean(t.tdClass),...this.expandCellClass(a)},style:{...this.getStickyStyle(r),...this.getFramePaddingStyle(o)}},s("slot",{name:`${this.tableId}-${o}-${this.rowKey}`},s("span",null,this.getCellValue(t))))}))))}static get style(){return'sd-tr{display:contents}sd-tr *{box-sizing:border-box}.tr{display:table-row}.tr:hover .td{background-color:#F9F9F9}.tr--no-hover:hover .td{background-color:white}.tr--separator:hover .td{background-color:var(--table-separator-color, #eeeeee)}.td{display:table-cell;height:var(--table-body-height, 44px);padding:var(--table-body-padding-y, 0) var(--table-body-padding-x, 16px);border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);background:white;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.td--left{text-align:left}.td--center{text-align:center}.td--right{text-align:right}.td--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.td--selected sd-checkbox label{position:relative}.td--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.td.sticky-left{position:sticky;background-color:white;z-index:100 !important;left:var(--sticky-left-offset, 0)}.td.sticky-right{position:sticky;background-color:white;z-index:100 !important;right:var(--sticky-right-offset, 0)}.td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-left-edge.is-scrolled-left{overflow:visible}.td.sticky-left-edge.is-scrolled-left:after{opacity:1}.td.sticky-right-edge.is-scrolled-right{overflow:visible}.td.sticky-right-edge.is-scrolled-right:after{opacity:1}.tr:hover .td.sticky-left,.tr:hover .td.sticky-right{background-color:#F9F9F9}.tr--no-hover:hover .td.sticky-left,.tr--no-hover:hover .td.sticky-right{background-color:white}.tr--separator:hover .td.sticky-left,.tr--separator:hover .td.sticky-right{background-color:var(--table-separator-color, #eeeeee)}.tr--separator .td--separator{height:var(--table-separator-width, 6px);padding:0;background-color:var(--table-separator-color, #eeeeee);border-bottom:none}.tr--separator--dense .td--separator{height:var(--table-separator-dense-width, 4px)}.td--divider-left{border-left:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}.td--divider-right{border-right:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}'}},[772,"sd-tr",{columns:[16],selectable:[4],stickyColumn:[16],rowKey:[1,"row-key"],row:[16],separator:[8],tableId:[32],columnWidths:[32],isVisible:[32],spansVersion:[32],_columns:[32],_selectable:[32],_stickyColumn:[32],_scrolledLeft:[32],_scrolledRight:[32],_dense:[32],refreshConfig:[64],bumpSpansVersion:[64],updateVisibility:[64],setColumnWidths:[64],refreshSelection:[64]}]);function b(){"undefined"!=typeof customElements&&["sd-tr","sd-checkbox","sd-icon"].forEach((t=>{switch(t){case"sd-tr":customElements.get(r(t))||customElements.define(r(t),p);break;case"sd-checkbox":customElements.get(r(t))||d();break;case"sd-icon":customElements.get(r(t))||c()}}))}export{p as S,b as d}
@@ -1 +1 @@
1
- import{p as t,H as 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
+ import{p as t,H as l,h as e,t as o}from"./p-pwNG5WaX.js";import{s as a}from"./p-BE4tnQ2Z.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:100%}sd-callout .sd-callout{display:inline-flex;align-items:stretch;width:inherit;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{S as o,d as s}from"./p-CwRItc2J.js";const t=o,p=s;export{t as SdConfirmModal,p as defineCustomElement}
1
+ import{S as s,d as o}from"./p-Bx9dlLbs.js";const p=s,r=o;export{p as SdConfirmModal,r as defineCustomElement}