@sellmate/design-system 1.7.3 → 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.
- package/dist/cjs/{sanitize-inline-html-BZCCwH_U.js → sanitize-inline-html-CRCAeQ46.js} +28 -2
- package/dist/cjs/sd-callout.cjs.entry.js +2 -2
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-guide.cjs.entry.js +1 -1
- package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -2
- package/dist/cjs/sd-table.cjs.entry.js +14 -12
- package/dist/collection/components/sd-callout/sd-callout.css +2 -2
- package/dist/collection/components/sd-table/sd-table.css +3 -2
- package/dist/collection/components/sd-table/sd-table.js +13 -11
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -2
- package/dist/collection/utils/html/sanitize-inline-html.js +28 -2
- package/dist/components/p-BE4tnQ2Z.js +1 -0
- package/dist/components/{p-CwRItc2J.js → p-Bx9dlLbs.js} +1 -1
- package/dist/components/p-gqfJ-KUj.js +1 -0
- package/dist/components/sd-callout.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-c73cadc7.entry.js → p-1632a28d.entry.js} +1 -1
- package/dist/design-system/{p-bd4e5141.entry.js → p-8528ba1e.entry.js} +1 -1
- package/dist/design-system/p-BE4tnQ2Z.js +1 -0
- package/dist/design-system/{p-969665c0.entry.js → p-aa28712a.entry.js} +1 -1
- package/dist/design-system/{p-54086285.entry.js → p-cf685d90.entry.js} +1 -1
- package/dist/design-system/{p-78c2fd6d.entry.js → p-db826b91.entry.js} +1 -1
- package/dist/design-system/{p-2d3d25bd.entry.js → p-eb18d812.entry.js} +1 -1
- package/dist/esm/{sanitize-inline-html-DopVneZA.js → sanitize-inline-html-BE4tnQ2Z.js} +28 -2
- package/dist/esm/sd-callout.entry.js +2 -2
- package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +1 -1
- package/dist/esm/sd-guide.entry.js +1 -1
- package/dist/esm/sd-pagination_4.entry.js +0 -2
- package/dist/esm/sd-table.entry.js +14 -12
- package/hydrate/index.js +43 -17
- package/hydrate/index.mjs +43 -17
- package/package.json +1 -1
- package/dist/components/p-DopVneZA.js +0 -1
- package/dist/components/p-_zllPZMm.js +0 -1
- 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-
|
|
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:
|
|
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-
|
|
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-
|
|
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-
|
|
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` };
|
|
@@ -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:
|
|
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
|
|
832
|
-
?
|
|
833
|
-
|
|
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: '
|
|
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
|
-
'--
|
|
848
|
-
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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:
|
|
4
|
+
width: 100%;
|
|
5
5
|
}
|
|
6
6
|
sd-callout .sd-callout {
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
align-items: stretch;
|
|
9
|
-
width:
|
|
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);
|
|
@@ -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:
|
|
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(--
|
|
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
|
|
805
|
-
?
|
|
806
|
-
|
|
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: '
|
|
821
|
+
return (h(Host, { key: '57f92f3d10b928ca964c2ac9917f7dd64991591f', style: hostStyle }, h("div", { key: 'ea3de705492e1c6c7f99d251e9d6e07136c72ce1', class: "sd-table__container", style: {
|
|
819
822
|
'--table-width': this.width,
|
|
820
|
-
'--
|
|
821
|
-
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"))(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-
|
|
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,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-
|
|
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
|
|
1
|
+
import{S as s,d as o}from"./p-Bx9dlLbs.js";const p=s,r=o;export{p as SdConfirmModal,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as t,p as o,c as n,h as d,t as r}from"./p-pwNG5WaX.js";import{s}from"./p-DopVneZA.js";import{B as e,g as i,b as a,P as p,a as u,c as b,d as l}from"./p-CvfW21oo.js";import{s as h}from"./p-j2khhcHY.js";import{d as c}from"./p-DQj-S8AC.js";import{d as w}from"./p-DCFqtVBm.js";class g{static instance;activeDropdowns=new Set;static getInstance(){return void 0===g.instance&&(g.instance=new g),g.instance}register(t){this.activeDropdowns.add(t)}unregister(t){this.activeDropdowns.delete(t)}openDropdown(t){this.activeDropdowns.forEach((o=>{o!==t&&o.isOpen&&o.closeDropdown()}))}closeAllDropdowns(){this.activeDropdowns.forEach((t=>{t.isOpen&&t.closeDropdown()}))}}const m=g.getInstance(),v=class extends t{constructor(){super(!1)}documentClickHandler;documentKeydownHandler;initializeEvent(){m.register(this),this.initializeEventHandlers()}cleanupEvent(){m.unregister(this),this.cleanup()}initializeEventHandlers(){this.documentClickHandler=t=>this.handleDocumentClick(t),this.documentKeydownHandler=t=>this.handleDocumentKeydown(t)}addGlobalEventListeners(){this.documentClickHandler&&document.addEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.addEventListener("keydown",this.documentKeydownHandler)}removeGlobalEventListeners(){this.documentClickHandler&&document.removeEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.removeEventListener("keydown",this.documentKeydownHandler)}onDropdownToggle(t){t&&!this.disabled?(m.openDropdown(this),this.addGlobalEventListeners()):this.removeGlobalEventListeners()}cleanup(){this.removeGlobalEventListeners()}closeDropdown(){this.isOpen=!1}},_=(()=>{const t=Object.keys(e).filter((t=>!t.endsWith("_lg")));return Object.fromEntries(t.map((t=>[t,e[t]])))})(),x=b,f=u,y=p,C={primary:a.button.dropdown.brand.strong.split,secondary:a.button.dropdown.brand.subtle.split,primary_outline:y.primary_outline,neutral_outline:y.neutral_outline,danger:a.button.dropdown.danger.strong.split,danger_outline:y.danger_outline},k=h.color.fg.secondary,E=h.color.bg.accent.default,D=h.color.fg.inverse,z={primary:k,secondary:k,primary_outline:k,neutral_outline:k,danger:k,danger_outline:k},O={primary:E,secondary:E,primary_outline:E,neutral_outline:E,danger:E,danger_outline:E},F={primary:D,secondary:D,primary_outline:D,neutral_outline:D,danger:D,danger_outline:D},A={xs:12,sm:12,md:16},j=a.button.bg.disabled,T=a.button.text.disabled,I=a.button.border.disabled,S=t=>i(t),N=o(class t extends v{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.click=n(this,"sdClick",7),this.buttonClick=n(this,"sdButtonClick",7),this.dropDownShow=n(this,"sdDropDownShow",7)}get el(){return this}name="primary_sm";label="";items=[];disabled=!1;split=!1;static CLOSE_ANIMATION_DURATION=150;isOpen=!1;isAnimatingOut=!1;itemIndex=-1;triggerRef;menuRef;closeAnimationTimer;click;buttonClick;dropDownShow;handleOpenChange(t){this.onDropdownToggle(t),this.dropDownShow.emit({isOpen:t}),t||(this.itemIndex=-1)}componentWillLoad(){this.initializeEvent()}disconnectedCallback(){this.cleanupEvent(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}async sdOpen(){this.disabled||0===this.items.length||(this.isOpen=!0)}async sdClose(){this.closeDropdown()}closeDropdown=()=>{this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))};handleDocumentClick(t){const o=t.target;o&&(this.el.contains(o)||this.menuRef?.contains(o)||this.closeDropdown())}handleDocumentKeydown(t){if(this.isOpen&&["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.stopPropagation(),t.key){case"ArrowDown":this.itemIndex=this.getNextEnabledIndex(1);break;case"ArrowUp":this.itemIndex=this.getNextEnabledIndex(-1);break;case"Enter":if(this.itemIndex<0)return;this.selectItem(this.items[this.itemIndex]);break;case"Escape":this.closeDropdown()}}get resolvedName(){if(!(()=>this.name in _)())throw Error(`Invalid sd-dropdown-button name: "${this.name}"`);return this.name}get resolvedConfig(){const t=this.resolvedName;return{config:_[t],preset:S(t)}}getNextEnabledIndex(t){const o=this.items.reduce(((t,o,n)=>(o.disabled||t.push(n),t)),[]);if(0===o.length)return-1;const n=o.indexOf(this.itemIndex);return-1===n?1===t?o[0]:o[o.length-1]:o[(n+t+o.length)%o.length]}toggleDropdown=t=>{t.stopPropagation(),this.disabled||0===this.items.length||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleButtonClick=t=>{t.stopPropagation(),this.disabled||(this.buttonClick.emit(),this.closeDropdown())};selectItem(t,o){o?.stopPropagation(),t&&!t.disabled&&(this.click.emit(t.value),this.closeDropdown())}getTriggerClasses(t,o,n,d,r){const s=["sd-dropdown-button__trigger","sd-dropdown-button__trigger--"+t,"sd-dropdown-button__trigger--"+o];return n&&s.push("sd-dropdown-button__trigger--disabled"),d&&s.push("sd-dropdown-button__trigger--open"),void 0!==r&&s.push(`sd-dropdown-button__trigger--${r}-part`),s.join(" ")}getTriggerStyle(t,o){return{"--sd-dropdown-button-bg":t.color,"--sd-dropdown-button-bg-hover":x[o],"--sd-dropdown-button-border":y[o],"--sd-dropdown-button-content":f[o],"--sd-dropdown-button-divider":C[o],"--sd-dropdown-button-accent":l,"--sd-dropdown-button-disabled-bg":j,"--sd-dropdown-button-disabled-content":T,"--sd-dropdown-button-disabled-border":I}}getMenuItemClasses(t,o){const n=["sd-dropdown-button__menu-item"];return t&&n.push("sd-dropdown-button__menu-item--active"),o&&n.push("sd-dropdown-button__menu-item--disabled"),n.join(" ")}renderDropdown(t){return(this.isOpen||this.isAnimatingOut)&&this.triggerRef?d("sd-portal",{open:this.isOpen,parentRef:this.triggerRef,onSdClose:this.closeDropdown},d("div",{style:{position:"absolute",width:"0px",height:"0px"}},d("div",{class:"sd-dropdown-button__menu",role:"menu",ref:t=>this.menuRef=t,style:{"--sd-dropdown-button-menu-min-width":this.triggerRef.offsetWidth+"px","--sd-dropdown-button-menu-item-color":z[t],"--sd-dropdown-button-menu-item-active-bg":O[t],"--sd-dropdown-button-menu-item-active-color":F[t],"--sd-dropdown-button-menu-border":"transparent"===y[t]?C[t]:y[t]}},this.items.map(((t,o)=>d("button",{type:"button",role:"menuitem",class:this.getMenuItemClasses(this.itemIndex===o&&!t.disabled,!!t.disabled),disabled:t.disabled,onClick:o=>this.selectItem(t,o),onMouseEnter:()=>{t.disabled||(this.itemIndex=o)}},t.icon&&d("sd-icon",{class:"sd-dropdown-button__menu-item-icon",name:t.icon,size:12,color:"var(--sd-dropdown-button-menu-item-current-color)"}),d("span",{class:"sd-dropdown-button__menu-item-label",innerHTML:s(t.label)}))))))):null}renderChevron(t){return d("span",{class:{"sd-dropdown-button__trigger-icon":!0,"sd-dropdown-button__trigger-icon--open":this.isOpen&&!this.split},"aria-hidden":"true"},d("sd-icon",{name:this.split?"etc":"caretDown",size:A[t],color:"var(--sd-dropdown-button-current-content)"}))}render(){const{config:t,preset:o}=this.resolvedConfig,n=this.getTriggerStyle(t,o);return this.split?d("div",{class:"sd-dropdown-button sd-dropdown-button--split"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"label"),disabled:this.disabled,onClick:this.handleButtonClick,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label)),d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"chevron"),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"","aria-label":"dropdown toggle",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},this.renderChevron(t.size)),this.renderDropdown(o)):d("div",{class:"sd-dropdown-button"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label),this.renderChevron(t.size)),this.renderDropdown(o))}static get watchers(){return{isOpen:[{handleOpenChange:0}]}}static get style(){return"sd-dropdown-button{display:inline-flex;width:fit-content;height:fit-content}.sd-dropdown-button{display:inline-flex;position:relative}.sd-dropdown-button__trigger{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-dropdown-button-bg:#025497;--sd-dropdown-button-bg-hover:#004177;--sd-dropdown-button-border:transparent;--sd-dropdown-button-content:#FFFFFF;--sd-dropdown-button-current-content:var(--sd-dropdown-button-content);--sd-dropdown-button-divider:#006AC1;--sd-dropdown-button-accent:#0075FF;--sd-dropdown-button-disabled-bg:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-dropdown-button-disabled-content:var(--sd-button-button-text-disabled, #888888);--sd-dropdown-button-disabled-border:var(--sd-button-button-border-disabled, #CCCCCC);display:inline-flex;align-items:stretch;justify-content:space-between;min-height:var(--sd-dropdown-button-height);padding:0;border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-dropdown-button-bg);color:var(--sd-dropdown-button-current-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-dropdown-button-font-family);font-size:var(--sd-dropdown-button-font-size);font-weight:var(--sd-dropdown-button-font-weight);line-height:1;text-decoration:var(--sd-dropdown-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap}.sd-dropdown-button__trigger:hover:not(.sd-dropdown-button__trigger--disabled){background:var(--sd-dropdown-button-bg-hover)}.sd-dropdown-button__trigger:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-dropdown-button-accent)}.sd-dropdown-button__trigger--xs{--sd-dropdown-button-height:var(--sd-button-button-xs-height, 24px);--sd-dropdown-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-dropdown-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-dropdown-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-xs-typography-text-decoration, none )}.sd-dropdown-button__trigger--sm{--sd-dropdown-button-height:var(--sd-button-button-sm-height, 28px);--sd-dropdown-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-dropdown-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-dropdown-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-sm-typography-text-decoration, none )}.sd-dropdown-button__trigger--md{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-md-typography-text-decoration, none );border-radius:var(--sd-button-button-radius-md, 6px)}.sd-dropdown-button__trigger--disabled{border-color:var(--sd-dropdown-button-disabled-border);background:var(--sd-dropdown-button-disabled-bg);--sd-dropdown-button-current-content:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger{gap:var(--sd-dropdown-button-gap);padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-label{padding:0}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-icon{min-width:0;padding:0}.sd-dropdown-button--split{display:inline-flex;align-items:stretch}.sd-dropdown-button--split .sd-dropdown-button__trigger--label-part{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part{border-top-left-radius:0;border-bottom-left-radius:0;border-left:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-divider)}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part.sd-dropdown-button__trigger--disabled{border-left-color:var(--sd-dropdown-button-disabled-border)}.sd-dropdown-button__trigger-label,.sd-dropdown-button__trigger-icon{display:inline-flex;align-items:center;justify-content:center}.sd-dropdown-button__trigger-label{flex:1 1 auto;min-width:0;padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button__trigger-icon{flex:0 0 auto;min-width:calc(var(--sd-dropdown-button-height) - 2px);padding:0 calc(var(--sd-dropdown-button-gap) + 2px);transition:transform 0.2s ease}.sd-dropdown-button__trigger-icon--open{transform:rotate(180deg)}.sd-dropdown-button__menu{position:relative;display:grid;width:max-content;min-width:var(--sd-dropdown-button-menu-min-width, max-content);max-width:calc(100vw - 24px);padding:4px 0;border:0;border-radius:4px;background:#FFFFFF;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1019607843);box-sizing:border-box;overflow:hidden}.sd-dropdown-button__menu-item{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-color);display:inline-flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--sd-dropdown-button-menu-item-current-color);cursor:pointer;box-sizing:border-box;font:inherit;text-align:left;transition:background-color 0.15s ease, color 0.15s ease}.sd-dropdown-button__menu-item--active{background:var(--sd-dropdown-button-menu-item-active-bg);--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-active-color)}.sd-dropdown-button__menu-item--disabled{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__menu-item-icon{flex:0 0 auto}.sd-dropdown-button__menu-item-label{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;font-size:12px}"}},[512,"sd-dropdown-button",{name:[1],label:[1],items:[16],disabled:[4],split:[4],isOpen:[32],isAnimatingOut:[32],itemIndex:[32],sdOpen:[64],sdClose:[64]},void 0,{isOpen:[{handleOpenChange:0}]}]),H=N,L=function(){"undefined"!=typeof customElements&&["sd-dropdown-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-dropdown-button":customElements.get(r(t))||customElements.define(r(t),N);break;case"sd-icon":customElements.get(r(t))||c();break;case"sd-portal":customElements.get(r(t))||w()}}))};export{H as SdDropdownButton,L as defineCustomElement}
|
|
1
|
+
import{H as t,p as o,c as n,h as d,t as r}from"./p-pwNG5WaX.js";import{s}from"./p-BE4tnQ2Z.js";import{B as e,g as i,b as a,P as u,a as p,c as b,d as l}from"./p-CvfW21oo.js";import{s as h}from"./p-j2khhcHY.js";import{d as c}from"./p-DQj-S8AC.js";import{d as w}from"./p-DCFqtVBm.js";class g{static instance;activeDropdowns=new Set;static getInstance(){return void 0===g.instance&&(g.instance=new g),g.instance}register(t){this.activeDropdowns.add(t)}unregister(t){this.activeDropdowns.delete(t)}openDropdown(t){this.activeDropdowns.forEach((o=>{o!==t&&o.isOpen&&o.closeDropdown()}))}closeAllDropdowns(){this.activeDropdowns.forEach((t=>{t.isOpen&&t.closeDropdown()}))}}const m=g.getInstance(),v=class extends t{constructor(){super(!1)}documentClickHandler;documentKeydownHandler;initializeEvent(){m.register(this),this.initializeEventHandlers()}cleanupEvent(){m.unregister(this),this.cleanup()}initializeEventHandlers(){this.documentClickHandler=t=>this.handleDocumentClick(t),this.documentKeydownHandler=t=>this.handleDocumentKeydown(t)}addGlobalEventListeners(){this.documentClickHandler&&document.addEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.addEventListener("keydown",this.documentKeydownHandler)}removeGlobalEventListeners(){this.documentClickHandler&&document.removeEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.removeEventListener("keydown",this.documentKeydownHandler)}onDropdownToggle(t){t&&!this.disabled?(m.openDropdown(this),this.addGlobalEventListeners()):this.removeGlobalEventListeners()}cleanup(){this.removeGlobalEventListeners()}closeDropdown(){this.isOpen=!1}},_=(()=>{const t=Object.keys(e).filter((t=>!t.endsWith("_lg")));return Object.fromEntries(t.map((t=>[t,e[t]])))})(),x=b,f=p,y=u,C={primary:a.button.dropdown.brand.strong.split,secondary:a.button.dropdown.brand.subtle.split,primary_outline:y.primary_outline,neutral_outline:y.neutral_outline,danger:a.button.dropdown.danger.strong.split,danger_outline:y.danger_outline},k=h.color.fg.secondary,E=h.color.bg.accent.default,D=h.color.fg.inverse,z={primary:k,secondary:k,primary_outline:k,neutral_outline:k,danger:k,danger_outline:k},O={primary:E,secondary:E,primary_outline:E,neutral_outline:E,danger:E,danger_outline:E},F={primary:D,secondary:D,primary_outline:D,neutral_outline:D,danger:D,danger_outline:D},A={xs:12,sm:12,md:16},j=a.button.bg.disabled,T=a.button.text.disabled,I=a.button.border.disabled,S=t=>i(t),N=o(class t extends v{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.click=n(this,"sdClick",7),this.buttonClick=n(this,"sdButtonClick",7),this.dropDownShow=n(this,"sdDropDownShow",7)}get el(){return this}name="primary_sm";label="";items=[];disabled=!1;split=!1;static CLOSE_ANIMATION_DURATION=150;isOpen=!1;isAnimatingOut=!1;itemIndex=-1;triggerRef;menuRef;closeAnimationTimer;click;buttonClick;dropDownShow;handleOpenChange(t){this.onDropdownToggle(t),this.dropDownShow.emit({isOpen:t}),t||(this.itemIndex=-1)}componentWillLoad(){this.initializeEvent()}disconnectedCallback(){this.cleanupEvent(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}async sdOpen(){this.disabled||0===this.items.length||(this.isOpen=!0)}async sdClose(){this.closeDropdown()}closeDropdown=()=>{this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))};handleDocumentClick(t){const o=t.target;o&&(this.el.contains(o)||this.menuRef?.contains(o)||this.closeDropdown())}handleDocumentKeydown(t){if(this.isOpen&&["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.stopPropagation(),t.key){case"ArrowDown":this.itemIndex=this.getNextEnabledIndex(1);break;case"ArrowUp":this.itemIndex=this.getNextEnabledIndex(-1);break;case"Enter":if(this.itemIndex<0)return;this.selectItem(this.items[this.itemIndex]);break;case"Escape":this.closeDropdown()}}get resolvedName(){if(!(()=>this.name in _)())throw Error(`Invalid sd-dropdown-button name: "${this.name}"`);return this.name}get resolvedConfig(){const t=this.resolvedName;return{config:_[t],preset:S(t)}}getNextEnabledIndex(t){const o=this.items.reduce(((t,o,n)=>(o.disabled||t.push(n),t)),[]);if(0===o.length)return-1;const n=o.indexOf(this.itemIndex);return-1===n?1===t?o[0]:o[o.length-1]:o[(n+t+o.length)%o.length]}toggleDropdown=t=>{t.stopPropagation(),this.disabled||0===this.items.length||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleButtonClick=t=>{t.stopPropagation(),this.disabled||(this.buttonClick.emit(),this.closeDropdown())};selectItem(t,o){o?.stopPropagation(),t&&!t.disabled&&(this.click.emit(t.value),this.closeDropdown())}getTriggerClasses(t,o,n,d,r){const s=["sd-dropdown-button__trigger","sd-dropdown-button__trigger--"+t,"sd-dropdown-button__trigger--"+o];return n&&s.push("sd-dropdown-button__trigger--disabled"),d&&s.push("sd-dropdown-button__trigger--open"),void 0!==r&&s.push(`sd-dropdown-button__trigger--${r}-part`),s.join(" ")}getTriggerStyle(t,o){return{"--sd-dropdown-button-bg":t.color,"--sd-dropdown-button-bg-hover":x[o],"--sd-dropdown-button-border":y[o],"--sd-dropdown-button-content":f[o],"--sd-dropdown-button-divider":C[o],"--sd-dropdown-button-accent":l,"--sd-dropdown-button-disabled-bg":j,"--sd-dropdown-button-disabled-content":T,"--sd-dropdown-button-disabled-border":I}}getMenuItemClasses(t,o){const n=["sd-dropdown-button__menu-item"];return t&&n.push("sd-dropdown-button__menu-item--active"),o&&n.push("sd-dropdown-button__menu-item--disabled"),n.join(" ")}renderDropdown(t){return(this.isOpen||this.isAnimatingOut)&&this.triggerRef?d("sd-portal",{open:this.isOpen,parentRef:this.triggerRef,onSdClose:this.closeDropdown},d("div",{style:{position:"absolute",width:"0px",height:"0px"}},d("div",{class:"sd-dropdown-button__menu",role:"menu",ref:t=>this.menuRef=t,style:{"--sd-dropdown-button-menu-min-width":this.triggerRef.offsetWidth+"px","--sd-dropdown-button-menu-item-color":z[t],"--sd-dropdown-button-menu-item-active-bg":O[t],"--sd-dropdown-button-menu-item-active-color":F[t],"--sd-dropdown-button-menu-border":"transparent"===y[t]?C[t]:y[t]}},this.items.map(((t,o)=>d("button",{type:"button",role:"menuitem",class:this.getMenuItemClasses(this.itemIndex===o&&!t.disabled,!!t.disabled),disabled:t.disabled,onClick:o=>this.selectItem(t,o),onMouseEnter:()=>{t.disabled||(this.itemIndex=o)}},t.icon&&d("sd-icon",{class:"sd-dropdown-button__menu-item-icon",name:t.icon,size:12,color:"var(--sd-dropdown-button-menu-item-current-color)"}),d("span",{class:"sd-dropdown-button__menu-item-label",innerHTML:s(t.label)}))))))):null}renderChevron(t){return d("span",{class:{"sd-dropdown-button__trigger-icon":!0,"sd-dropdown-button__trigger-icon--open":this.isOpen&&!this.split},"aria-hidden":"true"},d("sd-icon",{name:this.split?"etc":"caretDown",size:A[t],color:"var(--sd-dropdown-button-current-content)"}))}render(){const{config:t,preset:o}=this.resolvedConfig,n=this.getTriggerStyle(t,o);return this.split?d("div",{class:"sd-dropdown-button sd-dropdown-button--split"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"label"),disabled:this.disabled,onClick:this.handleButtonClick,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label)),d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"chevron"),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"","aria-label":"dropdown toggle",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},this.renderChevron(t.size)),this.renderDropdown(o)):d("div",{class:"sd-dropdown-button"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label),this.renderChevron(t.size)),this.renderDropdown(o))}static get watchers(){return{isOpen:[{handleOpenChange:0}]}}static get style(){return"sd-dropdown-button{display:inline-flex;width:fit-content;height:fit-content}.sd-dropdown-button{display:inline-flex;position:relative}.sd-dropdown-button__trigger{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-dropdown-button-bg:#025497;--sd-dropdown-button-bg-hover:#004177;--sd-dropdown-button-border:transparent;--sd-dropdown-button-content:#FFFFFF;--sd-dropdown-button-current-content:var(--sd-dropdown-button-content);--sd-dropdown-button-divider:#006AC1;--sd-dropdown-button-accent:#0075FF;--sd-dropdown-button-disabled-bg:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-dropdown-button-disabled-content:var(--sd-button-button-text-disabled, #888888);--sd-dropdown-button-disabled-border:var(--sd-button-button-border-disabled, #CCCCCC);display:inline-flex;align-items:stretch;justify-content:space-between;min-height:var(--sd-dropdown-button-height);padding:0;border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-dropdown-button-bg);color:var(--sd-dropdown-button-current-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-dropdown-button-font-family);font-size:var(--sd-dropdown-button-font-size);font-weight:var(--sd-dropdown-button-font-weight);line-height:1;text-decoration:var(--sd-dropdown-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap}.sd-dropdown-button__trigger:hover:not(.sd-dropdown-button__trigger--disabled){background:var(--sd-dropdown-button-bg-hover)}.sd-dropdown-button__trigger:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-dropdown-button-accent)}.sd-dropdown-button__trigger--xs{--sd-dropdown-button-height:var(--sd-button-button-xs-height, 24px);--sd-dropdown-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-dropdown-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-dropdown-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-xs-typography-text-decoration, none )}.sd-dropdown-button__trigger--sm{--sd-dropdown-button-height:var(--sd-button-button-sm-height, 28px);--sd-dropdown-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-dropdown-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-dropdown-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-sm-typography-text-decoration, none )}.sd-dropdown-button__trigger--md{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-md-typography-text-decoration, none );border-radius:var(--sd-button-button-radius-md, 6px)}.sd-dropdown-button__trigger--disabled{border-color:var(--sd-dropdown-button-disabled-border);background:var(--sd-dropdown-button-disabled-bg);--sd-dropdown-button-current-content:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger{gap:var(--sd-dropdown-button-gap);padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-label{padding:0}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-icon{min-width:0;padding:0}.sd-dropdown-button--split{display:inline-flex;align-items:stretch}.sd-dropdown-button--split .sd-dropdown-button__trigger--label-part{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part{border-top-left-radius:0;border-bottom-left-radius:0;border-left:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-divider)}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part.sd-dropdown-button__trigger--disabled{border-left-color:var(--sd-dropdown-button-disabled-border)}.sd-dropdown-button__trigger-label,.sd-dropdown-button__trigger-icon{display:inline-flex;align-items:center;justify-content:center}.sd-dropdown-button__trigger-label{flex:1 1 auto;min-width:0;padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button__trigger-icon{flex:0 0 auto;min-width:calc(var(--sd-dropdown-button-height) - 2px);padding:0 calc(var(--sd-dropdown-button-gap) + 2px);transition:transform 0.2s ease}.sd-dropdown-button__trigger-icon--open{transform:rotate(180deg)}.sd-dropdown-button__menu{position:relative;display:grid;width:max-content;min-width:var(--sd-dropdown-button-menu-min-width, max-content);max-width:calc(100vw - 24px);padding:4px 0;border:0;border-radius:4px;background:#FFFFFF;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1019607843);box-sizing:border-box;overflow:hidden}.sd-dropdown-button__menu-item{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-color);display:inline-flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--sd-dropdown-button-menu-item-current-color);cursor:pointer;box-sizing:border-box;font:inherit;text-align:left;transition:background-color 0.15s ease, color 0.15s ease}.sd-dropdown-button__menu-item--active{background:var(--sd-dropdown-button-menu-item-active-bg);--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-active-color)}.sd-dropdown-button__menu-item--disabled{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__menu-item-icon{flex:0 0 auto}.sd-dropdown-button__menu-item-label{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;font-size:12px}"}},[512,"sd-dropdown-button",{name:[1],label:[1],items:[16],disabled:[4],split:[4],isOpen:[32],isAnimatingOut:[32],itemIndex:[32],sdOpen:[64],sdClose:[64]},void 0,{isOpen:[{handleOpenChange:0}]}]),B=N,H=function(){"undefined"!=typeof customElements&&["sd-dropdown-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-dropdown-button":customElements.get(r(t))||customElements.define(r(t),N);break;case"sd-icon":customElements.get(r(t))||c();break;case"sd-portal":customElements.get(r(t))||w()}}))};export{B as SdDropdownButton,H as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,t as o}from"./p-pwNG5WaX.js";import{s as d}from"./p-j2khhcHY.js";import{s as n}from"./p-DopVneZA.js";import{d as s}from"./p-B6L3bPm2.js";import{d as u}from"./p-DhtKHJ7-.js";import{d as g}from"./p-DQj-S8AC.js";import{d as a}from"./p-DCFqtVBm.js";const{button:p,contents:r}={button:{height:"28",paddingX:"12",radius:"9999",gap:"6",typography:{fontSize:"12",fontWeight:"500",lineHeight:"20"},icon:{default:"#00973C",active:"#FFFFFF"},border:{width:"1",default:"#E1E1E1"},bg:{default:"#FFFFFF",tip:"#00973C",notion:"#1F8AE1"},text:{default:"#222222",active:"#FFFFFF"}},contents:{paddingX:"24",paddingY:"20",gap:"12",title:{gap:"8"},row:{gap:"8"},body:{gap:"2"},typography:{title:{fontWeight:"700",fontSize:"16",lineHeight:"26"},body:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#222222"},icon:"#00973C",radius:"8"}},c=d.color.fg.primary,b={button:{height:p.height+"px",paddingX:p.paddingX+"px",radius:p.radius+"px",gap:p.gap+"px",fontSize:p.typography.fontSize+"px",fontWeight:p.typography.fontWeight,lineHeight:p.typography.lineHeight+"px",iconColorDefault:p.icon.default,iconColorActive:p.icon.active,iconColorNotion:c,borderWidth:p.border.width+"px",borderColor:p.border.default,bgDefault:p.bg.default,bgTip:p.bg.tip,bgNotion:p.bg.notion,textDefault:p.text.default,textActive:p.text.active},contents:{paddingX:r.paddingX+"px",paddingY:r.paddingY+"px",gap:r.gap+"px",rowGap:r.row.gap+"px",bodyGap:r.body.gap+"px",titleGap:r.title.gap+"px",radius:r.radius+"px",iconColor:r.icon,iconColorNotion:c,titleFontSize:r.typography.title.fontSize+"px",titleFontWeight:r.typography.title.fontWeight,titleLineHeight:r.typography.title.lineHeight+"px",bodyFontSize:r.typography.body.fontSize+"px",bodyFontWeight:r.typography.body.fontWeight,bodyLineHeight:r.typography.body.lineHeight+"px",textColor:r.typography.color}},l={tip:"활용 TIP",notion:"사용법 안내"},_={tip:"helpOutline",notion:"notion"},h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}type="tip";label="";message="";url="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"notion"!==this.type?this.popupShow=!this.popupShow:""!==this.url&&window.open(this.url,"_blank","noopener,noreferrer")};closeDropdown=()=>{this.popupShow=!1};get guideStyle(){const{button:t,contents:e}=b;return{"--sd-guide-button-height":t.height,"--sd-guide-button-padding-x":t.paddingX,"--sd-guide-button-radius":t.radius,"--sd-guide-button-gap":t.gap,"--sd-guide-button-font-size":t.fontSize,"--sd-guide-button-font-weight":t.fontWeight,"--sd-guide-button-line-height":t.lineHeight,"--sd-guide-button-border-width":t.borderWidth,"--sd-guide-button-border-color":t.borderColor,"--sd-guide-button-bg-default":t.bgDefault,"--sd-guide-button-bg-tip":t.bgTip,"--sd-guide-button-bg-notion":t.bgNotion,"--sd-guide-button-text-default":t.textDefault,"--sd-guide-button-text-active":t.textActive,"--sd-guide-button-icon-color-default":t.iconColorDefault,"--sd-guide-button-icon-color-active":t.iconColorActive,"--sd-guide-button-icon-color-notion":t.iconColorNotion,"--sd-guide-contents-padding-x":e.paddingX,"--sd-guide-contents-padding-y":e.paddingY,"--sd-guide-contents-gap":e.gap,"--sd-guide-contents-row-gap":e.rowGap,"--sd-guide-contents-body-gap":e.bodyGap,"--sd-guide-contents-title-gap":e.titleGap,"--sd-guide-contents-radius":e.radius,"--sd-guide-contents-title-font-size":e.titleFontSize,"--sd-guide-contents-title-font-weight":e.titleFontWeight,"--sd-guide-contents-title-line-height":e.titleLineHeight,"--sd-guide-contents-body-font-size":e.bodyFontSize,"--sd-guide-contents-body-font-weight":e.bodyFontWeight,"--sd-guide-contents-body-line-height":e.bodyLineHeight,"--sd-guide-contents-text-color":e.textColor}}render(){const{contents:t}=b,e=this.popupShow,o=l[this.type??"tip"],d=_[this.type??"tip"],n="notion"===(this.type??"tip")?t.iconColorNotion:t.iconColor,s=["sd-guide__button","sd-guide__button--type-"+(this.type??"tip")];return e&&s.push("sd-guide__button--active"),i("div",{key:"ea4f220faf6165f7650360f74a19d9f781b81489",class:"sd-guide",style:this.guideStyle},i("sd-button",{key:"c90eaa6cc42a9a2f20b8fc79db16697db0cf2ff2",ref:t=>this.guideRef=t,class:s.join(" "),name:e?"primary_sm":"neutral_outline_sm",label:this.label||o,icon:d,onSdClick:this.handleClickGuide}),this.popupShow&&i("sd-portal",{key:"21f57a739141ffa36f3b799a2688ca5b3c1bd428",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},i("div",{key:"94e12fa797748a02334b97e13c5012ab95bc2bce",class:"sd-guide__popup",style:{...this.guideStyle,width:null!=this.popupWidth?this.popupWidth+"px":"426px"}},i("sd-ghost-button",{key:"6fc71032016e7a3be0581508ef0ecc6772981185",class:"sd-guide__popup__close",icon:"close",ariaLabel:"close",size:"sm",onSdClick:this.closeDropdown}),i("div",{key:"385c0c18bc888be6a654525dc6f4359a56ad6de9",class:"sd-guide__popup__header"},i("sd-icon",{key:"34624d2ac3397ba15b2dc7ba23dc460a87cb878b",name:d,size:24,color:n}),i("h3",{key:"dd3527ec329698b0fd1ec82f2a7d0cf5865802c2",class:"sd-guide__popup__title"},this.popupTitle||o)),i("ul",{key:"429357d0203acdf31177353ceb45d9ac41fadae7",class:"sd-guide__popup__list"},this.renderListItem(this.message)))))}renderListItem(t,e=0){const i=[];if(Array.isArray(t)){const o=t.map((t=>this.renderListItem(t,e+1)));i.push(...o.flat())}else i.push(this.renderLi(t,e));return i}renderLi=(t,e)=>i("li",{class:"sd-guide__popup__list__item sd-guide__popup__list__item--depth-"+e},i("p",{innerHTML:n(t)}));static get style(){return'@charset "UTF-8";sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide .sd-guide__button .sd-button{min-height:var(--sd-guide-button-height);padding:0 var(--sd-guide-button-padding-x);border-radius:var(--sd-guide-button-radius);border:var(--sd-guide-button-border-width) solid var(--sd-guide-button-border-color);background:var(--sd-guide-button-bg-default);color:var(--sd-guide-button-text-default) !important;transition:none;display:flex;align-items:center;gap:var(--sd-guide-button-gap);--sd-button-bg-hover:var(--sd-guide-button-bg-default);--sd-button-current-icon:var(--sd-guide-button-icon-color-default)}.sd-guide .sd-guide__button .sd-button .sd-button__content{color:var(--sd-guide-button-text-default) !important;gap:var(--sd-guide-button-gap)}.sd-guide .sd-guide__button .sd-button .sd-button__content .sd-button__label{margin-left:0;color:var(--sd-guide-button-text-default) !important;font-size:var(--sd-guide-button-font-size);font-weight:var(--sd-guide-button-font-weight);line-height:var(--sd-guide-button-line-height)}.sd-guide .sd-guide__button--type-notion .sd-button{--sd-button-current-icon:var(--sd-guide-button-icon-color-notion)}.sd-guide .sd-guide__button--active .sd-button{color:var(--sd-guide-button-text-active) !important;--sd-button-current-icon:var(--sd-guide-button-icon-color-active)}.sd-guide .sd-guide__button--active .sd-button .sd-button__content{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--active .sd-button .sd-button__content .sd-button__label{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--type-tip.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-tip);border-color:var(--sd-guide-button-bg-tip);--sd-button-bg-hover:var(--sd-guide-button-bg-tip)}.sd-guide .sd-guide__button--type-notion.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-notion);border-color:var(--sd-guide-button-bg-notion);--sd-button-bg-hover:var(--sd-guide-button-bg-notion)}.sd-guide__popup{position:relative;padding:var(--sd-guide-contents-padding-y) var(--sd-guide-contents-padding-x);border-radius:var(--sd-guide-contents-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:var(--sd-guide-contents-title-gap);margin-bottom:var(--sd-guide-contents-gap)}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;margin-bottom:0;font-size:var(--sd-guide-contents-title-font-size);font-weight:var(--sd-guide-contents-title-font-weight);line-height:var(--sd-guide-contents-title-line-height);color:var(--sd-guide-contents-text-color)}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height)}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height);margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-1:not(:first-child){margin-top:var(--sd-guide-contents-row-gap)}.sd-guide__popup__list__item--depth-2{margin-top:var(--sd-guide-contents-body-gap)}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}'}},[512,"sd-guide",{type:[513],label:[513],message:[1],url:[1],popupTitle:[1,"popup-title"],popupWidth:[2,"popup-width"],popupShow:[32]}]),f=h,m=function(){"undefined"!=typeof customElements&&["sd-guide","sd-button","sd-ghost-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-guide":customElements.get(o(t))||customElements.define(o(t),h);break;case"sd-button":customElements.get(o(t))||s();break;case"sd-ghost-button":customElements.get(o(t))||u();break;case"sd-icon":customElements.get(o(t))||g();break;case"sd-portal":customElements.get(o(t))||a()}}))};export{f as SdGuide,m as defineCustomElement}
|
|
1
|
+
import{p as t,H as e,h as i,t as o}from"./p-pwNG5WaX.js";import{s as d}from"./p-j2khhcHY.js";import{s as n}from"./p-BE4tnQ2Z.js";import{d as s}from"./p-B6L3bPm2.js";import{d as u}from"./p-DhtKHJ7-.js";import{d as g}from"./p-DQj-S8AC.js";import{d as a}from"./p-DCFqtVBm.js";const{button:p,contents:r}={button:{height:"28",paddingX:"12",radius:"9999",gap:"6",typography:{fontSize:"12",fontWeight:"500",lineHeight:"20"},icon:{default:"#00973C",active:"#FFFFFF"},border:{width:"1",default:"#E1E1E1"},bg:{default:"#FFFFFF",tip:"#00973C",notion:"#1F8AE1"},text:{default:"#222222",active:"#FFFFFF"}},contents:{paddingX:"24",paddingY:"20",gap:"12",title:{gap:"8"},row:{gap:"8"},body:{gap:"2"},typography:{title:{fontWeight:"700",fontSize:"16",lineHeight:"26"},body:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#222222"},icon:"#00973C",radius:"8"}},c=d.color.fg.primary,b={button:{height:p.height+"px",paddingX:p.paddingX+"px",radius:p.radius+"px",gap:p.gap+"px",fontSize:p.typography.fontSize+"px",fontWeight:p.typography.fontWeight,lineHeight:p.typography.lineHeight+"px",iconColorDefault:p.icon.default,iconColorActive:p.icon.active,iconColorNotion:c,borderWidth:p.border.width+"px",borderColor:p.border.default,bgDefault:p.bg.default,bgTip:p.bg.tip,bgNotion:p.bg.notion,textDefault:p.text.default,textActive:p.text.active},contents:{paddingX:r.paddingX+"px",paddingY:r.paddingY+"px",gap:r.gap+"px",rowGap:r.row.gap+"px",bodyGap:r.body.gap+"px",titleGap:r.title.gap+"px",radius:r.radius+"px",iconColor:r.icon,iconColorNotion:c,titleFontSize:r.typography.title.fontSize+"px",titleFontWeight:r.typography.title.fontWeight,titleLineHeight:r.typography.title.lineHeight+"px",bodyFontSize:r.typography.body.fontSize+"px",bodyFontWeight:r.typography.body.fontWeight,bodyLineHeight:r.typography.body.lineHeight+"px",textColor:r.typography.color}},l={tip:"활용 TIP",notion:"사용법 안내"},_={tip:"helpOutline",notion:"notion"},h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}type="tip";label="";message="";url="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"notion"!==this.type?this.popupShow=!this.popupShow:""!==this.url&&window.open(this.url,"_blank","noopener,noreferrer")};closeDropdown=()=>{this.popupShow=!1};get guideStyle(){const{button:t,contents:e}=b;return{"--sd-guide-button-height":t.height,"--sd-guide-button-padding-x":t.paddingX,"--sd-guide-button-radius":t.radius,"--sd-guide-button-gap":t.gap,"--sd-guide-button-font-size":t.fontSize,"--sd-guide-button-font-weight":t.fontWeight,"--sd-guide-button-line-height":t.lineHeight,"--sd-guide-button-border-width":t.borderWidth,"--sd-guide-button-border-color":t.borderColor,"--sd-guide-button-bg-default":t.bgDefault,"--sd-guide-button-bg-tip":t.bgTip,"--sd-guide-button-bg-notion":t.bgNotion,"--sd-guide-button-text-default":t.textDefault,"--sd-guide-button-text-active":t.textActive,"--sd-guide-button-icon-color-default":t.iconColorDefault,"--sd-guide-button-icon-color-active":t.iconColorActive,"--sd-guide-button-icon-color-notion":t.iconColorNotion,"--sd-guide-contents-padding-x":e.paddingX,"--sd-guide-contents-padding-y":e.paddingY,"--sd-guide-contents-gap":e.gap,"--sd-guide-contents-row-gap":e.rowGap,"--sd-guide-contents-body-gap":e.bodyGap,"--sd-guide-contents-title-gap":e.titleGap,"--sd-guide-contents-radius":e.radius,"--sd-guide-contents-title-font-size":e.titleFontSize,"--sd-guide-contents-title-font-weight":e.titleFontWeight,"--sd-guide-contents-title-line-height":e.titleLineHeight,"--sd-guide-contents-body-font-size":e.bodyFontSize,"--sd-guide-contents-body-font-weight":e.bodyFontWeight,"--sd-guide-contents-body-line-height":e.bodyLineHeight,"--sd-guide-contents-text-color":e.textColor}}render(){const{contents:t}=b,e=this.popupShow,o=l[this.type??"tip"],d=_[this.type??"tip"],n="notion"===(this.type??"tip")?t.iconColorNotion:t.iconColor,s=["sd-guide__button","sd-guide__button--type-"+(this.type??"tip")];return e&&s.push("sd-guide__button--active"),i("div",{key:"ea4f220faf6165f7650360f74a19d9f781b81489",class:"sd-guide",style:this.guideStyle},i("sd-button",{key:"c90eaa6cc42a9a2f20b8fc79db16697db0cf2ff2",ref:t=>this.guideRef=t,class:s.join(" "),name:e?"primary_sm":"neutral_outline_sm",label:this.label||o,icon:d,onSdClick:this.handleClickGuide}),this.popupShow&&i("sd-portal",{key:"21f57a739141ffa36f3b799a2688ca5b3c1bd428",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},i("div",{key:"94e12fa797748a02334b97e13c5012ab95bc2bce",class:"sd-guide__popup",style:{...this.guideStyle,width:null!=this.popupWidth?this.popupWidth+"px":"426px"}},i("sd-ghost-button",{key:"6fc71032016e7a3be0581508ef0ecc6772981185",class:"sd-guide__popup__close",icon:"close",ariaLabel:"close",size:"sm",onSdClick:this.closeDropdown}),i("div",{key:"385c0c18bc888be6a654525dc6f4359a56ad6de9",class:"sd-guide__popup__header"},i("sd-icon",{key:"34624d2ac3397ba15b2dc7ba23dc460a87cb878b",name:d,size:24,color:n}),i("h3",{key:"dd3527ec329698b0fd1ec82f2a7d0cf5865802c2",class:"sd-guide__popup__title"},this.popupTitle||o)),i("ul",{key:"429357d0203acdf31177353ceb45d9ac41fadae7",class:"sd-guide__popup__list"},this.renderListItem(this.message)))))}renderListItem(t,e=0){const i=[];if(Array.isArray(t)){const o=t.map((t=>this.renderListItem(t,e+1)));i.push(...o.flat())}else i.push(this.renderLi(t,e));return i}renderLi=(t,e)=>i("li",{class:"sd-guide__popup__list__item sd-guide__popup__list__item--depth-"+e},i("p",{innerHTML:n(t)}));static get style(){return'@charset "UTF-8";sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide .sd-guide__button .sd-button{min-height:var(--sd-guide-button-height);padding:0 var(--sd-guide-button-padding-x);border-radius:var(--sd-guide-button-radius);border:var(--sd-guide-button-border-width) solid var(--sd-guide-button-border-color);background:var(--sd-guide-button-bg-default);color:var(--sd-guide-button-text-default) !important;transition:none;display:flex;align-items:center;gap:var(--sd-guide-button-gap);--sd-button-bg-hover:var(--sd-guide-button-bg-default);--sd-button-current-icon:var(--sd-guide-button-icon-color-default)}.sd-guide .sd-guide__button .sd-button .sd-button__content{color:var(--sd-guide-button-text-default) !important;gap:var(--sd-guide-button-gap)}.sd-guide .sd-guide__button .sd-button .sd-button__content .sd-button__label{margin-left:0;color:var(--sd-guide-button-text-default) !important;font-size:var(--sd-guide-button-font-size);font-weight:var(--sd-guide-button-font-weight);line-height:var(--sd-guide-button-line-height)}.sd-guide .sd-guide__button--type-notion .sd-button{--sd-button-current-icon:var(--sd-guide-button-icon-color-notion)}.sd-guide .sd-guide__button--active .sd-button{color:var(--sd-guide-button-text-active) !important;--sd-button-current-icon:var(--sd-guide-button-icon-color-active)}.sd-guide .sd-guide__button--active .sd-button .sd-button__content{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--active .sd-button .sd-button__content .sd-button__label{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--type-tip.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-tip);border-color:var(--sd-guide-button-bg-tip);--sd-button-bg-hover:var(--sd-guide-button-bg-tip)}.sd-guide .sd-guide__button--type-notion.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-notion);border-color:var(--sd-guide-button-bg-notion);--sd-button-bg-hover:var(--sd-guide-button-bg-notion)}.sd-guide__popup{position:relative;padding:var(--sd-guide-contents-padding-y) var(--sd-guide-contents-padding-x);border-radius:var(--sd-guide-contents-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:var(--sd-guide-contents-title-gap);margin-bottom:var(--sd-guide-contents-gap)}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;margin-bottom:0;font-size:var(--sd-guide-contents-title-font-size);font-weight:var(--sd-guide-contents-title-font-weight);line-height:var(--sd-guide-contents-title-line-height);color:var(--sd-guide-contents-text-color)}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height)}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height);margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-1:not(:first-child){margin-top:var(--sd-guide-contents-row-gap)}.sd-guide__popup__list__item--depth-2{margin-top:var(--sd-guide-contents-body-gap)}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}'}},[512,"sd-guide",{type:[513],label:[513],message:[1],url:[1],popupTitle:[1,"popup-title"],popupWidth:[2,"popup-width"],popupShow:[32]}]),f=h,m=function(){"undefined"!=typeof customElements&&["sd-guide","sd-button","sd-ghost-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-guide":customElements.get(o(t))||customElements.define(o(t),h);break;case"sd-button":customElements.get(o(t))||s();break;case"sd-ghost-button":customElements.get(o(t))||u();break;case"sd-icon":customElements.get(o(t))||g();break;case"sd-portal":customElements.get(o(t))||a()}}))};export{f as SdGuide,m as defineCustomElement}
|