@sellmate/design-system 1.0.41 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cjs/sd-button_20.cjs.entry.js +10 -2
  2. package/dist/cjs/sd-confirm-modal.cjs.entry.js +4 -4
  3. package/dist/cjs/sd-modal-container.cjs.entry.js +17 -9
  4. package/dist/cjs/sd-popover.cjs.entry.js +10 -2
  5. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +5 -5
  6. package/dist/collection/components/sd-modal-container/sd-modal-container.js +18 -10
  7. package/dist/collection/components/sd-popover/sd-popover.js +10 -2
  8. package/dist/collection/components/sd-tooltip/sd-tooltip.js +10 -2
  9. package/dist/components/{p-DGA1KNaL.js → p-AfdVu7_V.js} +1 -1
  10. package/dist/components/{p-CHq9aVFe.js → p-B2IPxQNl.js} +1 -1
  11. package/dist/components/{p-D6ayf5l7.js → p-BZJDhQ6h.js} +1 -1
  12. package/dist/components/p-CArAuWdh.js +1 -0
  13. package/dist/components/p-CnZPI5RL.js +1 -0
  14. package/dist/components/{p-DpqpugGF.js → p-jaHdAlr9.js} +1 -1
  15. package/dist/components/{p-DZ8T3piH.js → p-jk3tAdJg.js} +1 -1
  16. package/dist/components/sd-barcode-input.js +1 -1
  17. package/dist/components/sd-confirm-modal.js +1 -1
  18. package/dist/components/sd-date-picker.js +1 -1
  19. package/dist/components/sd-date-range-picker.js +1 -1
  20. package/dist/components/sd-field.js +1 -1
  21. package/dist/components/sd-input.js +1 -1
  22. package/dist/components/sd-modal-container.js +1 -1
  23. package/dist/components/sd-number-input.js +1 -1
  24. package/dist/components/sd-popover.js +1 -1
  25. package/dist/components/sd-select-dropdown.js +1 -1
  26. package/dist/components/sd-select-group.js +1 -1
  27. package/dist/components/sd-select-multiple-group.js +1 -1
  28. package/dist/components/sd-select-multiple.js +1 -1
  29. package/dist/components/sd-select-search-input.js +1 -1
  30. package/dist/components/sd-select-v2.js +1 -1
  31. package/dist/components/sd-select.js +1 -1
  32. package/dist/components/sd-table.js +1 -1
  33. package/dist/components/sd-tooltip.js +1 -1
  34. package/dist/design-system/design-system.esm.js +1 -1
  35. package/dist/design-system/{p-ae3b8832.entry.js → p-4921c569.entry.js} +1 -1
  36. package/dist/design-system/p-535b0778.entry.js +1 -0
  37. package/dist/design-system/p-6db4e8c7.entry.js +1 -0
  38. package/dist/design-system/p-f91f4fcc.entry.js +1 -0
  39. package/dist/esm/sd-button_20.entry.js +10 -2
  40. package/dist/esm/sd-confirm-modal.entry.js +4 -4
  41. package/dist/esm/sd-modal-container.entry.js +17 -9
  42. package/dist/esm/sd-popover.entry.js +10 -2
  43. package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +1 -1
  44. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +3 -0
  45. package/dist/types/components/sd-popover/sd-popover.d.ts +1 -0
  46. package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +1 -0
  47. package/dist/types/components.d.ts +2 -2
  48. package/hydrate/index.js +41 -17
  49. package/hydrate/index.mjs +41 -17
  50. package/package.json +1 -1
  51. package/dist/components/p-C4sDmQQ3.js +0 -1
  52. package/dist/components/p-Pdmk6q_e.js +0 -1
  53. package/dist/design-system/p-40614adb.entry.js +0 -1
  54. package/dist/design-system/p-a3c9d924.entry.js +0 -1
  55. package/dist/design-system/p-d63e0f4c.entry.js +0 -1
@@ -5136,6 +5136,14 @@ const SdTooltip = class {
5136
5136
  showTooltip = false;
5137
5137
  slotContentHTML = '';
5138
5138
  buttonEl;
5139
+ get tooltipOffset() {
5140
+ switch (this.placement) {
5141
+ case 'top': return [0, -4];
5142
+ case 'bottom': return [0, 4];
5143
+ case 'left': return [4, 0];
5144
+ case 'right': return [4, 0];
5145
+ }
5146
+ }
5139
5147
  handleClose = () => {
5140
5148
  this.showTooltip = false;
5141
5149
  };
@@ -5162,14 +5170,14 @@ const SdTooltip = class {
5162
5170
  : {
5163
5171
  onSdClick: () => (this.showTooltip = !this.showTooltip),
5164
5172
  };
5165
- return (index.h(index.Fragment, { key: '53edf89a07b59cc1f6f3b84cbba7f4b77c6819c7' }, this.label ? (index.h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-tooltip", ...buttonTrigger })) : (index.h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-tooltip", ...handleTrigger })), this.showTooltip && (index.h("sd-floating-portal", { key: '0011143fc06ea5bcf0b800bc4baabb06dd822911', parentRef: this.buttonEl, onSdClose: this.handleClose.bind(this), placement: this.placement }, index.h("div", { key: '5cd0ed3132d542436a951bf74784d0aa0cd8078d', class: {
5173
+ return (index.h(index.Fragment, { key: '2890811dd681299b155d191d6d6023441db6debc' }, this.label ? (index.h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-tooltip", ...buttonTrigger })) : (index.h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-tooltip", ...handleTrigger })), this.showTooltip && (index.h("sd-floating-portal", { key: '666cf59e0548af92eff225cd91b485824b82249d', parentRef: this.buttonEl, onSdClose: this.handleClose.bind(this), placement: this.placement, offset: this.tooltipOffset }, index.h("div", { key: 'ad5285750f95fdb0829372dd3b45d96035a02315', class: {
5166
5174
  'sd-floating-menu': true,
5167
5175
  [`sd-floating-menu--${this.tooltipType}`]: true,
5168
5176
  [`sd-floating-menu--${this.placement}`]: true,
5169
5177
  }, style: {
5170
5178
  '--sd-floating-bg': typeConfig.bg,
5171
5179
  '--sd-floating-content': typeConfig.content,
5172
- } }, index.h("i", { key: '9502962bbd9a95f04d0b6bef1e03c0c048515090', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, index.h(tooltipArrow.TooltipArrow, { key: 'b41486b3cecd413dd817b0a1384cfe9fb7255434' })), index.h("div", { key: 'ea15c6250d1b8dabc5c6ecf1b5c48674a877a3c4', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }))))));
5180
+ } }, index.h("i", { key: 'ee92f004dbd17de84a3410bd555da735c5fcb4ca', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, index.h(tooltipArrow.TooltipArrow, { key: '04ccadfa1de8bcf3b64218e6e048fcbf09ff3301' })), index.h("div", { key: '0534c8cec5c79c8b0df3950d554a1b62d1e3b32b', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }))))));
5173
5181
  }
5174
5182
  };
5175
5183
  SdTooltip.style = sdTooltipCss();
@@ -47,7 +47,7 @@ const SdConfirmModal = class {
47
47
  constructor(hostRef) {
48
48
  index.registerInstance(this, hostRef);
49
49
  this.close = index.createEvent(this, "sdClose");
50
- this.confirm = index.createEvent(this, "sdConfirm");
50
+ this.ok = index.createEvent(this, "sdOk");
51
51
  }
52
52
  get el() { return index.getElement(this); }
53
53
  hasSlottedContent = false;
@@ -66,7 +66,7 @@ const SdConfirmModal = class {
66
66
  slotLabel = '';
67
67
  tagContents;
68
68
  close;
69
- confirm;
69
+ ok;
70
70
  componentWillLoad() {
71
71
  this.syncHasSlottedContent();
72
72
  }
@@ -114,9 +114,9 @@ const SdConfirmModal = class {
114
114
  render() {
115
115
  const iconName = CONFIRM_MODAL_ICON_MAP[this.type];
116
116
  const iconColor = CONFIRM_MODAL_ICON_COLOR[this.type];
117
- return (index.h("div", { key: 'cbf103ed02ff04e90d1df1fffee08c572d9f5e18', class: "sd-confirm-modal" }, index.h("sd-icon", { key: 'dde88047b036420eb710b1edc22a72b0e5cdf784', class: "sd-confirm-modal__close-button", name: "close", size: CLOSE_ICON_SIZE, color: CLOSE_ICON_COLOR, onClick: () => this.close.emit() }), iconName && (index.h("sd-icon", { key: '84962276dc06729ef2d5212b615e6f309533c60c', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), index.h("h2", { key: 'd4f78a41131a2d4f71f74bbe899fcdd96a650adc', class: `sd-confirm-modal__title ${this.titleClass}` }, this.modalTitle), index.h("div", { key: 'd6019100eabbc46846c62d33d45f242f6f5fb899', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (index.h("div", { key: '97c659470421aa9a32aecedea185df11bd208e4e', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (index.h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (index.h("div", { key: 'e8bc08bf5fa5e73e65df7b0b18b54053491a5ddb', class: "sd-confirm-modal__content-box" }, this.tagContents ? (index.h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
117
+ return (index.h("div", { key: '9dd835c1020a29e99257690b5d4d6038b13fe5e4', class: "sd-confirm-modal" }, index.h("sd-icon", { key: '17fea9642aabb047a8017c37beffe3e0b64707c2', class: "sd-confirm-modal__close-button", name: "close", size: CLOSE_ICON_SIZE, color: CLOSE_ICON_COLOR, onClick: () => this.close.emit() }), iconName && (index.h("sd-icon", { key: '5198d65dbac64b483f63f8a65f7cad987a14e24b', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), index.h("h2", { key: '045887b2224ed46f4d6158a2d3ffc25261a0156d', class: `sd-confirm-modal__title ${this.titleClass}` }, this.modalTitle), index.h("div", { key: '7f9ce8c5bef7a8f9ee580671ccdb79c093066ee3', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (index.h("div", { key: 'ac533ca4a1dc011d0bbb0c5c72c14228f680741a', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (index.h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (index.h("div", { key: '2fde04429ca9efb0b9ae30116e9a0fd7f57b904e', class: "sd-confirm-modal__content-box" }, this.tagContents ? (index.h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
118
118
  this.customContentRef = el;
119
- } })) : (index.h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && index.h("sd-tag", { name: this.tagPreset, label: this.tagLabel }), this.slotLabel && (index.h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (index.h("div", { key: 'a45baf202c54267da618dead5b5f856eab5a50b2', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (index.h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), index.h("div", { key: '3249a262cf870671641cf57253995f5881718c53', class: "sd-confirm-modal__button" }, this.subButtonLabel && (index.h("sd-button-v2", { key: '18c42ded4eb94bf4059868ae7f8f18f94d238220', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.close.emit() })), index.h("sd-button-v2", { key: '4bc410cc5e9037fb7f5352910ac4fda0934bed38', name: this.resolvedMainButton, label: this.mainButtonLabel, onSdClick: () => this.confirm.emit() }))));
119
+ } })) : (index.h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && index.h("sd-tag", { name: this.tagPreset, label: this.tagLabel }), this.slotLabel && (index.h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (index.h("div", { key: '5f97a8bf91a60b553b21d80f4b133d2c79e97ba6', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (index.h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), index.h("div", { key: '4cde2779f11b274d71b90dd75584f8ccd9d3044d', class: "sd-confirm-modal__button" }, this.subButtonLabel && (index.h("sd-button-v2", { key: '9e64571f556c6cfdb9c69dc70e54a2f4bdec7bb6', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.close.emit() })), index.h("sd-button-v2", { key: 'dd86f7cce973862d94e26910341995f743e1944b', name: this.resolvedMainButton, label: this.mainButtonLabel, onSdClick: () => this.ok.emit() }))));
120
120
  }
121
121
  };
122
122
  SdConfirmModal.style = sdConfirmModalCss();
@@ -25,7 +25,7 @@ const SdModalContainer = class {
25
25
  this.shakeModal(top.modalEl);
26
26
  return;
27
27
  }
28
- this.requestDismiss(top.id, 'cancel');
28
+ this.requestDismiss(top.id, 'close');
29
29
  }
30
30
  }
31
31
  async open(options, chain) {
@@ -35,7 +35,7 @@ const SdModalContainer = class {
35
35
  clearTimeout(this.containerDismissTimerId);
36
36
  this.containerDismissTimerId = undefined;
37
37
  }
38
- this.entries = [...(this.entries ?? []), { id, modalEl, chain, persistent: !!options.persistent, closing: false }];
38
+ this.entries = [...(this.entries ?? []), { id, modalEl, chain, persistent: !!options.persistent, closeAction: options.closeAction ?? 'none', closing: false }];
39
39
  this.isVisible = true;
40
40
  requestAnimationFrame(() => {
41
41
  if (this.contentRef) {
@@ -64,11 +64,11 @@ const SdModalContainer = class {
64
64
  el.setAttribute('data-modal-id', id);
65
65
  el.classList.add('sd-modal-container__modal');
66
66
  this.applyProps(el, options);
67
- el.addEventListener('sdConfirm', () => {
67
+ el.addEventListener('sdOk', () => {
68
68
  this.requestDismiss(id, 'confirm');
69
69
  });
70
70
  el.addEventListener('sdClose', () => {
71
- this.requestDismiss(id, 'cancel');
71
+ this.requestDismiss(id, 'close');
72
72
  });
73
73
  return el;
74
74
  }
@@ -109,7 +109,7 @@ const SdModalContainer = class {
109
109
  this.shakeModal(top.modalEl);
110
110
  return;
111
111
  }
112
- this.requestDismiss(top.id, 'cancel');
112
+ this.requestDismiss(top.id, 'close');
113
113
  };
114
114
  shakeModal(modalEl) {
115
115
  const cls = 'sd-modal-container__modal--shake';
@@ -143,10 +143,18 @@ const SdModalContainer = class {
143
143
  this.finalizeDismiss(id);
144
144
  }, ANIMATION_DURATION);
145
145
  this.entries = (this.entries ?? []).map(item => item.id === id ? { ...item, closing: true, dismissTimerId } : item);
146
- if (reason === 'confirm')
147
- entry.chain._triggerOk();
148
- if (reason === 'cancel')
149
- entry.chain._triggerCancel();
146
+ if (reason === 'close') {
147
+ if (entry.closeAction === 'ok')
148
+ entry.chain._triggerOk();
149
+ else if (entry.closeAction === 'cancel')
150
+ entry.chain._triggerCancel();
151
+ }
152
+ else {
153
+ if (reason === 'confirm')
154
+ entry.chain._triggerOk();
155
+ if (reason === 'cancel')
156
+ entry.chain._triggerCancel();
157
+ }
150
158
  }
151
159
  finalizeDismiss(id) {
152
160
  const entry = (this.entries ?? []).find(item => item.id === id);
@@ -44,18 +44,26 @@ const SdPopover = class {
44
44
  this.slotContent = this.el.innerHTML;
45
45
  }
46
46
  buttonEl;
47
+ get popoverOffset() {
48
+ switch (this.placement) {
49
+ case 'top': return [0, -4];
50
+ case 'bottom': return [0, 4];
51
+ case 'left': return [4, 0];
52
+ case 'right': return [4, 0];
53
+ }
54
+ }
47
55
  handleClose = () => {
48
56
  this.showPopover = false;
49
57
  };
50
58
  render() {
51
- return (index.h(index.Fragment, { key: '0ff8739ff39d53fdc5fb4553c4d8a483b1c089c8' }, this.label ? (index.h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-popover", onSdClick: () => (this.showPopover = !this.showPopover) })) : (index.h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })), this.showPopover && (index.h("sd-floating-portal", { key: 'c2373df5edb583a6027575f9b489f669d7864367', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, index.h("div", { key: 'e86db6af4e6a1fac3c2ed78367bf95038d0e618a', class: {
59
+ return (index.h(index.Fragment, { key: 'f367ea2ada0fda7c28c943bd7bd48785b1810999' }, this.label ? (index.h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-popover", onSdClick: () => (this.showPopover = !this.showPopover) })) : (index.h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })), this.showPopover && (index.h("sd-floating-portal", { key: 'afdb58bfdf25af2adc45a7b81221c1859b517a5a', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement, offset: this.popoverOffset }, index.h("div", { key: '38757707dd8c055674edbc2381409f5fd8712c8d', class: {
52
60
  'sd-floating-menu': true,
53
61
  'sd-floating-menu--popover': true,
54
62
  [`sd-floating-menu--${this.placement}`]: true,
55
63
  [this.menuClass]: !!this.menuClass,
56
64
  }, style: {
57
65
  '--sd-floating-bg': popoverTokens.popover.bg,
58
- } }, index.h("i", { key: 'b5d9109d520bebc16b9b42e663f595d3287c4c9c', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, index.h(tooltipArrow.TooltipArrow, { key: '4981cc2c7bced0653be487ded749563baa17c068' })), index.h("div", { key: '9abaac42bed464418fb1bf13891ce26a98d78784', class: "sd-floating-menu__content" }, this.menuTitle && index.h("div", { key: '022ba941f74b58dd9221aec89a13aa295810b6da', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (index.h("div", { key: 'c391e3db270e291864f0e10f98501bf00ebc9d05', class: "sd-floating-menu__messages" }, this.messages.map(message => (index.h("div", null, message))))), this.buttons.length > 0 && (index.h("div", { key: 'ae10feb7e6c1cd98d7ddb3b0527954c2ff89aced', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (index.h("sd-button", { ...button })))))), this.useClose && (index.h("button", { key: '0fc4fa46086167325c30403eb8f745f4a81a14d6', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, index.h("sd-icon", { key: '1b8b5c85a77036075a4554645fda2fabb97016a5', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
66
+ } }, index.h("i", { key: '333bae4cb23470121d63d4d8b34a1d2b15837e7d', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, index.h(tooltipArrow.TooltipArrow, { key: '617781bb6fc8957576eb149471fd8bf0f44ca552' })), index.h("div", { key: '8c57d49782edd344c8c2c0b9bf44fff8ec154159', class: "sd-floating-menu__content" }, this.menuTitle && index.h("div", { key: 'a06b93124684cb96910ffa2603cf7410a01d6381', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (index.h("div", { key: '24691930b8ae03a3c92ed8e74dae708b5e64f03b', class: "sd-floating-menu__messages" }, this.messages.map(message => (index.h("div", null, message))))), this.buttons.length > 0 && (index.h("div", { key: 'd73cd4cc978711857c4c946dd2a1c1b64bb5feb6', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (index.h("sd-button", { ...button })))))), this.useClose && (index.h("button", { key: 'cda218024d04b03fc2931afa99f0127bc7a9c4c5', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, index.h("sd-icon", { key: '3f41ebce27fd4bab823370d6bbe25b5caed9d5e1', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
59
67
  }
60
68
  static get watchers() { return {
61
69
  "show": [{
@@ -18,7 +18,7 @@ export class SdConfirmModal {
18
18
  slotLabel = '';
19
19
  tagContents;
20
20
  close;
21
- confirm;
21
+ ok;
22
22
  componentWillLoad() {
23
23
  this.syncHasSlottedContent();
24
24
  }
@@ -66,9 +66,9 @@ export class SdConfirmModal {
66
66
  render() {
67
67
  const iconName = CONFIRM_MODAL_ICON_MAP[this.type];
68
68
  const iconColor = CONFIRM_MODAL_ICON_COLOR[this.type];
69
- return (h("div", { key: 'cbf103ed02ff04e90d1df1fffee08c572d9f5e18', class: "sd-confirm-modal" }, h("sd-icon", { key: 'dde88047b036420eb710b1edc22a72b0e5cdf784', class: "sd-confirm-modal__close-button", name: "close", size: CLOSE_ICON_SIZE, color: CLOSE_ICON_COLOR, onClick: () => this.close.emit() }), iconName && (h("sd-icon", { key: '84962276dc06729ef2d5212b615e6f309533c60c', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), h("h2", { key: 'd4f78a41131a2d4f71f74bbe899fcdd96a650adc', class: `sd-confirm-modal__title ${this.titleClass}` }, this.modalTitle), h("div", { key: 'd6019100eabbc46846c62d33d45f242f6f5fb899', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (h("div", { key: '97c659470421aa9a32aecedea185df11bd208e4e', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (h("div", { key: 'e8bc08bf5fa5e73e65df7b0b18b54053491a5ddb', class: "sd-confirm-modal__content-box" }, this.tagContents ? (h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
69
+ return (h("div", { key: '9dd835c1020a29e99257690b5d4d6038b13fe5e4', class: "sd-confirm-modal" }, h("sd-icon", { key: '17fea9642aabb047a8017c37beffe3e0b64707c2', class: "sd-confirm-modal__close-button", name: "close", size: CLOSE_ICON_SIZE, color: CLOSE_ICON_COLOR, onClick: () => this.close.emit() }), iconName && (h("sd-icon", { key: '5198d65dbac64b483f63f8a65f7cad987a14e24b', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), h("h2", { key: '045887b2224ed46f4d6158a2d3ffc25261a0156d', class: `sd-confirm-modal__title ${this.titleClass}` }, this.modalTitle), h("div", { key: '7f9ce8c5bef7a8f9ee580671ccdb79c093066ee3', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (h("div", { key: 'ac533ca4a1dc011d0bbb0c5c72c14228f680741a', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (h("div", { key: '2fde04429ca9efb0b9ae30116e9a0fd7f57b904e', class: "sd-confirm-modal__content-box" }, this.tagContents ? (h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
70
70
  this.customContentRef = el;
71
- } })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && h("sd-tag", { name: this.tagPreset, label: this.tagLabel }), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: 'a45baf202c54267da618dead5b5f856eab5a50b2', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), h("div", { key: '3249a262cf870671641cf57253995f5881718c53', class: "sd-confirm-modal__button" }, this.subButtonLabel && (h("sd-button-v2", { key: '18c42ded4eb94bf4059868ae7f8f18f94d238220', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.close.emit() })), h("sd-button-v2", { key: '4bc410cc5e9037fb7f5352910ac4fda0934bed38', name: this.resolvedMainButton, label: this.mainButtonLabel, onSdClick: () => this.confirm.emit() }))));
71
+ } })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && h("sd-tag", { name: this.tagPreset, label: this.tagLabel }), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: '5f97a8bf91a60b553b21d80f4b133d2c79e97ba6', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), h("div", { key: '4cde2779f11b274d71b90dd75584f8ccd9d3044d', class: "sd-confirm-modal__button" }, this.subButtonLabel && (h("sd-button-v2", { key: '9e64571f556c6cfdb9c69dc70e54a2f4bdec7bb6', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.close.emit() })), h("sd-button-v2", { key: 'dd86f7cce973862d94e26910341995f743e1944b', name: this.resolvedMainButton, label: this.mainButtonLabel, onSdClick: () => this.ok.emit() }))));
72
72
  }
73
73
  static get is() { return "sd-confirm-modal"; }
74
74
  static get originalStyleUrls() {
@@ -365,8 +365,8 @@ export class SdConfirmModal {
365
365
  "references": {}
366
366
  }
367
367
  }, {
368
- "method": "confirm",
369
- "name": "sdConfirm",
368
+ "method": "ok",
369
+ "name": "sdOk",
370
370
  "bubbles": true,
371
371
  "cancelable": true,
372
372
  "composed": true,
@@ -17,7 +17,7 @@ export class SdModalContainer {
17
17
  this.shakeModal(top.modalEl);
18
18
  return;
19
19
  }
20
- this.requestDismiss(top.id, 'cancel');
20
+ this.requestDismiss(top.id, 'close');
21
21
  }
22
22
  }
23
23
  async open(options, chain) {
@@ -27,7 +27,7 @@ export class SdModalContainer {
27
27
  clearTimeout(this.containerDismissTimerId);
28
28
  this.containerDismissTimerId = undefined;
29
29
  }
30
- this.entries = [...(this.entries ?? []), { id, modalEl, chain, persistent: !!options.persistent, closing: false }];
30
+ this.entries = [...(this.entries ?? []), { id, modalEl, chain, persistent: !!options.persistent, closeAction: options.closeAction ?? 'none', closing: false }];
31
31
  this.isVisible = true;
32
32
  requestAnimationFrame(() => {
33
33
  if (this.contentRef) {
@@ -56,11 +56,11 @@ export class SdModalContainer {
56
56
  el.setAttribute('data-modal-id', id);
57
57
  el.classList.add('sd-modal-container__modal');
58
58
  this.applyProps(el, options);
59
- el.addEventListener('sdConfirm', () => {
59
+ el.addEventListener('sdOk', () => {
60
60
  this.requestDismiss(id, 'confirm');
61
61
  });
62
62
  el.addEventListener('sdClose', () => {
63
- this.requestDismiss(id, 'cancel');
63
+ this.requestDismiss(id, 'close');
64
64
  });
65
65
  return el;
66
66
  }
@@ -101,7 +101,7 @@ export class SdModalContainer {
101
101
  this.shakeModal(top.modalEl);
102
102
  return;
103
103
  }
104
- this.requestDismiss(top.id, 'cancel');
104
+ this.requestDismiss(top.id, 'close');
105
105
  };
106
106
  shakeModal(modalEl) {
107
107
  const cls = 'sd-modal-container__modal--shake';
@@ -135,10 +135,18 @@ export class SdModalContainer {
135
135
  this.finalizeDismiss(id);
136
136
  }, ANIMATION_DURATION);
137
137
  this.entries = (this.entries ?? []).map(item => item.id === id ? { ...item, closing: true, dismissTimerId } : item);
138
- if (reason === 'confirm')
139
- entry.chain._triggerOk();
140
- if (reason === 'cancel')
141
- entry.chain._triggerCancel();
138
+ if (reason === 'close') {
139
+ if (entry.closeAction === 'ok')
140
+ entry.chain._triggerOk();
141
+ else if (entry.closeAction === 'cancel')
142
+ entry.chain._triggerCancel();
143
+ }
144
+ else {
145
+ if (reason === 'confirm')
146
+ entry.chain._triggerOk();
147
+ if (reason === 'cancel')
148
+ entry.chain._triggerCancel();
149
+ }
142
150
  }
143
151
  finalizeDismiss(id) {
144
152
  const entry = (this.entries ?? []).find(item => item.id === id);
@@ -251,7 +259,7 @@ export class SdModalContainer {
251
259
  "docs": ""
252
260
  }, {
253
261
  "name": "props",
254
- "type": "{ type?: ConfirmModalType | undefined; title?: string | undefined; titleClass?: string | undefined; topMessage?: string[] | undefined; bottomMessage?: string[] | undefined; mainButtonName?: ConfirmModalMainButton | undefined; mainButtonLabel?: string | undefined; subButtonLabel?: string | undefined; tagPreset?: \"square_sm_red\" | \"square_sm_orange\" | \"square_sm_yellow\" | \"square_sm_green\" | \"square_sm_blue\" | \"square_sm_darkblue\" | \"square_sm_indigo\" | \"square_sm_grey\" | \"square_md_red\" | \"square_md_orange\" | \"square_md_yellow\" | \"square_md_green\" | \"square_md_blue\" | \"square_md_darkblue\" | \"square_md_indigo\" | \"square_md_grey\" | \"square_xs_red\" | \"square_xs_orange\" | \"square_xs_yellow\" | \"square_xs_green\" | \"square_xs_blue\" | \"square_xs_darkblue\" | \"square_xs_indigo\" | \"square_xs_grey\" | \"pill_sm_red\" | \"pill_sm_orange\" | \"pill_sm_yellow\" | \"pill_sm_green\" | \"pill_sm_blue\" | \"pill_sm_darkblue\" | \"pill_sm_indigo\" | \"pill_sm_grey\" | \"pill_md_red\" | \"pill_md_orange\" | \"pill_md_yellow\" | \"pill_md_green\" | \"pill_md_blue\" | \"pill_md_darkblue\" | \"pill_md_indigo\" | \"pill_md_grey\" | \"pill_xs_red\" | \"pill_xs_orange\" | \"pill_xs_yellow\" | \"pill_xs_green\" | \"pill_xs_blue\" | \"pill_xs_darkblue\" | \"pill_xs_indigo\" | \"pill_xs_grey\" | undefined; tagLabel?: string | undefined; slotLabel?: string | undefined; tagContents?: HTMLElement | undefined; persistent?: boolean | undefined; }",
262
+ "type": "{ type?: ConfirmModalType | undefined; title?: string | undefined; titleClass?: string | undefined; topMessage?: string[] | undefined; bottomMessage?: string[] | undefined; mainButtonName?: ConfirmModalMainButton | undefined; mainButtonLabel?: string | undefined; subButtonLabel?: string | undefined; tagPreset?: \"square_sm_red\" | \"square_sm_orange\" | \"square_sm_yellow\" | \"square_sm_green\" | \"square_sm_blue\" | \"square_sm_darkblue\" | \"square_sm_indigo\" | \"square_sm_grey\" | \"square_md_red\" | \"square_md_orange\" | \"square_md_yellow\" | \"square_md_green\" | \"square_md_blue\" | \"square_md_darkblue\" | \"square_md_indigo\" | \"square_md_grey\" | \"square_xs_red\" | \"square_xs_orange\" | \"square_xs_yellow\" | \"square_xs_green\" | \"square_xs_blue\" | \"square_xs_darkblue\" | \"square_xs_indigo\" | \"square_xs_grey\" | \"pill_sm_red\" | \"pill_sm_orange\" | \"pill_sm_yellow\" | \"pill_sm_green\" | \"pill_sm_blue\" | \"pill_sm_darkblue\" | \"pill_sm_indigo\" | \"pill_sm_grey\" | \"pill_md_red\" | \"pill_md_orange\" | \"pill_md_yellow\" | \"pill_md_green\" | \"pill_md_blue\" | \"pill_md_darkblue\" | \"pill_md_indigo\" | \"pill_md_grey\" | \"pill_xs_red\" | \"pill_xs_orange\" | \"pill_xs_yellow\" | \"pill_xs_green\" | \"pill_xs_blue\" | \"pill_xs_darkblue\" | \"pill_xs_indigo\" | \"pill_xs_grey\" | undefined; tagLabel?: string | undefined; slotLabel?: string | undefined; tagContents?: HTMLElement | undefined; persistent?: boolean | undefined; closeAction?: CloseAction | undefined; }",
255
263
  "docs": ""
256
264
  }],
257
265
  "references": {
@@ -27,18 +27,26 @@ export class SdPopover {
27
27
  this.slotContent = this.el.innerHTML;
28
28
  }
29
29
  buttonEl;
30
+ get popoverOffset() {
31
+ switch (this.placement) {
32
+ case 'top': return [0, -4];
33
+ case 'bottom': return [0, 4];
34
+ case 'left': return [4, 0];
35
+ case 'right': return [4, 0];
36
+ }
37
+ }
30
38
  handleClose = () => {
31
39
  this.showPopover = false;
32
40
  };
33
41
  render() {
34
- return (h(Fragment, { key: '0ff8739ff39d53fdc5fb4553c4d8a483b1c089c8' }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-popover", onSdClick: () => (this.showPopover = !this.showPopover) })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })), this.showPopover && (h("sd-floating-portal", { key: 'c2373df5edb583a6027575f9b489f669d7864367', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, h("div", { key: 'e86db6af4e6a1fac3c2ed78367bf95038d0e618a', class: {
42
+ return (h(Fragment, { key: 'f367ea2ada0fda7c28c943bd7bd48785b1810999' }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-popover", onSdClick: () => (this.showPopover = !this.showPopover) })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })), this.showPopover && (h("sd-floating-portal", { key: 'afdb58bfdf25af2adc45a7b81221c1859b517a5a', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement, offset: this.popoverOffset }, h("div", { key: '38757707dd8c055674edbc2381409f5fd8712c8d', class: {
35
43
  'sd-floating-menu': true,
36
44
  'sd-floating-menu--popover': true,
37
45
  [`sd-floating-menu--${this.placement}`]: true,
38
46
  [this.menuClass]: !!this.menuClass,
39
47
  }, style: {
40
48
  '--sd-floating-bg': popoverTokens.popover.bg,
41
- } }, h("i", { key: 'b5d9109d520bebc16b9b42e663f595d3287c4c9c', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: '4981cc2c7bced0653be487ded749563baa17c068' })), h("div", { key: '9abaac42bed464418fb1bf13891ce26a98d78784', class: "sd-floating-menu__content" }, this.menuTitle && h("div", { key: '022ba941f74b58dd9221aec89a13aa295810b6da', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (h("div", { key: 'c391e3db270e291864f0e10f98501bf00ebc9d05', class: "sd-floating-menu__messages" }, this.messages.map(message => (h("div", null, message))))), this.buttons.length > 0 && (h("div", { key: 'ae10feb7e6c1cd98d7ddb3b0527954c2ff89aced', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (h("sd-button", { ...button })))))), this.useClose && (h("button", { key: '0fc4fa46086167325c30403eb8f745f4a81a14d6', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, h("sd-icon", { key: '1b8b5c85a77036075a4554645fda2fabb97016a5', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
49
+ } }, h("i", { key: '333bae4cb23470121d63d4d8b34a1d2b15837e7d', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: '617781bb6fc8957576eb149471fd8bf0f44ca552' })), h("div", { key: '8c57d49782edd344c8c2c0b9bf44fff8ec154159', class: "sd-floating-menu__content" }, this.menuTitle && h("div", { key: 'a06b93124684cb96910ffa2603cf7410a01d6381', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (h("div", { key: '24691930b8ae03a3c92ed8e74dae708b5e64f03b', class: "sd-floating-menu__messages" }, this.messages.map(message => (h("div", null, message))))), this.buttons.length > 0 && (h("div", { key: 'd73cd4cc978711857c4c946dd2a1c1b64bb5feb6', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (h("sd-button", { ...button })))))), this.useClose && (h("button", { key: 'cda218024d04b03fc2931afa99f0127bc7a9c4c5', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, h("sd-icon", { key: '3f41ebce27fd4bab823370d6bbe25b5caed9d5e1', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
42
50
  }
43
51
  static get is() { return "sd-popover"; }
44
52
  static get originalStyleUrls() {
@@ -16,6 +16,14 @@ export class SdTooltip {
16
16
  showTooltip = false;
17
17
  slotContentHTML = '';
18
18
  buttonEl;
19
+ get tooltipOffset() {
20
+ switch (this.placement) {
21
+ case 'top': return [0, -4];
22
+ case 'bottom': return [0, 4];
23
+ case 'left': return [4, 0];
24
+ case 'right': return [4, 0];
25
+ }
26
+ }
19
27
  handleClose = () => {
20
28
  this.showTooltip = false;
21
29
  };
@@ -42,14 +50,14 @@ export class SdTooltip {
42
50
  : {
43
51
  onSdClick: () => (this.showTooltip = !this.showTooltip),
44
52
  };
45
- return (h(Fragment, { key: '53edf89a07b59cc1f6f3b84cbba7f4b77c6819c7' }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-tooltip", ...buttonTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-tooltip", ...handleTrigger })), this.showTooltip && (h("sd-floating-portal", { key: '0011143fc06ea5bcf0b800bc4baabb06dd822911', parentRef: this.buttonEl, onSdClose: this.handleClose.bind(this), placement: this.placement }, h("div", { key: '5cd0ed3132d542436a951bf74784d0aa0cd8078d', class: {
53
+ return (h(Fragment, { key: '2890811dd681299b155d191d6d6023441db6debc' }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-tooltip", ...buttonTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-tooltip", ...handleTrigger })), this.showTooltip && (h("sd-floating-portal", { key: '666cf59e0548af92eff225cd91b485824b82249d', parentRef: this.buttonEl, onSdClose: this.handleClose.bind(this), placement: this.placement, offset: this.tooltipOffset }, h("div", { key: 'ad5285750f95fdb0829372dd3b45d96035a02315', class: {
46
54
  'sd-floating-menu': true,
47
55
  [`sd-floating-menu--${this.tooltipType}`]: true,
48
56
  [`sd-floating-menu--${this.placement}`]: true,
49
57
  }, style: {
50
58
  '--sd-floating-bg': typeConfig.bg,
51
59
  '--sd-floating-content': typeConfig.content,
52
- } }, h("i", { key: '9502962bbd9a95f04d0b6bef1e03c0c048515090', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: 'b41486b3cecd413dd817b0a1384cfe9fb7255434' })), h("div", { key: 'ea15c6250d1b8dabc5c6ecf1b5c48674a877a3c4', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }))))));
60
+ } }, h("i", { key: 'ee92f004dbd17de84a3410bd555da735c5fcb4ca', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: '04ccadfa1de8bcf3b64218e6e048fcbf09ff3301' })), h("div", { key: '0534c8cec5c79c8b0df3950d554a1b62d1e3b32b', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }))))));
53
61
  }
54
62
  static get is() { return "sd-tooltip"; }
55
63
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- import{p as e,H as d,h as s,t as i}from"./p-B1vJXa29.js";import{d as t}from"./p-BKtAiyh0.js";import{d as l}from"./p-BfqA9RSe.js";import{d as o}from"./p-C7dgr7sG.js";import{d as r}from"./p-C4sDmQQ3.js";var a={paddingX:"12",typography:{fontWeight:"500",fontSize:"12",lineHeight:"20"},bg:"#F6F6F6",border:{default:"#AAAAAA",disabled:"#CCCCCC"}};const n=["sd-select","sd-select-multiple","sd-select-multiple-group","sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select-v2"],f=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),this.status&&(e=this.status),this.error&&(e="error"),e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of n){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(!this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this.name)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=e?{"--sd-field-addon-padding-x":`${a.paddingX}px`,"--sd-field-addon-font-size":`${a.typography.fontSize}px`,"--sd-field-addon-line-height":`${a.typography.lineHeight}px`,"--sd-field-addon-font-weight":a.typography.fontWeight,"--sd-field-addon-bg":a.bg,"--sd-field-addon-border-color":this.disabled?a.border.disabled:a.border.default}:{};return s("div",{key:"1badb3752c758c30995188f73505d912f4318ba3",class:{"sd-field":!0,"sd-field--has-label":!!this.label,"sd-field--has-addon":!!e,[this.fieldStatus]:!!this.fieldStatus},style:d},s("div",{key:"b8c08b4783eb7035cc28e6ffb1d541871cd25616",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"31efca0604479d2fa9bed06aaaeb9ca9930c62fb",class:{"sd-field__control":!0,"sd-field__control--has-addon":!!e},style:this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},e&&s("div",{key:"159191a432603cbfa4b1755fc7f4c784868b3749",class:"sd-field__addon"},e),s("slot",{key:"58918e5af7dc2564af8d86b24cb5972cb9d0d67f"}))),this.errorMsg||this.errorMessage?s("div",{class:"sd-field__error-message"},this.errorMsg||this.errorMessage):this.hint&&s("div",{class:"sd-field__hint"},this.hint))}renderLabel(e){return e?s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??10,color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},s("div",{slot:"content"},this.labelTooltip))):null}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid var(--sd-system-color-field-border-hover) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:var(--sd-system-space-field-sm-gap)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:6px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:var(--sd-system-color-field-text-default);white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;align-items:center;white-space:nowrap;padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:1px solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-system-radius-field-sm) - 1px) 0 0 calc(var(--sd-system-radius-field-sm) - 1px)}sd-field .sd-field__wrapper{width:100%;height:var(--sd-system-size-field-sm-height);display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:100%;display:flex;flex:1;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-system-radius-field-sm);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,sd-field .sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid #2BCE6C !important}sd-field .sd-field .sd-field__error-message{color:var(--sd-textinput-input-text-error-message);font-size:var(--sd-textinput-input-error-message-typography-font-size);line-height:var(--sd-textinput-input-error-message-typography-line-height);margin-top:var(--sd-textinput-input-contents-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-textinput-input-text-hint);font-size:var(--sd-textinput-input-hint-typography-font-size);line-height:var(--sd-textinput-input-hint-typography-line-height);margin-top:var(--sd-textinput-input-contents-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],label:[1],addonLabel:[1,"addon-label"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function p(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-icon","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),f);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||l();break;case"sd-icon":customElements.get(i(e))||o();break;case"sd-tooltip":customElements.get(i(e))||r()}}))}export{f as S,p as d}
1
+ import{p as e,H as d,h as s,t as i}from"./p-B1vJXa29.js";import{d as t}from"./p-BKtAiyh0.js";import{d as l}from"./p-BfqA9RSe.js";import{d as o}from"./p-C7dgr7sG.js";import{d as r}from"./p-CArAuWdh.js";var a={paddingX:"12",typography:{fontWeight:"500",fontSize:"12",lineHeight:"20"},bg:"#F6F6F6",border:{default:"#AAAAAA",disabled:"#CCCCCC"}};const n=["sd-select","sd-select-multiple","sd-select-multiple-group","sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select-v2"],f=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),this.status&&(e=this.status),this.error&&(e="error"),e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of n){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(!this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this.name)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=e?{"--sd-field-addon-padding-x":`${a.paddingX}px`,"--sd-field-addon-font-size":`${a.typography.fontSize}px`,"--sd-field-addon-line-height":`${a.typography.lineHeight}px`,"--sd-field-addon-font-weight":a.typography.fontWeight,"--sd-field-addon-bg":a.bg,"--sd-field-addon-border-color":this.disabled?a.border.disabled:a.border.default}:{};return s("div",{key:"1badb3752c758c30995188f73505d912f4318ba3",class:{"sd-field":!0,"sd-field--has-label":!!this.label,"sd-field--has-addon":!!e,[this.fieldStatus]:!!this.fieldStatus},style:d},s("div",{key:"b8c08b4783eb7035cc28e6ffb1d541871cd25616",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"31efca0604479d2fa9bed06aaaeb9ca9930c62fb",class:{"sd-field__control":!0,"sd-field__control--has-addon":!!e},style:this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},e&&s("div",{key:"159191a432603cbfa4b1755fc7f4c784868b3749",class:"sd-field__addon"},e),s("slot",{key:"58918e5af7dc2564af8d86b24cb5972cb9d0d67f"}))),this.errorMsg||this.errorMessage?s("div",{class:"sd-field__error-message"},this.errorMsg||this.errorMessage):this.hint&&s("div",{class:"sd-field__hint"},this.hint))}renderLabel(e){return e?s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??10,color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},s("div",{slot:"content"},this.labelTooltip))):null}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid var(--sd-system-color-field-border-hover) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:var(--sd-system-space-field-sm-gap)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:6px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:var(--sd-system-color-field-text-default);white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;align-items:center;white-space:nowrap;padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:1px solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-system-radius-field-sm) - 1px) 0 0 calc(var(--sd-system-radius-field-sm) - 1px)}sd-field .sd-field__wrapper{width:100%;height:var(--sd-system-size-field-sm-height);display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:100%;display:flex;flex:1;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-system-radius-field-sm);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,sd-field .sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid #2BCE6C !important}sd-field .sd-field .sd-field__error-message{color:var(--sd-textinput-input-text-error-message);font-size:var(--sd-textinput-input-error-message-typography-font-size);line-height:var(--sd-textinput-input-error-message-typography-line-height);margin-top:var(--sd-textinput-input-contents-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-textinput-input-text-hint);font-size:var(--sd-textinput-input-hint-typography-font-size);line-height:var(--sd-textinput-input-hint-typography-line-height);margin-top:var(--sd-textinput-input-contents-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],label:[1],addonLabel:[1,"addon-label"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function p(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-icon","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),f);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||l();break;case"sd-icon":customElements.get(i(e))||o();break;case"sd-tooltip":customElements.get(i(e))||r()}}))}export{f as S,p as d}
@@ -1 +1 @@
1
- import{p as s,c as e,h as t,t as i}from"./p-B1vJXa29.js";import{B as o}from"./p-BNuWMSR_.js";import{S as l}from"./p-Cy6HMEsK.js";import{n as d}from"./p-CCwNgVmC.js";import{d as r}from"./p-BKtAiyh0.js";import{d as n}from"./p-DgDoP1wQ.js";import{d as a}from"./p-DGA1KNaL.js";import{d as c}from"./p-BfqA9RSe.js";import{d as h}from"./p-C7dgr7sG.js";import{d as p}from"./p-DpqpugGF.js";import{d as m}from"./p-CV1qJByG.js";import{d as u}from"./p-D6ayf5l7.js";import{d as f}from"./p-6FZWkn3V.js";import{d as w}from"./p-DZ8T3piH.js";import{d as b}from"./p-C4sDmQQ3.js";const g=s(class extends o{constructor(s){super(!1),!1!==s&&this.__registerHost(),this.update=e(this,"sdUpdate"),this.dropDownShow=e(this,"sdDropDownShow")}get el(){return this}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;optionRenderer;isOpen=!1;itemIndex=-1;isScrolled=!1;update;dropDownShow;selectRef;triggerRef;formField;filteredOptions=[];dropDownWidth="200px";name=d();async sdOpen(){this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),!1===this.isOpen&&await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const s=this.triggerRef,e=s?.getBoundingClientRect();this.dropDownWidth=e?.width?`${e.width}px`:this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(s){this.selectRef?.contains(s.target)||(this.isOpen=!1)}handleDocumentKeydown(s){if(s.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(s.key))switch(s.preventDefault(),s.key){case"ArrowDown":case"ArrowUp":const e=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,s.key);this.itemIndex=e;break;case"Enter":const t=this.filteredOptions[this.itemIndex];t&&!t.disabled&&(this.value=t.value,this.isOpen=!1);break;case"Escape":this.isOpen=!1}}getSelectedOption(){return this.options.find((s=>s.value===this.value))}closeDropdown(){this.isOpen=!1}handleTriggerClick=s=>{s.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=s=>{const{option:e,event:t}=s;if(t.stopPropagation(),!e.disabled){this.value=e.value,this.isOpen=!1;const s=this.getSelectedOption();this.update?.emit({value:s?.value||null,option:s||null})}};render(){return t("sd-field",{key:"f7cd0c34188712a30389d07bde7edc7875e9923b",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:s=>this.formField=s},t("div",{key:"460a8a23247e24a02bd25470105598914029e205",class:{"sd-select":!0,"sd-select--disabled":this.disabled,"sd-select--error":!!this.error,"sd-select--label":!!this.label},ref:s=>this.selectRef=s},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const s=this.getSelectedOption();return t("div",{class:"sd-select__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,ref:s=>this.triggerRef=s},t("span",{class:"sd-select__value"},s?s.label:this.placeholder),this.clearable&&s&&!this.disabled&&t("sd-icon",{key:"clear-icon",name:"close",size:10,color:"#888",class:"sd-select__clear",onClick:async s=>{s.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),t("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select__arrow":!0,"sd-select__arrow--open":this.isOpen}}))}renderDropdown(){if(!1===this.isOpen)return null;const s=this.selectRef?.querySelector(".sd-select__trigger")||this.selectRef;return t("sd-portal",{open:this.isOpen,parentRef:s,onSdClose:this.closeDropdown},t("sd-select-dropdown",{value:this.value,options:this.options,itemIndex:this.itemIndex,width:this.dropDownWidth,dropdownHeight:this.dropdownHeight,searchable:this.searchable,optionPlaceholder:this.optionPlaceholder,onSdOptionClick:({detail:s})=>this.handleOptionClick(s),onSdOptionFiltered:({detail:s})=>this.filteredOptions=s}))}static get watchers(){return{isOpen:[{isOpenChanged:0}]}}static get style(){return"sd-select{display:inline-flex;flex-flow:column nowrap;height:fit-content}sd-select *:focus,sd-select *:focus-visible,sd-select *:focus-within{outline:none !important}sd-select .sd-select{width:100%}sd-select .sd-select .sd-select__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center}sd-select .sd-select .sd-select__trigger .sd-select__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select .sd-select .sd-select__trigger .sd-select__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select .sd-select .sd-select__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select .sd-select .sd-select__arrow--open{transform:rotate(180deg)}"}},[512,"sd-select",{value:[1032],options:[1040],placeholder:[1],optionPlaceholder:[1,"option-placeholder"],width:[1],dropdownHeight:[1,"dropdown-height"],autoFocus:[4,"auto-focus"],disabled:[4],clearable:[4],searchable:[4],label:[1],addonLabel:[1,"addon-label"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[4],optionRenderer:[16],isOpen:[32],itemIndex:[32],isScrolled:[32],sdOpen:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{isOpen:[{isOpenChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-input","sd-portal","sd-select-dropdown","sd-select-option","sd-select-search-input","sd-tooltip"].forEach((s=>{switch(s){case"sd-select":customElements.get(i(s))||customElements.define(i(s),g);break;case"sd-button":customElements.get(i(s))||r();break;case"sd-checkbox":customElements.get(i(s))||n();break;case"sd-field":customElements.get(i(s))||a();break;case"sd-floating-portal":customElements.get(i(s))||c();break;case"sd-icon":customElements.get(i(s))||h();break;case"sd-input":customElements.get(i(s))||p();break;case"sd-portal":customElements.get(i(s))||m();break;case"sd-select-dropdown":customElements.get(i(s))||u();break;case"sd-select-option":customElements.get(i(s))||f();break;case"sd-select-search-input":customElements.get(i(s))||w();break;case"sd-tooltip":customElements.get(i(s))||b()}}))}export{g as S,x as d}
1
+ import{p as s,c as e,h as t,t as i}from"./p-B1vJXa29.js";import{B as o}from"./p-BNuWMSR_.js";import{S as l}from"./p-Cy6HMEsK.js";import{n as d}from"./p-CCwNgVmC.js";import{d as r}from"./p-BKtAiyh0.js";import{d as n}from"./p-DgDoP1wQ.js";import{d as a}from"./p-AfdVu7_V.js";import{d as c}from"./p-BfqA9RSe.js";import{d as h}from"./p-C7dgr7sG.js";import{d as p}from"./p-jaHdAlr9.js";import{d as m}from"./p-CV1qJByG.js";import{d as u}from"./p-BZJDhQ6h.js";import{d as f}from"./p-6FZWkn3V.js";import{d as w}from"./p-jk3tAdJg.js";import{d as b}from"./p-CArAuWdh.js";const g=s(class extends o{constructor(s){super(!1),!1!==s&&this.__registerHost(),this.update=e(this,"sdUpdate"),this.dropDownShow=e(this,"sdDropDownShow")}get el(){return this}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;optionRenderer;isOpen=!1;itemIndex=-1;isScrolled=!1;update;dropDownShow;selectRef;triggerRef;formField;filteredOptions=[];dropDownWidth="200px";name=d();async sdOpen(){this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),!1===this.isOpen&&await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const s=this.triggerRef,e=s?.getBoundingClientRect();this.dropDownWidth=e?.width?`${e.width}px`:this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(s){this.selectRef?.contains(s.target)||(this.isOpen=!1)}handleDocumentKeydown(s){if(s.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(s.key))switch(s.preventDefault(),s.key){case"ArrowDown":case"ArrowUp":const e=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,s.key);this.itemIndex=e;break;case"Enter":const t=this.filteredOptions[this.itemIndex];t&&!t.disabled&&(this.value=t.value,this.isOpen=!1);break;case"Escape":this.isOpen=!1}}getSelectedOption(){return this.options.find((s=>s.value===this.value))}closeDropdown(){this.isOpen=!1}handleTriggerClick=s=>{s.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=s=>{const{option:e,event:t}=s;if(t.stopPropagation(),!e.disabled){this.value=e.value,this.isOpen=!1;const s=this.getSelectedOption();this.update?.emit({value:s?.value||null,option:s||null})}};render(){return t("sd-field",{key:"f7cd0c34188712a30389d07bde7edc7875e9923b",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:s=>this.formField=s},t("div",{key:"460a8a23247e24a02bd25470105598914029e205",class:{"sd-select":!0,"sd-select--disabled":this.disabled,"sd-select--error":!!this.error,"sd-select--label":!!this.label},ref:s=>this.selectRef=s},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const s=this.getSelectedOption();return t("div",{class:"sd-select__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,ref:s=>this.triggerRef=s},t("span",{class:"sd-select__value"},s?s.label:this.placeholder),this.clearable&&s&&!this.disabled&&t("sd-icon",{key:"clear-icon",name:"close",size:10,color:"#888",class:"sd-select__clear",onClick:async s=>{s.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),t("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select__arrow":!0,"sd-select__arrow--open":this.isOpen}}))}renderDropdown(){if(!1===this.isOpen)return null;const s=this.selectRef?.querySelector(".sd-select__trigger")||this.selectRef;return t("sd-portal",{open:this.isOpen,parentRef:s,onSdClose:this.closeDropdown},t("sd-select-dropdown",{value:this.value,options:this.options,itemIndex:this.itemIndex,width:this.dropDownWidth,dropdownHeight:this.dropdownHeight,searchable:this.searchable,optionPlaceholder:this.optionPlaceholder,onSdOptionClick:({detail:s})=>this.handleOptionClick(s),onSdOptionFiltered:({detail:s})=>this.filteredOptions=s}))}static get watchers(){return{isOpen:[{isOpenChanged:0}]}}static get style(){return"sd-select{display:inline-flex;flex-flow:column nowrap;height:fit-content}sd-select *:focus,sd-select *:focus-visible,sd-select *:focus-within{outline:none !important}sd-select .sd-select{width:100%}sd-select .sd-select .sd-select__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center}sd-select .sd-select .sd-select__trigger .sd-select__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select .sd-select .sd-select__trigger .sd-select__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select .sd-select .sd-select__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select .sd-select .sd-select__arrow--open{transform:rotate(180deg)}"}},[512,"sd-select",{value:[1032],options:[1040],placeholder:[1],optionPlaceholder:[1,"option-placeholder"],width:[1],dropdownHeight:[1,"dropdown-height"],autoFocus:[4,"auto-focus"],disabled:[4],clearable:[4],searchable:[4],label:[1],addonLabel:[1,"addon-label"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[4],optionRenderer:[16],isOpen:[32],itemIndex:[32],isScrolled:[32],sdOpen:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{isOpen:[{isOpenChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-input","sd-portal","sd-select-dropdown","sd-select-option","sd-select-search-input","sd-tooltip"].forEach((s=>{switch(s){case"sd-select":customElements.get(i(s))||customElements.define(i(s),g);break;case"sd-button":customElements.get(i(s))||r();break;case"sd-checkbox":customElements.get(i(s))||n();break;case"sd-field":customElements.get(i(s))||a();break;case"sd-floating-portal":customElements.get(i(s))||c();break;case"sd-icon":customElements.get(i(s))||h();break;case"sd-input":customElements.get(i(s))||p();break;case"sd-portal":customElements.get(i(s))||m();break;case"sd-select-dropdown":customElements.get(i(s))||u();break;case"sd-select-option":customElements.get(i(s))||f();break;case"sd-select-search-input":customElements.get(i(s))||w();break;case"sd-tooltip":customElements.get(i(s))||b()}}))}export{g as S,x as d}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as o,t as i}from"./p-B1vJXa29.js";import{d}from"./p-BKtAiyh0.js";import{d as n}from"./p-DgDoP1wQ.js";import{d as r}from"./p-DGA1KNaL.js";import{d as a}from"./p-BfqA9RSe.js";import{d as c}from"./p-C7dgr7sG.js";import{d as h}from"./p-DpqpugGF.js";import{d as l}from"./p-6FZWkn3V.js";import{d as p}from"./p-DZ8T3piH.js";import{d as m}from"./p-C4sDmQQ3.js";const u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.optionClick=s(this,"sdOptionClick"),this.optionFiltered=s(this,"sdOptionFiltered"),this.scroll=s(this,"sdScroll")}itemIndex;value=null;options;width;dropdownHeight;searchable;optionPlaceholder;useCheckbox=!1;useAll=!1;filteredOptions=[];searchText=null;isScrolled=!1;isDropdownReady=!1;optionClick;optionFiltered;scroll;filteredOptionsChanged(t){this.optionFiltered.emit(t)}searchTextChanged(){this.filterOptions()}async itemIndexChanged(t,e){if(this.searchable){const t=await this.getNativeInputElement();if(-1===this.itemIndex)return void t?.focus({preventScroll:!0});t?.matches(":focus")&&t?.blur()}const s=this.dropdownRef?.querySelectorAll(".sd-select-dropdown sd-select-option")||[],o=s?.[this.itemIndex];o&&(this.optionRef=o,await this.optionRef.sdIsDisabled()?t>e?this.itemIndex++:this.itemIndex--:this.scrollToOption(o))}componentWillLoad(){this.filteredOptions=this.options,requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const t=this.getSelectedOption();if(t){const e=Array.isArray(t)?this.options.indexOf(t[0]):this.options.indexOf(t),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option")||[]),o=Math.min((this.useAll?e+1:e)+4,s.length-1),i=s?.[o];i&&this.scrollToOption(i,"instant")}if(this.isDropdownReady=!0,this.searchable){const t=await this.getNativeInputElement();t&&requestAnimationFrame((()=>{t.focus({preventScroll:!0})}))}}))}))}dropdownRef;searchRef;optionRef;get dropdownSize(){return{"--select-dropdown-width":this.width||"200px","--select-dropdown-height":this.dropdownHeight||"260px"}}filterOptions(){this.filteredOptions=this.searchText&&""!==this.searchText.trim()?this.options.filter((t=>t.label.toLowerCase().includes(this.searchText.toLowerCase()))):this.options}getSelectedOption(){return"object"!=typeof this.value?this.options.find((t=>t.value===this.value)):this.options.filter((t=>this.value?.includes(t)))}isOptionSelected(t){return Array.isArray(this.value)?this.value.some((e=>e.value===t)):t===this.value}async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}scrollToOption(t,e="smooth"){if(!this.dropdownRef||!t)return;const s=this.dropdownRef,o=t.offsetTop,i=t.offsetHeight,d=s.scrollTop,n=s.clientHeight,r=s.querySelector(".sd-select-search-input"),a=r?r.offsetHeight:0,c=d+n;o<d+a?s.scrollTo({top:o-a,behavior:e}):o+i>c&&s.scrollTo({top:o+i-n+a,behavior:e})}handleDropdownScroll=t=>{this.isScrolled=t.target.scrollTop>0};render(){return o("div",{key:"70bea150872ff4b70b70d358972b14bf0ad2bdf2",class:{"sd-select-dropdown":!0,"sd-select-dropdown--ready":this.isDropdownReady},style:this.dropdownSize,onScroll:this.handleDropdownScroll,ref:t=>this.dropdownRef=t},this.searchable&&o("sd-select-search-input",{key:"79ebdc72ca4a905f700dc6293d8033a5ec22d679",ref:t=>this.searchRef=t,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:t=>this.searchText=t.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?this.filteredOptions.map(((t,e)=>o("slot",{name:`option-${t.value}`},o("sd-select-option",{option:t,index:e,isSelected:this.isOptionSelected(t.value),isFocused:e===this.itemIndex,onOptionClick:({detail:t})=>this.optionClick.emit(t),useCheckbox:this.useCheckbox})))):o("slot",{name:"option-placeholder"},o("div",{class:"sd-select-option-placeholder"},this.optionPlaceholder)))}static get watchers(){return{filteredOptions:[{filteredOptionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}]}}static get style(){return".sd-select-dropdown .sd-select-option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}.sd-select-dropdown{overflow:auto;min-width:fit-content;width:var(--select-dropdown-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;display:flex;flex-direction:column;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-dropdown--ready{opacity:1}"}},[772,"sd-select-dropdown",{itemIndex:[1026,"item-index"],value:[8],options:[16],width:[1],dropdownHeight:[1,"dropdown-height"],searchable:[4],optionPlaceholder:[1,"option-placeholder"],useCheckbox:[4,"use-checkbox"],useAll:[4,"use-all"],filteredOptions:[32],searchText:[32],isScrolled:[32],isDropdownReady:[32]},void 0,{filteredOptions:[{filteredOptionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}]}]);function f(){"undefined"!=typeof customElements&&["sd-select-dropdown","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-input","sd-select-option","sd-select-search-input","sd-tooltip"].forEach((t=>{switch(t){case"sd-select-dropdown":customElements.get(i(t))||customElements.define(i(t),u);break;case"sd-button":customElements.get(i(t))||d();break;case"sd-checkbox":customElements.get(i(t))||n();break;case"sd-field":customElements.get(i(t))||r();break;case"sd-floating-portal":customElements.get(i(t))||a();break;case"sd-icon":customElements.get(i(t))||c();break;case"sd-input":customElements.get(i(t))||h();break;case"sd-select-option":customElements.get(i(t))||l();break;case"sd-select-search-input":customElements.get(i(t))||p();break;case"sd-tooltip":customElements.get(i(t))||m()}}))}export{u as S,f as d}
1
+ import{p as t,H as e,c as s,h as o,t as i}from"./p-B1vJXa29.js";import{d}from"./p-BKtAiyh0.js";import{d as n}from"./p-DgDoP1wQ.js";import{d as r}from"./p-AfdVu7_V.js";import{d as a}from"./p-BfqA9RSe.js";import{d as c}from"./p-C7dgr7sG.js";import{d as h}from"./p-jaHdAlr9.js";import{d as l}from"./p-6FZWkn3V.js";import{d as p}from"./p-jk3tAdJg.js";import{d as m}from"./p-CArAuWdh.js";const u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.optionClick=s(this,"sdOptionClick"),this.optionFiltered=s(this,"sdOptionFiltered"),this.scroll=s(this,"sdScroll")}itemIndex;value=null;options;width;dropdownHeight;searchable;optionPlaceholder;useCheckbox=!1;useAll=!1;filteredOptions=[];searchText=null;isScrolled=!1;isDropdownReady=!1;optionClick;optionFiltered;scroll;filteredOptionsChanged(t){this.optionFiltered.emit(t)}searchTextChanged(){this.filterOptions()}async itemIndexChanged(t,e){if(this.searchable){const t=await this.getNativeInputElement();if(-1===this.itemIndex)return void t?.focus({preventScroll:!0});t?.matches(":focus")&&t?.blur()}const s=this.dropdownRef?.querySelectorAll(".sd-select-dropdown sd-select-option")||[],o=s?.[this.itemIndex];o&&(this.optionRef=o,await this.optionRef.sdIsDisabled()?t>e?this.itemIndex++:this.itemIndex--:this.scrollToOption(o))}componentWillLoad(){this.filteredOptions=this.options,requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const t=this.getSelectedOption();if(t){const e=Array.isArray(t)?this.options.indexOf(t[0]):this.options.indexOf(t),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option")||[]),o=Math.min((this.useAll?e+1:e)+4,s.length-1),i=s?.[o];i&&this.scrollToOption(i,"instant")}if(this.isDropdownReady=!0,this.searchable){const t=await this.getNativeInputElement();t&&requestAnimationFrame((()=>{t.focus({preventScroll:!0})}))}}))}))}dropdownRef;searchRef;optionRef;get dropdownSize(){return{"--select-dropdown-width":this.width||"200px","--select-dropdown-height":this.dropdownHeight||"260px"}}filterOptions(){this.filteredOptions=this.searchText&&""!==this.searchText.trim()?this.options.filter((t=>t.label.toLowerCase().includes(this.searchText.toLowerCase()))):this.options}getSelectedOption(){return"object"!=typeof this.value?this.options.find((t=>t.value===this.value)):this.options.filter((t=>this.value?.includes(t)))}isOptionSelected(t){return Array.isArray(this.value)?this.value.some((e=>e.value===t)):t===this.value}async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}scrollToOption(t,e="smooth"){if(!this.dropdownRef||!t)return;const s=this.dropdownRef,o=t.offsetTop,i=t.offsetHeight,d=s.scrollTop,n=s.clientHeight,r=s.querySelector(".sd-select-search-input"),a=r?r.offsetHeight:0,c=d+n;o<d+a?s.scrollTo({top:o-a,behavior:e}):o+i>c&&s.scrollTo({top:o+i-n+a,behavior:e})}handleDropdownScroll=t=>{this.isScrolled=t.target.scrollTop>0};render(){return o("div",{key:"70bea150872ff4b70b70d358972b14bf0ad2bdf2",class:{"sd-select-dropdown":!0,"sd-select-dropdown--ready":this.isDropdownReady},style:this.dropdownSize,onScroll:this.handleDropdownScroll,ref:t=>this.dropdownRef=t},this.searchable&&o("sd-select-search-input",{key:"79ebdc72ca4a905f700dc6293d8033a5ec22d679",ref:t=>this.searchRef=t,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:t=>this.searchText=t.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?this.filteredOptions.map(((t,e)=>o("slot",{name:`option-${t.value}`},o("sd-select-option",{option:t,index:e,isSelected:this.isOptionSelected(t.value),isFocused:e===this.itemIndex,onOptionClick:({detail:t})=>this.optionClick.emit(t),useCheckbox:this.useCheckbox})))):o("slot",{name:"option-placeholder"},o("div",{class:"sd-select-option-placeholder"},this.optionPlaceholder)))}static get watchers(){return{filteredOptions:[{filteredOptionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}]}}static get style(){return".sd-select-dropdown .sd-select-option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}.sd-select-dropdown{overflow:auto;min-width:fit-content;width:var(--select-dropdown-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;display:flex;flex-direction:column;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-dropdown--ready{opacity:1}"}},[772,"sd-select-dropdown",{itemIndex:[1026,"item-index"],value:[8],options:[16],width:[1],dropdownHeight:[1,"dropdown-height"],searchable:[4],optionPlaceholder:[1,"option-placeholder"],useCheckbox:[4,"use-checkbox"],useAll:[4,"use-all"],filteredOptions:[32],searchText:[32],isScrolled:[32],isDropdownReady:[32]},void 0,{filteredOptions:[{filteredOptionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}]}]);function f(){"undefined"!=typeof customElements&&["sd-select-dropdown","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-input","sd-select-option","sd-select-search-input","sd-tooltip"].forEach((t=>{switch(t){case"sd-select-dropdown":customElements.get(i(t))||customElements.define(i(t),u);break;case"sd-button":customElements.get(i(t))||d();break;case"sd-checkbox":customElements.get(i(t))||n();break;case"sd-field":customElements.get(i(t))||r();break;case"sd-floating-portal":customElements.get(i(t))||a();break;case"sd-icon":customElements.get(i(t))||c();break;case"sd-input":customElements.get(i(t))||h();break;case"sd-select-option":customElements.get(i(t))||l();break;case"sd-select-search-input":customElements.get(i(t))||p();break;case"sd-tooltip":customElements.get(i(t))||m()}}))}export{u as S,f as d}
@@ -0,0 +1 @@
1
+ import{p as t,H as e,h as s,F as o,t as i}from"./p-B1vJXa29.js";import{T as n}from"./p-D-ian_bu.js";import{d as a}from"./p-BKtAiyh0.js";import{d as l}from"./p-BfqA9RSe.js";import{d as c}from"./p-C7dgr7sG.js";var r={bg:"#07284A",content:"#FFFFFF"},d={bg:"#FCEFEF",content:"#FB4444"},h={bg:"#FEF1EA",content:"#FF6B00"},p={bg:"#E6F1FF",content:"#0075FF"};const b={default:{bg:r.bg,content:r.content},danger:{bg:d.bg,content:d.content},warning:{bg:h.bg,content:h.content},accent:{bg:p.bg,content:p.content}},f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";noHover=!0;showTooltip=!1;slotContentHTML="";buttonEl;get tooltipOffset(){switch(this.placement){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>{this.showTooltip=!1};componentWillLoad(){this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren(),this.el.classList.toggle("visible",!0)}render(){const t=b[this.tooltipType]??b.default,e="hover"===this.trigger?{onMouseEnter:()=>this.showTooltip=!0,onMouseLeave:()=>this.showTooltip=!1}:{onClick:()=>this.showTooltip=!this.showTooltip};return s(o,{key:"2890811dd681299b155d191d6d6023441db6debc"},this.label?s("sd-button",{ref:t=>this.buttonEl=t,label:this.label,icon:this.icon,size:this.buttonSize,color:this.color,variant:this.buttonVariant,class:"sd-tooltip",..."hover"===this.trigger?{onMouseEnter:()=>this.showTooltip=!0,onMouseLeave:()=>this.showTooltip=!1}:{onSdClick:()=>this.showTooltip=!this.showTooltip}}):s("sd-icon",{ref:t=>this.buttonEl=t,name:this.icon,size:this.iconSize,color:this.color,class:"sd-tooltip",...e}),this.showTooltip&&s("sd-floating-portal",{key:"666cf59e0548af92eff225cd91b485824b82249d",parentRef:this.buttonEl,onSdClose:this.handleClose.bind(this),placement:this.placement,offset:this.tooltipOffset},s("div",{key:"ad5285750f95fdb0829372dd3b45d96035a02315",class:{"sd-floating-menu":!0,[`sd-floating-menu--${this.tooltipType}`]:!0,[`sd-floating-menu--${this.placement}`]:!0},style:{"--sd-floating-bg":t.bg,"--sd-floating-content":t.content}},s("i",{key:"ee92f004dbd17de84a3410bd555da735c5fcb4ca",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}`},s(n,{key:"04ccadfa1de8bcf3b64218e6e048fcbf09ff3301"})),s("div",{key:"0534c8cec5c79c8b0df3950d554a1b62d1e3b32b",class:"sd-floating-menu__content",innerHTML:this.slotContentHTML}))))}static get style(){return"sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip{position:relative;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}"}},[512,"sd-tooltip",{trigger:[1],placement:[1],color:[1],tooltipType:[1,"tooltip-type"],icon:[1],iconSize:[2,"icon-size"],label:[1],buttonSize:[1,"button-size"],buttonVariant:[1,"button-variant"],noHover:[4,"no-hover"],showTooltip:[32],slotContentHTML:[32]}]);function u(){"undefined"!=typeof customElements&&["sd-tooltip","sd-button","sd-floating-portal","sd-icon"].forEach((t=>{switch(t){case"sd-tooltip":customElements.get(i(t))||customElements.define(i(t),f);break;case"sd-button":customElements.get(i(t))||a();break;case"sd-floating-portal":customElements.get(i(t))||l();break;case"sd-icon":customElements.get(i(t))||c()}}))}export{f as S,u as d}
@@ -0,0 +1 @@
1
+ import{p as t,H as o,c as e,h as s,t as a}from"./p-B1vJXa29.js";import{d as i}from"./p-Cx2K_zB2.js";import{d}from"./p-C7dgr7sG.js";import{d as n}from"./p-CrJXDjO0.js";var l={title:{icon:"32"},positive:{icon:"#0075FF"},negative:{icon:"#E30000"}},m={size:"20",color:"#888888"};const c={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},r={positive:"notificationOutline",negative:"warningOutline",default:null},f={positive:l.positive.icon,negative:l.negative.icon,default:""},b=Number(l.title.icon),h=Number(m.size),p=m.color,g=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=e(this,"sdClose"),this.ok=e(this,"sdOk")}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;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 resolvedMainButton(){return this.mainButtonName??c[this.type]}get hasTagContent(){return!(!this.tagLabel&&!this.slotLabel)}get showContentBox(){return!!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=r[this.type],o=f[this.type];return s("div",{key:"9dd835c1020a29e99257690b5d4d6038b13fe5e4",class:"sd-confirm-modal"},s("sd-icon",{key:"17fea9642aabb047a8017c37beffe3e0b64707c2",class:"sd-confirm-modal__close-button",name:"close",size:h,color:p,onClick:()=>this.close.emit()}),t&&s("sd-icon",{key:"5198d65dbac64b483f63f8a65f7cad987a14e24b",class:"sd-confirm-modal__icon",name:t,size:b,color:o}),s("h2",{key:"045887b2224ed46f4d6158a2d3ffc25261a0156d",class:`sd-confirm-modal__title ${this.titleClass}`},this.modalTitle),s("div",{key:"7f9ce8c5bef7a8f9ee580671ccdb79c093066ee3",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&s("div",{key:"ac533ca4a1dc011d0bbb0c5c72c14228f680741a",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>s("p",{class:"sd-confirm-modal__message-text",innerHTML:t})))),this.showContentBox&&s("div",{key:"2fde04429ca9efb0b9ae30116e9a0fd7f57b904e",class:"sd-confirm-modal__content-box"},this.tagContents?s("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):s("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&s("sd-tag",{name:this.tagPreset,label:this.tagLabel}),this.slotLabel&&s("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&s("div",{key:"5f97a8bf91a60b553b21d80f4b133d2c79e97ba6",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>s("p",{class:"sd-confirm-modal__message-text",innerHTML:t}))))),s("div",{key:"4cde2779f11b274d71b90dd75584f8ccd9d3044d",class:"sd-confirm-modal__button"},this.subButtonLabel&&s("sd-button-v2",{key:"9e64571f556c6cfdb9c69dc70e54a2f4bdec7bb6",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.close.emit()}),s("sd-button-v2",{key:"dd86f7cce973862d94e26910341995f743e1944b",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:16px;right:16px;cursor:pointer}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:22px;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:32px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function u(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button-v2","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(a(t))||customElements.define(a(t),g);break;case"sd-button-v2":customElements.get(a(t))||i();break;case"sd-icon":customElements.get(a(t))||d();break;case"sd-tag":customElements.get(a(t))||n()}}))}export{g as S,u as d}
@@ -1 +1 @@
1
- import{p as e,H as t,c as i,h as a,t as s}from"./p-B1vJXa29.js";import{n}from"./p-CCwNgVmC.js";import{i as d}from"./p-CbjDAdZ_.js";import{s as o}from"./p-CS6ohqwt.js";import{d as r}from"./p-BKtAiyh0.js";import{d as l}from"./p-DGA1KNaL.js";import{d as p}from"./p-BfqA9RSe.js";import{d as c}from"./p-C7dgr7sG.js";import{d as u}from"./p-C4sDmQQ3.js";const h=d.input.sm,f=d.input.md,g={sm:{height:h.height,paddingX:h.paddingX,gap:h.gap,radius:h.radius,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight},md:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},m={text:d.input.text,icon:d.input.icon},b={frameSize:Number(d.input.size.icon),iconSize:Number(o.size.field.icon)},_=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.input=i(this,"sdUpdate"),this.focus=i(this,"sdFocus"),this.blur=i(this,"sdBlur")}get host(){return this}value=null;type="text";size="sm";addonLabel="";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=n();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{this.internalValue=e.target.value};handleFocus=async(e,t)=>{this.focused="focus"===e,"blur"===e?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(t)):this.focus?.emit(t)};render(){const e=g[this.size]??g.sm;return a("sd-field",{key:"82adfc401e74a6d823aa4f95442aa74b663e3ee4",name:this.name,label:this.label,addonLabel:this.addonLabel,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${e.fontSize}px`,"--sd-input-line-height":`${e.lineHeight}px`,"--sd-input-font-weight":e.fontWeight,"--sd-input-padding-x":`${e.paddingX}px`,"--sd-input-gap":`${e.gap}px`,"--sd-input-text-color":m.text.default,"--sd-input-placeholder-color":m.text.placeholder,"--sd-input-disabled-color":m.text.disabled,"--sd-input-icon-color":m.icon.default,"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`}},a("label",{key:"6c7a76e6d863cddf4e7ca83d1231255fe5e7edea",class:"sd-input__content"},a("slot",{key:"14ab01247317f114f92127b6c1c43c42251fa90c",name:"prefix"}),a("input",{key:"ee546204bc6cfa28f8e42dce6deebdf251dc04da",name:this.name,ref:e=>this.nativeEl=e,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type,value:this.internalValue||"",placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onFocus:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.inputStyle}),a("slot",{key:"4f52aa176c00462996d8794da1d8fd86c468e132",name:"suffix"}),this.clearable&&this.internalValue&&a("sd-icon",{key:"40ab163ef22e68a261e639ec5d8fb3bc1d6cd42a",name:"close",color:m.icon.default,size:b.iconSize,class:"sd-input__clear-icon",onClick:async()=>{this.internalValue="",await(this.formField?.sdValidate())}}),"password"===this.type&&a("sd-icon",{key:"d841ed3ca46d065048107b8733c41e63155b0990",name:this.passwordVisible?"visibilityOn":"visibilityOff",color:m.icon.default,size:b.frameSize,class:"sd-input__password-icon",onClick:()=>{this.passwordVisible=!this.passwordVisible}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}.sd-date-picker{width:100%;display:inline-block}.sd-date-picker .sd-date-picker--disabled .date-icon{cursor:not-allowed !important;color:#888888 !important}.sd-date-picker .sd-date-picker__input{text-align:center !important}.sd-date-picker__menu{border-radius:8px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-date-range-picker{width:fit-content;display:inline-flex}sd-date-range-picker .sd-date-range-picker--disabled .date-icon{cursor:not-allowed !important;color:#888888 !important}sd-date-range-picker .sd-date-range-picker--disabled .sd-input__native{color:#888888 !important}sd-date-range-picker .sd-field .sd-field__control{min-width:210px}sd-date-range-picker .sd-field .sd-input__native{margin-left:17px !important}.sd-date-range-picker__menu{width:609px;box-sizing:border-box;border-radius:8px;padding:24px 19px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);background:white}.sd-date-range-picker__menu .sd-date-range-picker__header{margin-bottom:16px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.sd-date-range-picker__menu .sd-date-range-picker__header .header-label{margin:0 12px;width:40px;text-align:center;font-size:14px;line-height:24px}.sd-date-range-picker__menu .sd-date-range-picker__body{display:flex;flex-flow:row nowrap;align-items:stretch;gap:19px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container{width:266px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header{width:100%;height:24px;line-height:24px;font-size:14px;text-align:center;position:relative;padding:0 5px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button{position:absolute;top:50%;transform:translateY(-50%)}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button.header-button-prev{left:5px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button.header-button-next{right:5px;left:auto}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-days{padding:0 5px;margin-top:8px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr));column-gap:10px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-days .day{width:28px;height:20px;font-size:12px;line-height:20px;text-align:center;color:#888888}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-body{margin-top:12px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr))}.sd-date-range-picker__menu .sd-date-range-picker__body .separator{width:1px;background-color:#D8D8D8}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0;cursor:pointer}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-icon","sd-tooltip"].forEach((e=>{switch(e){case"sd-input":customElements.get(s(e))||customElements.define(s(e),_);break;case"sd-button":customElements.get(s(e))||r();break;case"sd-field":customElements.get(s(e))||l();break;case"sd-floating-portal":customElements.get(s(e))||p();break;case"sd-icon":customElements.get(s(e))||c();break;case"sd-tooltip":customElements.get(s(e))||u()}}))}export{_ as S,x as d}
1
+ import{p as e,H as t,c as i,h as a,t as s}from"./p-B1vJXa29.js";import{n}from"./p-CCwNgVmC.js";import{i as d}from"./p-CbjDAdZ_.js";import{s as o}from"./p-CS6ohqwt.js";import{d as r}from"./p-BKtAiyh0.js";import{d as l}from"./p-AfdVu7_V.js";import{d as p}from"./p-BfqA9RSe.js";import{d as c}from"./p-C7dgr7sG.js";import{d as u}from"./p-CArAuWdh.js";const h=d.input.sm,f=d.input.md,g={sm:{height:h.height,paddingX:h.paddingX,gap:h.gap,radius:h.radius,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight},md:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},b={text:d.input.text,icon:d.input.icon},m={frameSize:Number(d.input.size.icon),iconSize:Number(o.size.field.icon)},_=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.input=i(this,"sdUpdate"),this.focus=i(this,"sdFocus"),this.blur=i(this,"sdBlur")}get host(){return this}value=null;type="text";size="sm";addonLabel="";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=n();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{this.internalValue=e.target.value};handleFocus=async(e,t)=>{this.focused="focus"===e,"blur"===e?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(t)):this.focus?.emit(t)};render(){const e=g[this.size]??g.sm;return a("sd-field",{key:"82adfc401e74a6d823aa4f95442aa74b663e3ee4",name:this.name,label:this.label,addonLabel:this.addonLabel,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${e.fontSize}px`,"--sd-input-line-height":`${e.lineHeight}px`,"--sd-input-font-weight":e.fontWeight,"--sd-input-padding-x":`${e.paddingX}px`,"--sd-input-gap":`${e.gap}px`,"--sd-input-text-color":b.text.default,"--sd-input-placeholder-color":b.text.placeholder,"--sd-input-disabled-color":b.text.disabled,"--sd-input-icon-color":b.icon.default,"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`}},a("label",{key:"6c7a76e6d863cddf4e7ca83d1231255fe5e7edea",class:"sd-input__content"},a("slot",{key:"14ab01247317f114f92127b6c1c43c42251fa90c",name:"prefix"}),a("input",{key:"ee546204bc6cfa28f8e42dce6deebdf251dc04da",name:this.name,ref:e=>this.nativeEl=e,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type,value:this.internalValue||"",placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onFocus:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.inputStyle}),a("slot",{key:"4f52aa176c00462996d8794da1d8fd86c468e132",name:"suffix"}),this.clearable&&this.internalValue&&a("sd-icon",{key:"40ab163ef22e68a261e639ec5d8fb3bc1d6cd42a",name:"close",color:b.icon.default,size:m.iconSize,class:"sd-input__clear-icon",onClick:async()=>{this.internalValue="",await(this.formField?.sdValidate())}}),"password"===this.type&&a("sd-icon",{key:"d841ed3ca46d065048107b8733c41e63155b0990",name:this.passwordVisible?"visibilityOn":"visibilityOff",color:b.icon.default,size:m.frameSize,class:"sd-input__password-icon",onClick:()=>{this.passwordVisible=!this.passwordVisible}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}.sd-date-picker{width:100%;display:inline-block}.sd-date-picker .sd-date-picker--disabled .date-icon{cursor:not-allowed !important;color:#888888 !important}.sd-date-picker .sd-date-picker__input{text-align:center !important}.sd-date-picker__menu{border-radius:8px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-date-range-picker{width:fit-content;display:inline-flex}sd-date-range-picker .sd-date-range-picker--disabled .date-icon{cursor:not-allowed !important;color:#888888 !important}sd-date-range-picker .sd-date-range-picker--disabled .sd-input__native{color:#888888 !important}sd-date-range-picker .sd-field .sd-field__control{min-width:210px}sd-date-range-picker .sd-field .sd-input__native{margin-left:17px !important}.sd-date-range-picker__menu{width:609px;box-sizing:border-box;border-radius:8px;padding:24px 19px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);background:white}.sd-date-range-picker__menu .sd-date-range-picker__header{margin-bottom:16px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.sd-date-range-picker__menu .sd-date-range-picker__header .header-label{margin:0 12px;width:40px;text-align:center;font-size:14px;line-height:24px}.sd-date-range-picker__menu .sd-date-range-picker__body{display:flex;flex-flow:row nowrap;align-items:stretch;gap:19px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container{width:266px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header{width:100%;height:24px;line-height:24px;font-size:14px;text-align:center;position:relative;padding:0 5px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button{position:absolute;top:50%;transform:translateY(-50%)}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button.header-button-prev{left:5px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button.header-button-next{right:5px;left:auto}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-days{padding:0 5px;margin-top:8px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr));column-gap:10px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-days .day{width:28px;height:20px;font-size:12px;line-height:20px;text-align:center;color:#888888}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-body{margin-top:12px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr))}.sd-date-range-picker__menu .sd-date-range-picker__body .separator{width:1px;background-color:#D8D8D8}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0;cursor:pointer}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-icon","sd-tooltip"].forEach((e=>{switch(e){case"sd-input":customElements.get(s(e))||customElements.define(s(e),_);break;case"sd-button":customElements.get(s(e))||r();break;case"sd-field":customElements.get(s(e))||l();break;case"sd-floating-portal":customElements.get(s(e))||p();break;case"sd-icon":customElements.get(s(e))||c();break;case"sd-tooltip":customElements.get(s(e))||u()}}))}export{_ as S,x as d}
@@ -1 +1 @@
1
- import{p as s,H as e,c as t,h as c,t as a}from"./p-B1vJXa29.js";import{d as i}from"./p-BKtAiyh0.js";import{d as r}from"./p-DGA1KNaL.js";import{d as o}from"./p-BfqA9RSe.js";import{d as n}from"./p-C7dgr7sG.js";import{d}from"./p-DpqpugGF.js";import{d as l}from"./p-C4sDmQQ3.js";const p=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.searchInput=t(this,"sdSearchInput"),this.searchFocus=t(this,"sdSearchFocus")}isScrolled=!1;searchText="";searchInput;searchFocus;searchRef;async sdGetNativeElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}async sdSearchInputFocus(){const s=await this.sdGetNativeElement();s?.focus({preventScroll:!0})}render(){return c("div",{key:"82fd2b838c46c47b51b93a23e5a837708fb944b1",class:{"sd-select-search-input":!0,"sd-select-search-input--scrolled":!!this.isScrolled},onClick:s=>s.stopPropagation()},c("sd-input",{key:"fc0821ce63f445bed3dfce51668ece1831914f86",ref:s=>this.searchRef=s,value:this.searchText,placeholder:"검색",clearable:!0,inputStyle:{"padding-left":"8px"},autofocus:!0,onSdUpdate:s=>{this.searchInput.emit(String(s?.detail))},onSdFocus:()=>{this.searchFocus.emit()},onKeyDown:s=>{"Enter"===s.code&&s.stopPropagation()}},c("sd-icon",{key:"6a9b19f5910132be045e3a2cc33546307e3d5cb9",name:"search",size:16,color:"#737373",style:{marginRight:"4px"},slot:"prefix"})))}static get style(){return"sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center}sd-select-search-input .sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center;padding:4px 8px}sd-select-search-input .sd-select-search-input sd-input{width:100%}sd-select-search-input .sd-select-search-input--scrolled{box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}"}},[512,"sd-select-search-input",{isScrolled:[4,"is-scrolled"],searchText:[1,"search-text"],sdGetNativeElement:[64],sdSearchInputFocus:[64]}]);function u(){"undefined"!=typeof customElements&&["sd-select-search-input","sd-button","sd-field","sd-floating-portal","sd-icon","sd-input","sd-tooltip"].forEach((s=>{switch(s){case"sd-select-search-input":customElements.get(a(s))||customElements.define(a(s),p);break;case"sd-button":customElements.get(a(s))||i();break;case"sd-field":customElements.get(a(s))||r();break;case"sd-floating-portal":customElements.get(a(s))||o();break;case"sd-icon":customElements.get(a(s))||n();break;case"sd-input":customElements.get(a(s))||d();break;case"sd-tooltip":customElements.get(a(s))||l()}}))}export{p as S,u as d}
1
+ import{p as s,H as e,c as t,h as c,t as a}from"./p-B1vJXa29.js";import{d as i}from"./p-BKtAiyh0.js";import{d as r}from"./p-AfdVu7_V.js";import{d as o}from"./p-BfqA9RSe.js";import{d}from"./p-C7dgr7sG.js";import{d as n}from"./p-jaHdAlr9.js";import{d as l}from"./p-CArAuWdh.js";const p=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.searchInput=t(this,"sdSearchInput"),this.searchFocus=t(this,"sdSearchFocus")}isScrolled=!1;searchText="";searchInput;searchFocus;searchRef;async sdGetNativeElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}async sdSearchInputFocus(){const s=await this.sdGetNativeElement();s?.focus({preventScroll:!0})}render(){return c("div",{key:"82fd2b838c46c47b51b93a23e5a837708fb944b1",class:{"sd-select-search-input":!0,"sd-select-search-input--scrolled":!!this.isScrolled},onClick:s=>s.stopPropagation()},c("sd-input",{key:"fc0821ce63f445bed3dfce51668ece1831914f86",ref:s=>this.searchRef=s,value:this.searchText,placeholder:"검색",clearable:!0,inputStyle:{"padding-left":"8px"},autofocus:!0,onSdUpdate:s=>{this.searchInput.emit(String(s?.detail))},onSdFocus:()=>{this.searchFocus.emit()},onKeyDown:s=>{"Enter"===s.code&&s.stopPropagation()}},c("sd-icon",{key:"6a9b19f5910132be045e3a2cc33546307e3d5cb9",name:"search",size:16,color:"#737373",style:{marginRight:"4px"},slot:"prefix"})))}static get style(){return"sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center}sd-select-search-input .sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center;padding:4px 8px}sd-select-search-input .sd-select-search-input sd-input{width:100%}sd-select-search-input .sd-select-search-input--scrolled{box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}"}},[512,"sd-select-search-input",{isScrolled:[4,"is-scrolled"],searchText:[1,"search-text"],sdGetNativeElement:[64],sdSearchInputFocus:[64]}]);function u(){"undefined"!=typeof customElements&&["sd-select-search-input","sd-button","sd-field","sd-floating-portal","sd-icon","sd-input","sd-tooltip"].forEach((s=>{switch(s){case"sd-select-search-input":customElements.get(a(s))||customElements.define(a(s),p);break;case"sd-button":customElements.get(a(s))||i();break;case"sd-field":customElements.get(a(s))||r();break;case"sd-floating-portal":customElements.get(a(s))||o();break;case"sd-icon":customElements.get(a(s))||d();break;case"sd-input":customElements.get(a(s))||n();break;case"sd-tooltip":customElements.get(a(s))||l()}}))}export{p as S,u as d}