@sellmate/design-system 1.0.21 → 1.0.22

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 (161) hide show
  1. package/dist/cjs/{select-keyboard-navigation-CtstKOb3.js → base-dropdown-event-BTPlZ1KF.js} +0 -38
  2. package/dist/cjs/component.button-C6xBMwHf.js +115 -0
  3. package/dist/cjs/design-system.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/sd-button-v2.cjs.entry.js +86 -0
  6. package/dist/cjs/sd-button-v2.config-BK45EPK_.js +203 -0
  7. package/dist/cjs/sd-button_21.cjs.entry.js +119 -65
  8. package/dist/cjs/sd-card.cjs.entry.js +1 -1
  9. package/dist/cjs/sd-date-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/sd-dropdown-button.cjs.entry.js +274 -0
  11. package/dist/cjs/sd-file-picker.cjs.entry.js +3 -3
  12. package/dist/cjs/sd-guide.cjs.entry.js +2 -2
  13. package/dist/cjs/sd-popover.cjs.entry.js +2 -2
  14. package/dist/cjs/sd-progress.cjs.entry.js +2 -2
  15. package/dist/cjs/sd-select-multiple-group.cjs.entry.js +3 -2
  16. package/dist/cjs/sd-select-multiple.cjs.entry.js +4 -3
  17. package/dist/cjs/sd-select-option-group.cjs.entry.js +3 -3
  18. package/dist/cjs/sd-toggle-button.cjs.entry.js +1 -1
  19. package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
  20. package/dist/cjs/select-keyboard-navigation-s2wP37xZ.js +40 -0
  21. package/dist/collection/collection-manifest.json +3 -1
  22. package/dist/collection/components/sd-button-v2/sd-button-v2.config.js +190 -0
  23. package/dist/collection/components/sd-button-v2/sd-button-v2.css +120 -0
  24. package/dist/collection/components/sd-button-v2/sd-button-v2.js +249 -0
  25. package/dist/collection/components/sd-card/sd-card.js +1 -1
  26. package/dist/collection/components/sd-date-picker/sd-date-picker.js +1 -1
  27. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +2 -2
  28. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +62 -0
  29. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.css +171 -0
  30. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +384 -0
  31. package/dist/collection/components/sd-field/sd-field.js +3 -3
  32. package/dist/collection/components/sd-file-picker/sd-file-picker.js +3 -3
  33. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  34. package/dist/collection/components/sd-guide/sd-guide.js +2 -2
  35. package/dist/collection/components/sd-icon/sd-icon.js +1 -1
  36. package/dist/collection/components/sd-input/sd-input.js +1 -1
  37. package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
  38. package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
  39. package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
  40. package/dist/collection/components/sd-popover/sd-popover.js +2 -2
  41. package/dist/collection/components/sd-portal/sd-portal.js +89 -19
  42. package/dist/collection/components/sd-progress/sd-progress.js +2 -2
  43. package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +2 -2
  44. package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
  45. package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
  46. package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +1 -1
  47. package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
  48. package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
  49. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  50. package/dist/collection/components/sd-toggle-button/sd-toggle-button.js +1 -1
  51. package/dist/components/{p-D0U1cMbs.js → p-B4p2JGMI.js} +1 -1
  52. package/dist/components/p-Bd9o9P1x.js +1 -0
  53. package/dist/components/{p-rn5S2icF.js → p-BsQEKShq.js} +1 -1
  54. package/dist/components/{p-CbQobmaB.js → p-CAJmL8nc.js} +1 -1
  55. package/dist/components/p-CWlCxabU.js +1 -0
  56. package/dist/components/p-Cy6HMEsK.js +1 -0
  57. package/dist/components/{p-C1XPuuO-.js → p-CysnHGj4.js} +1 -1
  58. package/dist/components/{p-qSu-ayDy.js → p-D4kmO3k7.js} +1 -1
  59. package/dist/components/{p-DdOM8yc2.js → p-DB52ADSW.js} +1 -1
  60. package/dist/components/{p-J-Yn0oS3.js → p-DExqkuUY.js} +1 -1
  61. package/dist/components/{p-MmKik3mL.js → p-DF2wExtn.js} +1 -1
  62. package/dist/components/{p-D35gOcGh.js → p-DFgtwoFG.js} +1 -1
  63. package/dist/components/{p-BVFlD1Lp.js → p-DYsHXden.js} +1 -1
  64. package/dist/components/{p-CWg2auF3.js → p-DZqrfwuw.js} +1 -1
  65. package/dist/components/p-Dc4UTGgQ.js +1 -0
  66. package/dist/components/{p-CU5TiEeI.js → p-DyeU47vV.js} +1 -1
  67. package/dist/components/p-Hvt2oWRk.js +1 -0
  68. package/dist/components/{p-Cef06v8S.js → p-JyVgfdnC.js} +1 -1
  69. package/dist/components/p-VKF2AWs1.js +1 -0
  70. package/dist/components/sd-button-v2.d.ts +11 -0
  71. package/dist/components/sd-button-v2.js +1 -0
  72. package/dist/components/sd-button.js +1 -1
  73. package/dist/components/sd-card.js +1 -1
  74. package/dist/components/sd-checkbox.js +1 -1
  75. package/dist/components/sd-date-picker.js +1 -1
  76. package/dist/components/sd-date-range-picker.js +1 -1
  77. package/dist/components/sd-dropdown-button.d.ts +11 -0
  78. package/dist/components/sd-dropdown-button.js +1 -0
  79. package/dist/components/sd-field.js +1 -1
  80. package/dist/components/sd-file-picker.js +1 -1
  81. package/dist/components/sd-floating-portal.js +1 -1
  82. package/dist/components/sd-guide.js +1 -1
  83. package/dist/components/sd-icon.js +1 -1
  84. package/dist/components/sd-input.js +1 -1
  85. package/dist/components/sd-loading-spinner.js +1 -1
  86. package/dist/components/sd-modal-card.js +1 -1
  87. package/dist/components/sd-number-input.js +1 -1
  88. package/dist/components/sd-pagination.js +1 -1
  89. package/dist/components/sd-popover.js +1 -1
  90. package/dist/components/sd-portal.js +1 -1
  91. package/dist/components/sd-progress.js +1 -1
  92. package/dist/components/sd-select-dropdown.js +1 -1
  93. package/dist/components/sd-select-multiple-group.js +1 -1
  94. package/dist/components/sd-select-multiple.js +1 -1
  95. package/dist/components/sd-select-option-group.js +1 -1
  96. package/dist/components/sd-select-option.js +1 -1
  97. package/dist/components/sd-select-search-input.js +1 -1
  98. package/dist/components/sd-select.js +1 -1
  99. package/dist/components/sd-table.js +1 -1
  100. package/dist/components/sd-textarea.js +1 -1
  101. package/dist/components/sd-toast.js +1 -1
  102. package/dist/components/sd-toggle-button.js +1 -1
  103. package/dist/components/sd-toggle.js +1 -1
  104. package/dist/components/sd-tooltip.js +1 -1
  105. package/dist/design-system/design-system.esm.js +1 -1
  106. package/dist/design-system/p-2ca338f9.entry.js +1 -0
  107. package/dist/design-system/p-322dbf53.entry.js +1 -0
  108. package/dist/design-system/p-3885ca10.entry.js +1 -0
  109. package/dist/design-system/{p-d6b38732.entry.js → p-40da6e22.entry.js} +1 -1
  110. package/dist/design-system/{p-679e4367.entry.js → p-47d37199.entry.js} +1 -1
  111. package/dist/design-system/{p-3301c280.entry.js → p-6c34df5b.entry.js} +1 -1
  112. package/dist/design-system/p-7d35c7a7.entry.js +1 -0
  113. package/dist/design-system/{p-3d03b19e.entry.js → p-938940a7.entry.js} +1 -1
  114. package/dist/design-system/p-9650c304.entry.js +1 -0
  115. package/dist/design-system/{p-8f99cd66.entry.js → p-9ad83ffb.entry.js} +1 -1
  116. package/dist/design-system/p-CRdYeSBK.js +1 -0
  117. package/dist/design-system/p-Dc4UTGgQ.js +1 -0
  118. package/dist/design-system/p-VKF2AWs1.js +1 -0
  119. package/dist/design-system/{p-d344fa9d.entry.js → p-a547f366.entry.js} +1 -1
  120. package/dist/design-system/{p-3e07e92a.entry.js → p-b2ab1c50.entry.js} +1 -1
  121. package/dist/design-system/p-d38f59b3.entry.js +1 -0
  122. package/dist/design-system/{p-822233ee.entry.js → p-e5c3927f.entry.js} +1 -1
  123. package/dist/design-system/p-xxEHPVkL.js +1 -0
  124. package/dist/esm/{select-keyboard-navigation-D8-D-mJX.js → base-dropdown-event-CRdYeSBK.js} +1 -37
  125. package/dist/esm/component.button-Dc4UTGgQ.js +113 -0
  126. package/dist/esm/design-system.js +1 -1
  127. package/dist/esm/loader.js +1 -1
  128. package/dist/esm/sd-button-v2.config-BWmcscrt.js +193 -0
  129. package/dist/esm/sd-button-v2.entry.js +84 -0
  130. package/dist/esm/sd-button_21.entry.js +114 -60
  131. package/dist/esm/sd-card.entry.js +1 -1
  132. package/dist/esm/sd-date-picker.entry.js +1 -1
  133. package/dist/esm/sd-dropdown-button.entry.js +272 -0
  134. package/dist/esm/sd-file-picker.entry.js +3 -3
  135. package/dist/esm/sd-guide.entry.js +2 -2
  136. package/dist/esm/sd-popover.entry.js +2 -2
  137. package/dist/esm/sd-progress.entry.js +2 -2
  138. package/dist/esm/sd-select-multiple-group.entry.js +2 -1
  139. package/dist/esm/sd-select-multiple.entry.js +3 -2
  140. package/dist/esm/sd-select-option-group.entry.js +3 -3
  141. package/dist/esm/sd-toggle-button.entry.js +1 -1
  142. package/dist/esm/sd-toggle.entry.js +1 -1
  143. package/dist/esm/select-keyboard-navigation-xxEHPVkL.js +37 -0
  144. package/dist/types/components/sd-button-v2/sd-button-v2.config.d.ts +178 -0
  145. package/dist/types/components/sd-button-v2/sd-button-v2.d.ts +18 -0
  146. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +55 -0
  147. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.d.ts +34 -0
  148. package/dist/types/components/sd-portal/sd-portal.d.ts +9 -0
  149. package/dist/types/components.d.ts +153 -0
  150. package/dist/types/index.d.ts +2 -0
  151. package/hydrate/index.js +881 -148
  152. package/hydrate/index.mjs +881 -148
  153. package/package.json +2 -2
  154. package/dist/components/p-B82gJZ4z.js +0 -1
  155. package/dist/components/p-C6J-ZZxF.js +0 -1
  156. package/dist/components/p-CHAh-_qx.js +0 -1
  157. package/dist/design-system/p-103de692.entry.js +0 -1
  158. package/dist/design-system/p-55c13597.entry.js +0 -1
  159. package/dist/design-system/p-D8-D-mJX.js +0 -1
  160. package/dist/design-system/p-de339565.entry.js +0 -1
  161. package/dist/design-system/p-fc0e636b.entry.js +0 -1
package/hydrate/index.js CHANGED
@@ -5514,8 +5514,103 @@ const size = {
5514
5514
  icon: "24"
5515
5515
  }
5516
5516
  };
5517
+ const border = {
5518
+ disabled: "#CCCCCC"
5519
+ };
5520
+ const dropdown = {
5521
+ xs: {
5522
+ minWidth: "60"
5523
+ },
5524
+ sm: {
5525
+ minWidth: "76"
5526
+ },
5527
+ md: {
5528
+ minWidth: "106"
5529
+ }
5530
+ };
5531
+ const bg = {
5532
+ disabled: "#E1E1E1"
5533
+ };
5534
+ const content = {
5535
+ disabled: "#888888"
5536
+ };
5537
+ const brand = {
5538
+ strong: {
5539
+ bg: {
5540
+ "default": "#025497",
5541
+ hover: "#004177"
5542
+ },
5543
+ content: "#FFFFFF",
5544
+ dropdown: {
5545
+ divider: "#006AC1"
5546
+ }
5547
+ },
5548
+ subtle: {
5549
+ bg: {
5550
+ "default": "#1F8AE1",
5551
+ hover: "#006AC1"
5552
+ },
5553
+ content: "#FFFFFF",
5554
+ dropdown: {
5555
+ divider: "#5CB0F3"
5556
+ }
5557
+ },
5558
+ outline: {
5559
+ bg: {
5560
+ "default": "#FFFFFF",
5561
+ hover: "#EAF5FE"
5562
+ },
5563
+ border: "#025497",
5564
+ content: "#025497"
5565
+ }
5566
+ };
5567
+ const neutral = {
5568
+ subtle: {
5569
+ bg: {
5570
+ "default": "#FFFFFF",
5571
+ hover: "#EEEEEE"
5572
+ },
5573
+ content: "#333333"
5574
+ },
5575
+ outline: {
5576
+ bg: {
5577
+ "default": "#FFFFFF",
5578
+ hover: "#EEEEEE"
5579
+ },
5580
+ border: "#888888",
5581
+ content: "#333333"
5582
+ }
5583
+ };
5584
+ const danger = {
5585
+ strong: {
5586
+ bg: {
5587
+ "default": "#E30000",
5588
+ hover: "#AD0000"
5589
+ },
5590
+ content: "#FFFFFF",
5591
+ dropdown: {
5592
+ divider: "#FF7C7C"
5593
+ }
5594
+ },
5595
+ outline: {
5596
+ bg: {
5597
+ "default": "#FFFFFF",
5598
+ hover: "#FCEFEF"
5599
+ },
5600
+ border: "#E30000",
5601
+ content: "#E30000"
5602
+ }
5603
+ };
5517
5604
  var buttonTokens = {
5518
- size: size};
5605
+ size: size,
5606
+ border: border,
5607
+ dropdown: dropdown,
5608
+ bg: bg,
5609
+ content: content,
5610
+ brand: brand,
5611
+ neutral: neutral,
5612
+ danger: danger
5613
+ };
5519
5614
 
5520
5615
  const sdButtonCss = () => `sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:34px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);text-decoration:none;cursor:pointer;border-radius:var(--sd-button-radius-default, 4px);transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none;padding:0 var(--sd-button-padding-x);min-width:var(--sd-button-min-width, auto);min-height:var(--sd-button-height);font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);text-decoration:var(--sd-button-text-decoration)}.sd-button--xs{--sd-button-height:var(--sd-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-xs-width, var(--sd-button-height));line-height:20px}.sd-button--sm{--sd-button-height:var(--sd-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-sm-width, var(--sd-button-height));line-height:20px}.sd-button--md{--sd-button-height:var(--sd-button-md-height, 34px);--sd-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-md-width, var(--sd-button-height));line-height:26px}.sd-button--lg{--sd-button-height:var(--sd-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-lg-width, var(--sd-button-height));line-height:30px}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:"";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:var(--sd-button-border-width-default, 1px) solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:var(--sd-button-border-width-default, 1px) solid var(--sd-button-border-disabled, #CCCCCC);background:var(--sd-button-bg-disabled, #E1E1E1);color:var(--sd-button-content-disabled, #888888);cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height))}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap);z-index:1;font-weight:inherit}`;
5521
5616
 
@@ -5599,6 +5694,290 @@ class SdButton {
5599
5694
  }; }
5600
5695
  }
5601
5696
 
5697
+ const BUTTON_FOCUS_RING_COLOR = '#0075FF';
5698
+ const PRESET_DEFAULT_COLORS = {
5699
+ primary: buttonTokens.brand.strong.bg.default,
5700
+ secondary: buttonTokens.brand.subtle.bg.default,
5701
+ primary_outline: buttonTokens.brand.outline.bg.default,
5702
+ neutral: buttonTokens.neutral.subtle.bg.default,
5703
+ neutral_outline: buttonTokens.neutral.outline.bg.default,
5704
+ danger: buttonTokens.danger.strong.bg.default,
5705
+ danger_outline: buttonTokens.danger.outline.bg.default,
5706
+ };
5707
+ const BUTTON_CONFIG = {
5708
+ primary_xs: {
5709
+ variant: 'primary',
5710
+ size: 'xs',
5711
+ color: PRESET_DEFAULT_COLORS.primary,
5712
+ },
5713
+ secondary_xs: {
5714
+ variant: 'primary',
5715
+ size: 'xs',
5716
+ color: PRESET_DEFAULT_COLORS.secondary,
5717
+ },
5718
+ primary_outline_xs: {
5719
+ variant: 'outline',
5720
+ size: 'xs',
5721
+ color: PRESET_DEFAULT_COLORS.primary_outline,
5722
+ },
5723
+ neutral_xs: {
5724
+ variant: 'primary',
5725
+ size: 'xs',
5726
+ color: PRESET_DEFAULT_COLORS.neutral,
5727
+ },
5728
+ neutral_outline_xs: {
5729
+ variant: 'outline',
5730
+ size: 'xs',
5731
+ color: PRESET_DEFAULT_COLORS.neutral_outline,
5732
+ },
5733
+ danger_xs: {
5734
+ variant: 'primary',
5735
+ size: 'xs',
5736
+ color: PRESET_DEFAULT_COLORS.danger,
5737
+ },
5738
+ danger_outline_xs: {
5739
+ variant: 'outline',
5740
+ size: 'xs',
5741
+ color: PRESET_DEFAULT_COLORS.danger_outline,
5742
+ },
5743
+ primary_sm: {
5744
+ variant: 'primary',
5745
+ size: 'sm',
5746
+ color: PRESET_DEFAULT_COLORS.primary,
5747
+ },
5748
+ secondary_sm: {
5749
+ variant: 'primary',
5750
+ size: 'sm',
5751
+ color: PRESET_DEFAULT_COLORS.secondary,
5752
+ },
5753
+ primary_outline_sm: {
5754
+ variant: 'outline',
5755
+ size: 'sm',
5756
+ color: PRESET_DEFAULT_COLORS.primary_outline,
5757
+ },
5758
+ neutral_sm: {
5759
+ variant: 'primary',
5760
+ size: 'sm',
5761
+ color: PRESET_DEFAULT_COLORS.neutral,
5762
+ },
5763
+ neutral_outline_sm: {
5764
+ variant: 'outline',
5765
+ size: 'sm',
5766
+ color: PRESET_DEFAULT_COLORS.neutral_outline,
5767
+ },
5768
+ danger_sm: {
5769
+ variant: 'primary',
5770
+ size: 'sm',
5771
+ color: PRESET_DEFAULT_COLORS.danger,
5772
+ },
5773
+ danger_outline_sm: {
5774
+ variant: 'outline',
5775
+ size: 'sm',
5776
+ color: PRESET_DEFAULT_COLORS.danger_outline,
5777
+ },
5778
+ primary_md: {
5779
+ variant: 'primary',
5780
+ size: 'md',
5781
+ color: PRESET_DEFAULT_COLORS.primary,
5782
+ },
5783
+ secondary_md: {
5784
+ variant: 'primary',
5785
+ size: 'md',
5786
+ color: PRESET_DEFAULT_COLORS.secondary,
5787
+ },
5788
+ primary_outline_md: {
5789
+ variant: 'outline',
5790
+ size: 'md',
5791
+ color: PRESET_DEFAULT_COLORS.primary_outline,
5792
+ },
5793
+ neutral_md: {
5794
+ variant: 'primary',
5795
+ size: 'md',
5796
+ color: PRESET_DEFAULT_COLORS.neutral,
5797
+ },
5798
+ neutral_outline_md: {
5799
+ variant: 'outline',
5800
+ size: 'md',
5801
+ color: PRESET_DEFAULT_COLORS.neutral_outline,
5802
+ },
5803
+ danger_md: {
5804
+ variant: 'primary',
5805
+ size: 'md',
5806
+ color: PRESET_DEFAULT_COLORS.danger,
5807
+ },
5808
+ danger_outline_md: {
5809
+ variant: 'outline',
5810
+ size: 'md',
5811
+ color: PRESET_DEFAULT_COLORS.danger_outline,
5812
+ },
5813
+ primary_lg: {
5814
+ variant: 'primary',
5815
+ size: 'lg',
5816
+ color: PRESET_DEFAULT_COLORS.primary,
5817
+ },
5818
+ secondary_lg: {
5819
+ variant: 'primary',
5820
+ size: 'lg',
5821
+ color: PRESET_DEFAULT_COLORS.secondary,
5822
+ },
5823
+ primary_outline_lg: {
5824
+ variant: 'outline',
5825
+ size: 'lg',
5826
+ color: PRESET_DEFAULT_COLORS.primary_outline,
5827
+ },
5828
+ neutral_lg: {
5829
+ variant: 'primary',
5830
+ size: 'lg',
5831
+ color: PRESET_DEFAULT_COLORS.neutral,
5832
+ },
5833
+ neutral_outline_lg: {
5834
+ variant: 'outline',
5835
+ size: 'lg',
5836
+ color: PRESET_DEFAULT_COLORS.neutral_outline,
5837
+ },
5838
+ danger_lg: {
5839
+ variant: 'primary',
5840
+ size: 'lg',
5841
+ color: PRESET_DEFAULT_COLORS.danger,
5842
+ },
5843
+ danger_outline_lg: {
5844
+ variant: 'outline',
5845
+ size: 'lg',
5846
+ color: PRESET_DEFAULT_COLORS.danger_outline,
5847
+ },
5848
+ };
5849
+ const BUTTON_ICON_SIZES = {
5850
+ xs: Number(buttonTokens.size.xs.icon),
5851
+ sm: Number(buttonTokens.size.sm.icon),
5852
+ md: Number(buttonTokens.size.md.icon),
5853
+ lg: Number(buttonTokens.size.lg.icon),
5854
+ };
5855
+ const PRESET_HOVER_BACKGROUNDS$1 = {
5856
+ primary: buttonTokens.brand.strong.bg.hover,
5857
+ secondary: buttonTokens.brand.subtle.bg.hover,
5858
+ primary_outline: buttonTokens.brand.outline.bg.hover,
5859
+ neutral: buttonTokens.neutral.subtle.bg.hover,
5860
+ neutral_outline: buttonTokens.neutral.outline.bg.hover,
5861
+ danger: buttonTokens.danger.strong.bg.hover,
5862
+ danger_outline: buttonTokens.danger.outline.bg.hover,
5863
+ };
5864
+ const PRESET_CONTENT_COLORS$1 = {
5865
+ primary: buttonTokens.brand.strong.content,
5866
+ secondary: buttonTokens.brand.subtle.content,
5867
+ primary_outline: buttonTokens.brand.outline.content,
5868
+ neutral: buttonTokens.neutral.subtle.content,
5869
+ neutral_outline: buttonTokens.neutral.outline.content,
5870
+ danger: buttonTokens.danger.strong.content,
5871
+ danger_outline: buttonTokens.danger.outline.content,
5872
+ };
5873
+ const PRESET_BORDER_COLORS$1 = {
5874
+ primary: 'transparent',
5875
+ secondary: 'transparent',
5876
+ primary_outline: buttonTokens.brand.outline.border,
5877
+ neutral: 'transparent',
5878
+ neutral_outline: buttonTokens.neutral.outline.border,
5879
+ danger: 'transparent',
5880
+ danger_outline: buttonTokens.danger.outline.border,
5881
+ };
5882
+ const DISABLED_CONTENT = buttonTokens.content.disabled;
5883
+ const SIZE_SUFFIX_PATTERN = /_(xs|sm|md|lg)$/;
5884
+ const isButtonV2Name = (value) => value in BUTTON_CONFIG;
5885
+ const getPresetName = (value) => value.replace(SIZE_SUFFIX_PATTERN, '');
5886
+
5887
+ const sdButtonV2Css = () => `sd-button-v2{display:inline-flex;width:fit-content;height:fit-content}.sd-button-v2{--sd-button-v2-height:34px;--sd-button-v2-padding-x:20px;--sd-button-v2-gap:8px;--sd-button-v2-font-family:inherit;--sd-button-v2-font-size:16px;--sd-button-v2-font-weight:500;--sd-button-v2-text-decoration:none;--sd-button-v2-label-min-width:auto;--sd-button-v2-icon-only-size:var(--sd-button-v2-height);--sd-button-v2-bg:#025497;--sd-button-v2-bg-hover:#004177;--sd-button-v2-border:transparent;--sd-button-v2-content:#ffffff;display:inline-flex;align-items:center;justify-content:center;min-height:var(--sd-button-v2-height);min-width:var(--sd-button-v2-min-width, auto);padding:0 var(--sd-button-v2-padding-x);border:var(--sd-button-border-width-default, 1px) solid var(--sd-button-v2-border);border-radius:var(--sd-button-radius-default, 4px);background:var(--sd-button-v2-bg);color:var(--sd-button-v2-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-button-v2-font-family);font-size:var(--sd-button-v2-font-size);font-weight:var(--sd-button-v2-font-weight);line-height:1;text-decoration:var(--sd-button-v2-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-button-v2:hover:not(.sd-button-v2--disabled){background:var(--sd-button-v2-bg-hover)}.sd-button-v2:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-button-v2-accent)}.sd-button-v2--xs{--sd-button-v2-height:var(--sd-button-xs-height, 24px);--sd-button-v2-padding-x:var(--sd-button-xs-padding-x, 8px);--sd-button-v2-gap:var(--sd-button-xs-gap, 4px);--sd-button-v2-font-family:var(--sd-button-xs-typography-font-family, inherit);--sd-button-v2-font-size:var(--sd-button-xs-typography-font-size, 12px);--sd-button-v2-font-weight:var(--sd-button-xs-typography-font-weight, 500);--sd-button-v2-text-decoration:var(--sd-button-xs-typography-text-decoration, none);--sd-button-v2-label-min-width:var(--sd-button-label-xs-min-width, auto);--sd-button-v2-icon-only-size:var(--sd-button-icon-only-xs-width, var(--sd-button-v2-height))}.sd-button-v2--sm{--sd-button-v2-height:var(--sd-button-sm-height, 28px);--sd-button-v2-padding-x:var(--sd-button-sm-padding-x, 12px);--sd-button-v2-gap:var(--sd-button-sm-gap, 6px);--sd-button-v2-font-family:var(--sd-button-sm-typography-font-family, inherit);--sd-button-v2-font-size:var(--sd-button-sm-typography-font-size, 12px);--sd-button-v2-font-weight:var(--sd-button-sm-typography-font-weight, 500);--sd-button-v2-text-decoration:var(--sd-button-sm-typography-text-decoration, none);--sd-button-v2-label-min-width:var(--sd-button-label-sm-min-width, auto);--sd-button-v2-icon-only-size:var(--sd-button-icon-only-sm-width, var(--sd-button-v2-height))}.sd-button-v2--md{--sd-button-v2-height:var(--sd-button-md-height, 34px);--sd-button-v2-padding-x:var(--sd-button-md-padding-x, 20px);--sd-button-v2-gap:var(--sd-button-md-gap, 8px);--sd-button-v2-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-button-v2-font-size:var(--sd-button-md-typography-font-size, 16px);--sd-button-v2-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-button-v2-text-decoration:var(--sd-button-md-typography-text-decoration, none);--sd-button-v2-label-min-width:var(--sd-button-label-md-min-width, auto);--sd-button-v2-icon-only-size:var(--sd-button-icon-only-md-width, var(--sd-button-v2-height))}.sd-button-v2--lg{--sd-button-v2-height:var(--sd-button-lg-height, 62px);--sd-button-v2-padding-x:var(--sd-button-lg-padding-x, 28px);--sd-button-v2-gap:var(--sd-button-lg-gap, 12px);--sd-button-v2-font-family:var(--sd-button-lg-typography-font-family, inherit);--sd-button-v2-font-size:var(--sd-button-lg-typography-font-size, 18px);--sd-button-v2-font-weight:var(--sd-button-lg-typography-font-weight, 500);--sd-button-v2-text-decoration:var(--sd-button-lg-typography-text-decoration, none);--sd-button-v2-label-min-width:var(--sd-button-label-lg-min-width, auto);--sd-button-v2-icon-only-size:var(--sd-button-icon-only-lg-width, var(--sd-button-v2-height))}.sd-button-v2--has-label{--sd-button-v2-min-width:var(--sd-button-v2-label-min-width, auto)}.sd-button-v2--icon-only{width:var(--sd-button-v2-icon-only-size, var(--sd-button-v2-height));min-width:var(--sd-button-v2-icon-only-size, var(--sd-button-v2-height));height:var(--sd-button-v2-icon-only-size, var(--sd-button-v2-height));padding:0}.sd-button-v2--icon-only .sd-button-v2__content{gap:0}.sd-button-v2--disabled{border-color:var(--sd-button-border-disabled, #CCCCCC);background:var(--sd-button-bg-disabled, #E1E1E1);color:var(--sd-button-content-disabled, #888888);cursor:not-allowed}.sd-button-v2 .sd-button-v2__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-v2-gap)}.sd-button-v2 .sd-button-v2__label{font:inherit}`;
5888
+
5889
+ class SdButtonV2 {
5890
+ constructor(hostRef) {
5891
+ registerInstance(this, hostRef);
5892
+ this.click = createEvent(this, "sdClick");
5893
+ }
5894
+ name = 'primary_sm';
5895
+ label = '';
5896
+ icon;
5897
+ ariaLabel = '';
5898
+ disabled = false;
5899
+ type = 'button';
5900
+ click;
5901
+ hasWarnedMissingAriaLabel = false;
5902
+ handleClick = (event) => {
5903
+ if (this.disabled) {
5904
+ event.preventDefault();
5905
+ return;
5906
+ }
5907
+ this.click.emit(event);
5908
+ };
5909
+ get resolvedConfig() {
5910
+ if (!isButtonV2Name(this.name)) {
5911
+ throw new Error(`Invalid sd-button-v2 name: ${this.name}`);
5912
+ }
5913
+ const config = BUTTON_CONFIG[this.name];
5914
+ const preset = getPresetName(this.name);
5915
+ return {
5916
+ config,
5917
+ preset,
5918
+ };
5919
+ }
5920
+ getButtonClasses(preset, size, hasLabel, iconOnly) {
5921
+ const classes = ['sd-button-v2', `sd-button-v2--${preset}`, `sd-button-v2--${size}`];
5922
+ if (this.disabled) {
5923
+ classes.push('sd-button-v2--disabled');
5924
+ }
5925
+ if (iconOnly) {
5926
+ classes.push('sd-button-v2--icon-only');
5927
+ }
5928
+ if (hasLabel) {
5929
+ classes.push('sd-button-v2--has-label');
5930
+ }
5931
+ return classes.join(' ');
5932
+ }
5933
+ componentWillRender() {
5934
+ this.warnIfMissingAriaLabel();
5935
+ }
5936
+ warnIfMissingAriaLabel() {
5937
+ const iconOnly = !this.label && Boolean(this.icon);
5938
+ const missingAriaLabel = iconOnly && !this.ariaLabel.trim();
5939
+ if (!missingAriaLabel) {
5940
+ this.hasWarnedMissingAriaLabel = false;
5941
+ return;
5942
+ }
5943
+ if (this.hasWarnedMissingAriaLabel) {
5944
+ return;
5945
+ }
5946
+ console.warn(`[sd-button-v2] icon-only buttons require \`ariaLabel\`. Received name="${this.name}" icon="${this.icon}".`);
5947
+ this.hasWarnedMissingAriaLabel = true;
5948
+ }
5949
+ render() {
5950
+ const { config, preset } = this.resolvedConfig;
5951
+ const hasLabel = Boolean(this.label);
5952
+ const iconOnly = !this.label && Boolean(this.icon);
5953
+ const accessibleName = iconOnly && this.ariaLabel.trim() ? this.ariaLabel : undefined;
5954
+ const iconColor = this.disabled ? DISABLED_CONTENT : PRESET_CONTENT_COLORS$1[preset];
5955
+ return (hAsync("button", { key: 'f1c9355390568831fa0c4c7289e62e701e0174c2', class: this.getButtonClasses(preset, config.size, hasLabel, iconOnly), type: this.type, disabled: this.disabled, "aria-label": accessibleName, style: {
5956
+ '--sd-button-v2-bg': config.variant === 'primary' ? config.color : '#FFFFFF',
5957
+ '--sd-button-v2-bg-hover': PRESET_HOVER_BACKGROUNDS$1[preset],
5958
+ '--sd-button-v2-border': PRESET_BORDER_COLORS$1[preset],
5959
+ '--sd-button-v2-content': PRESET_CONTENT_COLORS$1[preset],
5960
+ '--sd-button-v2-accent': BUTTON_FOCUS_RING_COLOR,
5961
+ }, onClick: this.handleClick }, hAsync("span", { key: '2845fbd556f326db93a27b802faa96ec60345f63', class: "sd-button-v2__content" }, this.icon && (hAsync("sd-icon", { key: '5d90b15cbcd0c1cea10a5dc251fd13e6a0099fb0', class: "sd-button-v2__icon", name: this.icon, size: BUTTON_ICON_SIZES[config.size], color: iconColor })), this.label && hAsync("span", { key: '76facbfe83402fd0e5b17c1b7d4132665d8aaf5b', class: "sd-button-v2__label" }, this.label))));
5962
+ }
5963
+ static get style() { return sdButtonV2Css(); }
5964
+ static get cmpMeta() { return {
5965
+ "$flags$": 512,
5966
+ "$tagName$": "sd-button-v2",
5967
+ "$members$": {
5968
+ "name": [1],
5969
+ "label": [1],
5970
+ "icon": [1],
5971
+ "ariaLabel": [1, "aria-label"],
5972
+ "disabled": [4],
5973
+ "type": [1]
5974
+ },
5975
+ "$listeners$": undefined,
5976
+ "$lazyBundleId$": "-",
5977
+ "$attrsToReflect$": []
5978
+ }; }
5979
+ }
5980
+
5602
5981
  const sdCardCss = () => `sd-card{display:block;height:fit-content}sd-card .sd-card{border-radius:8px;background:white}sd-card .sd-card--bordered{border:1px solid #E1E1E1}`;
5603
5982
 
5604
5983
  class SdCard {
@@ -5608,7 +5987,7 @@ class SdCard {
5608
5987
  bordered = false;
5609
5988
  sdClass = '';
5610
5989
  render() {
5611
- return (hAsync(Fragment, { key: '155504b50cb1c21fc1f847af8a9e8b685f7881ef' }, hAsync("div", { key: 'c461e3e40da44586da5e02ad508bf59942a9e82a', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, hAsync("slot", { key: '0c0ee023155c08c565c3496c44699a900666b084' }))));
5990
+ return (hAsync(Fragment, { key: 'a4f5635186614df68acf04c502f804c9f0c77df5' }, hAsync("div", { key: '99af2c33f69d069e108f7f122a6e7762ea918276', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, hAsync("slot", { key: '287c27708b9b80a9f04bfff87abdb65022762a6d' }))));
5612
5991
  }
5613
5992
  static get style() { return sdCardCss(); }
5614
5993
  static get cmpMeta() { return {
@@ -5924,7 +6303,7 @@ class SdDatePicker {
5924
6303
  this.isOpen = false;
5925
6304
  };
5926
6305
  render() {
5927
- return (hAsync("div", { key: 'bb17d32f08d998e599c90cf1a7a35b17e19d3dc4', class: { 'sd-date-picker': true, 'sd-date-picker--disabled': this.disabled } }, hAsync("sd-input", { key: 'ae028d5999a8df40a83b0d77d2dd5c2e0d0d8eb0', ref: el => (this.inputEl = el), value: this.value, label: this.label, "inside-label": true, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-picker__input", onClick: () => this.openMenu() }, hAsync("sd-icon", { key: 'fbb954703d19161ab4507696a21278d5b4962b25', slot: "prefix", name: "date", size: "16", color: this.disabled ? 'grey_65' : 'grey_70', class: "date-icon", onClick: () => this.openMenu() })), this.isOpen && (hAsync("sd-portal", { key: 'a335d5d317718e30be14fdb4aa1a63cb1347b929', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.handleClose }, hAsync("div", { key: '38deef7127db10c91a51b8d6cb017d85fce25888', class: "sd-date-picker__menu" }, hAsync("div", { key: 'f2ef8eb33086103df65b434360ecc1aac2949bf9', class: "sd-date-picker__header" }, hAsync("div", { key: '8b949551a157de1e2ded7f1de621ccacd136126e', class: "year-nav" }, hAsync("button", { key: 'b1bbd712094885223c21f030c32914d14f3904c2', type: "button", name: "prev-year", title: "Previous Year", onClick: () => this.setCurrentYear(this.currentYear - 1) }, hAsync("sd-icon", { key: '7bb6f5f216d02cde59eff87fcaebc32eccbaac25', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("span", { key: '645c12556fe1b9f1d1c8f7c4cfe73c3b65ad7431', class: "year-nav__current" }, this.currentYear), hAsync("button", { key: 'f6cb58c23effd1aa0566aaacf41170482f03df51', type: "button", name: "next-year", title: "Next Year", onClick: () => this.setCurrentYear(this.currentYear + 1) }, hAsync("sd-icon", { key: 'e92ef17b8d50e5115a159d2dd984e738a920f065', name: "arrowRight", size: "12", color: "#CCCCCC" }))), hAsync("div", { key: '73018a9ca04929f4be017631e8e49a73cef71855', class: "month-nav" }, hAsync("button", { key: '0983ca35486b8ad29c09740848b4288b602d0cd9', type: "button", name: "prev-month", title: "Previous ", onClick: () => this.handleUpdateMonth('prev') }, hAsync("sd-icon", { key: '2c9257564786287f825c83391f3e05745c23cf9a', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("span", { key: '0b9e048eeea62c452671b74db468aa5587e8ddbf', class: "month-nav__current" }, this.currentMonth, "\uC6D4"), hAsync("button", { key: '3ead15a341d5e361e7fb9b1cb2842e5a38b0e03c', type: "button", name: "next-month", title: "Next Month", onClick: () => this.handleUpdateMonth('next') }, hAsync("sd-icon", { key: 'a3dbd8606dd51f72f1c315f2eea7ff089a95e6fa', name: "arrowRight", size: "12", color: "#CCCCCC" })))), hAsync("div", { key: '6bbadc79157ae64bf492a965b78d014dcd968ea6', class: "sd-date-picker__days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (hAsync("div", { key: day, class: "day" }, day)))), hAsync("div", { key: '972c00769b40eff8015b68e0a9479a6c7c6009db', class: "sd-date-picker__body" }, [
6306
+ return (hAsync("div", { key: '97baf5202e2702032b5d9035c5b07b3dafa658fa', class: { 'sd-date-picker': true, 'sd-date-picker--disabled': this.disabled } }, hAsync("sd-input", { key: 'bba605148eec6f88829bcfff21cb1ac6efae815d', ref: el => (this.inputEl = el), value: this.value, label: this.label, "inside-label": true, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-picker__input", onClick: () => this.openMenu() }, hAsync("sd-icon", { key: '4c927154407efd9319b56327d83ee2012206b216', slot: "prefix", name: "date", size: "16", color: this.disabled ? 'grey_65' : 'grey_70', class: "date-icon", onClick: () => this.openMenu() })), this.isOpen && (hAsync("sd-portal", { key: 'edc06ceeead0cab9ee3b2394097838e03aeb8703', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.handleClose }, hAsync("div", { key: 'cb71ba6e5517afa0e1e0477599449101b21ece65', class: "sd-date-picker__menu" }, hAsync("div", { key: 'bdace5b8e99cbd4271ba76dace05f2af4d059d37', class: "sd-date-picker__header" }, hAsync("div", { key: '3fc557c6119af299b813610e9b6ef6cd9104a302', class: "year-nav" }, hAsync("button", { key: '82b7928c460b6bb3a163cf576977d4694fa63fdc', type: "button", name: "prev-year", title: "Previous Year", onClick: () => this.setCurrentYear(this.currentYear - 1) }, hAsync("sd-icon", { key: 'b0eda3985494f99de52c85714b13ef45b90ef9db', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("span", { key: '24245489b718b3fb15603e9da628651b1af8b752', class: "year-nav__current" }, this.currentYear), hAsync("button", { key: '458570d7e08af35d2c467398b89a9cb9c200141f', type: "button", name: "next-year", title: "Next Year", onClick: () => this.setCurrentYear(this.currentYear + 1) }, hAsync("sd-icon", { key: '5f01f94d7499b0c79f2936249a295b92dfa1476d', name: "arrowRight", size: "12", color: "#CCCCCC" }))), hAsync("div", { key: '5d1551a4149998430fd5c0262000c21e8de76a9b', class: "month-nav" }, hAsync("button", { key: '0690296a789d67e5dc1b1ce7b882a261f1724a46', type: "button", name: "prev-month", title: "Previous ", onClick: () => this.handleUpdateMonth('prev') }, hAsync("sd-icon", { key: '3ed6809573e28c9a40a4f26331669ce66245c076', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("span", { key: '5ae4ed6249269ba5a1d24ab986ec7c371fa356f4', class: "month-nav__current" }, this.currentMonth, "\uC6D4"), hAsync("button", { key: '7bada1fba8abf6e483969cc5388cd333b03e8e19', type: "button", name: "next-month", title: "Next Month", onClick: () => this.handleUpdateMonth('next') }, hAsync("sd-icon", { key: '559eec3f67ff8b47f601928d5bb9ca2064cb1c6a', name: "arrowRight", size: "12", color: "#CCCCCC" })))), hAsync("div", { key: '5191a48970a3e9f044eaf4851e2e5d507763fe71', class: "sd-date-picker__days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (hAsync("div", { key: day, class: "day" }, day)))), hAsync("div", { key: 'c124a70d9e1c3dd73c63c8ef3fd513a9cb6c24c8', class: "sd-date-picker__body" }, [
5928
6307
  ...this.calendar.prevMonthDays,
5929
6308
  ...this.calendar.days,
5930
6309
  ...this.calendar.afterMonthDays,
@@ -6116,10 +6495,10 @@ class SdDateRangePicker {
6116
6495
  this.setHoverDate(hoverDate);
6117
6496
  }
6118
6497
  render() {
6119
- return (hAsync("div", { key: '96cd4e99ae976517e7b24c5ff3046af976adc5cb', class: {
6498
+ return (hAsync("div", { key: 'e0eaf7463e91d3afed6ff977deb20d122e837fd4', class: {
6120
6499
  'sd-date-range-picker': true,
6121
6500
  'sd-date-range-picker--disabled': this.disabled,
6122
- } }, hAsync("sd-input", { key: 'a84838a1a84d990b289f0b753ccf3e2f45da4770', ref: el => (this.inputEl = el), value: !!this.dateRange[0] ? `${this.dateRange[0]} ~ ${this.dateRange[1]}` : '', label: this.label, "inside-label": true, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-range-picker__input", onClick: () => this.openMenu() }, hAsync("sd-icon", { key: 'd926c672dcf457a68ebe644b32c90a03ba29b175', slot: "prefix", name: "date", size: "16", color: this.disabled ? 'grey_65' : 'grey_70', class: "date-icon", onClick: () => this.openMenu() })), this.isOpen && (hAsync("sd-portal", { key: '0af519c7ac2ade00972e23b9ecb0344989d87f51', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.closeMenu }, hAsync("div", { key: 'd9109e573215092c6b386ae27ac7377c4347df4c', class: "sd-date-range-picker__menu" }, hAsync("div", { key: 'ca4743a26ed0571bc3b63218a32a113e50dbd81a', class: "sd-date-range-picker__header mb-16pxr flex flex-nowrap items-center justify-center" }, hAsync("button", { key: '6f0fe1ede6d171e749a241fbeec32056250709b9', type: "button", name: "prev", title: "Previous", onClick: () => this.setPrevYear(this.prevYear - 1) }, hAsync("sd-icon", { key: '821526a069a845f271b0e5db607f747efe4e610c', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("div", { key: 'e9402009c8b034953d7ff4be5a4eea64d7fed21d', class: "header-label" }, this.prevYear), hAsync("button", { key: 'b752631ab64e32a4a39c13898cc3db5e25897c4b', type: "button", name: "next", title: "Next", onClick: () => this.setPrevYear(this.prevYear + 1) }, hAsync("sd-icon", { key: '62c6e0004ff1a0d8f260e11b9d17ea7ccca942ee', name: "arrowRight", size: "12", color: "#CCCCCC" }))), hAsync("div", { key: '3a05a7e02664be8d9dfb85d0bada03a2d352af12', class: "sd-date-range-picker__body" }, [this.prevCalendar, this.nextCalendar].map((calendar, index) => (hAsync(Fragment, null, index === 1 && hAsync("div", { class: "separator" }), hAsync("div", { key: index, class: "calendar-container" }, hAsync("div", { class: "calendar-header" }, hAsync("button", { type: "button", name: "month", title: "Month", class: index === 0 ? 'header-button-prev' : 'header-button-next', onClick: () => this.updateYearMonth(index === 0 ? 'prev' : 'next') }, hAsync("sd-icon", { name: index === 0 ? 'arrowLeft' : 'arrowRight', size: "12", color: "#CCCCCC" })), index === 0
6501
+ } }, hAsync("sd-input", { key: '301a5133f5a6bcb5bd66fed546528808a96b822a', ref: el => (this.inputEl = el), value: !!this.dateRange[0] ? `${this.dateRange[0]} ~ ${this.dateRange[1]}` : '', label: this.label, "inside-label": true, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-range-picker__input", onClick: () => this.openMenu() }, hAsync("sd-icon", { key: 'ef7e9e74957d994a2e7a374f849ef1a5f03fe501', slot: "prefix", name: "date", size: "16", color: this.disabled ? 'grey_65' : 'grey_70', class: "date-icon", onClick: () => this.openMenu() })), this.isOpen && (hAsync("sd-portal", { key: '0eb793bbc67d0da80bfdbb9d5e8c89857a9bd13d', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.closeMenu }, hAsync("div", { key: '6e7f6d3c0ba5d60cec929ff87f2b16c6fd1123ae', class: "sd-date-range-picker__menu" }, hAsync("div", { key: 'bbc3b2117e226e86ad18e90d9549dfa33b8faa18', class: "sd-date-range-picker__header mb-16pxr flex flex-nowrap items-center justify-center" }, hAsync("button", { key: 'e5246cbd684096c113a9568d42a4a86555fd55b0', type: "button", name: "prev", title: "Previous", onClick: () => this.setPrevYear(this.prevYear - 1) }, hAsync("sd-icon", { key: '84281ab72847d7fe9352be583465b810854f2cfb', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("div", { key: '9d9394eea9a82bdcdc7918af50e98909610ab5e2', class: "header-label" }, this.prevYear), hAsync("button", { key: '6f05a7477293b129561b1bdaa5fca46224f41af9', type: "button", name: "next", title: "Next", onClick: () => this.setPrevYear(this.prevYear + 1) }, hAsync("sd-icon", { key: '746bc40e5d0bb72e9aa712012d411f20b459b80a', name: "arrowRight", size: "12", color: "#CCCCCC" }))), hAsync("div", { key: '96a2c1674152f5ee31b29734b1471940b4d0f4b4', class: "sd-date-range-picker__body" }, [this.prevCalendar, this.nextCalendar].map((calendar, index) => (hAsync(Fragment, null, index === 1 && hAsync("div", { class: "separator" }), hAsync("div", { key: index, class: "calendar-container" }, hAsync("div", { class: "calendar-header" }, hAsync("button", { type: "button", name: "month", title: "Month", class: index === 0 ? 'header-button-prev' : 'header-button-next', onClick: () => this.updateYearMonth(index === 0 ? 'prev' : 'next') }, hAsync("sd-icon", { name: index === 0 ? 'arrowLeft' : 'arrowRight', size: "12", color: "#CCCCCC" })), index === 0
6123
6502
  ? `${this.prevYear}.${String(this.prevMonth).padStart(2, '0')}`
6124
6503
  : `${this.nextYear}.${String(this.nextMonth).padStart(2, '0')}`), hAsync("div", { class: "calendar-days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (hAsync("sd-date-box", { key: day, date: day, disabled: true, class: "day" })))), hAsync("div", { class: "calendar-body mt-12pxr grid grid-cols-7 gap-y-8pxr" }, [...calendar.prevMonthDays, ...calendar.days, ...calendar.afterMonthDays].map((day, idx) => (hAsync("sd-date-box", { key: `prev${day}_${idx}`, date: !day ? '' : Number(day), selected: this.dateRange.some(date => date === this.formatDate(index, Number(day))), type: this.getDateBoxType(this.formatDate(index, Number(day))), isToday: today === this.formatDate(index, Number(day)), disabled: !day ? true : this.isDisabledDate(this.formatDate(index, Number(day))), inRange: this.isDateInRange(this.formatDate(index, Number(day))), isStartDate: this.dateRange[0] === this.formatDate(index, Number(day)), isEndDate: this.dateRange[1] === this.formatDate(index, Number(day)), onSdClick: () => this.handleDateClick(index, Number(day)), onSdMouseOver: () => this.handleDateHover(index, Number(day)) }))))))))))))));
6125
6504
  }
@@ -6151,6 +6530,377 @@ class SdDateRangePicker {
6151
6530
  }; }
6152
6531
  }
6153
6532
 
6533
+ class DropdownManager {
6534
+ static instance;
6535
+ activeDropdowns = new Set();
6536
+ static getInstance() {
6537
+ if (!DropdownManager.instance) {
6538
+ DropdownManager.instance = new DropdownManager();
6539
+ }
6540
+ return DropdownManager.instance;
6541
+ }
6542
+ register(component) {
6543
+ this.activeDropdowns.add(component);
6544
+ }
6545
+ unregister(component) {
6546
+ this.activeDropdowns.delete(component);
6547
+ }
6548
+ openDropdown(targetComponent) {
6549
+ // 다른 모든 드롭다운 닫기
6550
+ this.activeDropdowns.forEach(component => {
6551
+ if (component !== targetComponent && component.isOpen) {
6552
+ component.closeDropdown();
6553
+ }
6554
+ });
6555
+ }
6556
+ closeAllDropdowns() {
6557
+ this.activeDropdowns.forEach(component => {
6558
+ if (component.isOpen) {
6559
+ component.closeDropdown();
6560
+ }
6561
+ });
6562
+ }
6563
+ }
6564
+ const dropdownManager = DropdownManager.getInstance();
6565
+
6566
+ // 여러 select를 동시에 사용할때에 이벤트 리스너의 등록이 충돌나는 문제를 해결하기 위한 Base class
6567
+ // 각 드롭다운 컴포넌트는 이 클래스를 상속 및 구현 필요
6568
+ // 기본적으로 click, keydown 추상 이벤트를 구현해야하고
6569
+ // isOpen가 true일때에만 이벤트 등록 그외에는 이벤트 클리닝을 수행
6570
+ // 추후 필요한 이벤트는 이곳에 추가하여 추가 구현 후 사용
6571
+ // 별도로 드롭다운 전용의 Base class가 아닌 공통적으로 사용할 수 있는 Base class가 필요할지 검토 필요
6572
+ class BaseDropdownEvent {
6573
+ documentClickHandler;
6574
+ documentKeydownHandler;
6575
+ // 컴포넌트 생명주기에서 호출할 메서드들
6576
+ initializeEvent() {
6577
+ dropdownManager.register(this);
6578
+ this.initializeEventHandlers();
6579
+ }
6580
+ cleanupEvent() {
6581
+ dropdownManager.unregister(this);
6582
+ this.cleanup();
6583
+ }
6584
+ initializeEventHandlers() {
6585
+ this.documentClickHandler = (event) => this.handleDocumentClick(event);
6586
+ this.documentKeydownHandler = (event) => this.handleDocumentKeydown(event);
6587
+ }
6588
+ addGlobalEventListeners() {
6589
+ if (this.documentClickHandler) {
6590
+ document.addEventListener('click', this.documentClickHandler);
6591
+ }
6592
+ if (this.documentKeydownHandler) {
6593
+ document.addEventListener('keydown', this.documentKeydownHandler);
6594
+ }
6595
+ }
6596
+ removeGlobalEventListeners() {
6597
+ if (this.documentClickHandler) {
6598
+ document.removeEventListener('click', this.documentClickHandler);
6599
+ }
6600
+ if (this.documentKeydownHandler) {
6601
+ document.removeEventListener('keydown', this.documentKeydownHandler);
6602
+ }
6603
+ }
6604
+ onDropdownToggle(isOpen) {
6605
+ if (isOpen && !this.disabled) {
6606
+ dropdownManager.openDropdown(this);
6607
+ this.addGlobalEventListeners();
6608
+ }
6609
+ else {
6610
+ this.removeGlobalEventListeners();
6611
+ }
6612
+ }
6613
+ cleanup() {
6614
+ this.removeGlobalEventListeners();
6615
+ }
6616
+ closeDropdown() {
6617
+ this.isOpen = false;
6618
+ }
6619
+ }
6620
+
6621
+ const color = {
6622
+ bg: {
6623
+ accent: {
6624
+ "default": "#0075FF"}},
6625
+ text: {
6626
+ secondary: "#333333",
6627
+ inverse: "#FFFFFF"
6628
+ }};
6629
+ var systemTokens = {
6630
+ color: color
6631
+ };
6632
+
6633
+ const UNSUPPORTED_DROPDOWN_BUTTON_NAMES = new Set([
6634
+ 'neutral_xs',
6635
+ 'neutral_sm',
6636
+ 'neutral_md',
6637
+ ]);
6638
+ const DROPDOWN_BUTTON_NAMES = Object.keys(BUTTON_CONFIG).filter((name) => !name.endsWith('_lg') && !UNSUPPORTED_DROPDOWN_BUTTON_NAMES.has(name));
6639
+ const DROPDOWN_BUTTON_CONFIG = Object.fromEntries(DROPDOWN_BUTTON_NAMES.map(name => [name, BUTTON_CONFIG[name]]));
6640
+ const DROPDOWN_BUTTON_MIN_WIDTHS = {
6641
+ xs: buttonTokens.dropdown.xs.minWidth,
6642
+ sm: buttonTokens.dropdown.sm.minWidth,
6643
+ md: buttonTokens.dropdown.md.minWidth,
6644
+ };
6645
+ const PRESET_HOVER_BACKGROUNDS = PRESET_HOVER_BACKGROUNDS$1;
6646
+ const PRESET_CONTENT_COLORS = PRESET_CONTENT_COLORS$1;
6647
+ const PRESET_BORDER_COLORS = PRESET_BORDER_COLORS$1;
6648
+ const PRESET_DIVIDER_COLORS = {
6649
+ primary: buttonTokens.brand.strong.dropdown.divider,
6650
+ secondary: buttonTokens.brand.subtle.dropdown.divider,
6651
+ primary_outline: PRESET_BORDER_COLORS.primary_outline,
6652
+ neutral: buttonTokens.neutral.outline.border,
6653
+ neutral_outline: PRESET_BORDER_COLORS.neutral_outline,
6654
+ danger: buttonTokens.danger.strong.dropdown.divider,
6655
+ danger_outline: PRESET_BORDER_COLORS.danger_outline,
6656
+ };
6657
+ const MENU_ITEM_COLOR = systemTokens.color.text.secondary;
6658
+ const MENU_ITEM_ACTIVE_BACKGROUND = systemTokens.color.bg.accent.default;
6659
+ const MENU_ITEM_ACTIVE_COLOR = systemTokens.color.text.inverse;
6660
+ const PRESET_MENU_ITEM_COLORS = {
6661
+ primary: MENU_ITEM_COLOR,
6662
+ secondary: MENU_ITEM_COLOR,
6663
+ primary_outline: MENU_ITEM_COLOR,
6664
+ neutral: MENU_ITEM_COLOR,
6665
+ neutral_outline: MENU_ITEM_COLOR,
6666
+ danger: MENU_ITEM_COLOR,
6667
+ danger_outline: MENU_ITEM_COLOR,
6668
+ };
6669
+ const PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS = {
6670
+ primary: MENU_ITEM_ACTIVE_BACKGROUND,
6671
+ secondary: MENU_ITEM_ACTIVE_BACKGROUND,
6672
+ primary_outline: MENU_ITEM_ACTIVE_BACKGROUND,
6673
+ neutral: MENU_ITEM_ACTIVE_BACKGROUND,
6674
+ neutral_outline: MENU_ITEM_ACTIVE_BACKGROUND,
6675
+ danger: MENU_ITEM_ACTIVE_BACKGROUND,
6676
+ danger_outline: MENU_ITEM_ACTIVE_BACKGROUND,
6677
+ };
6678
+ const PRESET_MENU_ITEM_ACTIVE_COLORS = {
6679
+ primary: MENU_ITEM_ACTIVE_COLOR,
6680
+ secondary: MENU_ITEM_ACTIVE_COLOR,
6681
+ primary_outline: MENU_ITEM_ACTIVE_COLOR,
6682
+ neutral: MENU_ITEM_ACTIVE_COLOR,
6683
+ neutral_outline: MENU_ITEM_ACTIVE_COLOR,
6684
+ danger: MENU_ITEM_ACTIVE_COLOR,
6685
+ danger_outline: MENU_ITEM_ACTIVE_COLOR,
6686
+ };
6687
+ const DROPDOWN_DISABLED_BACKGROUND = buttonTokens.bg.disabled;
6688
+ const DROPDOWN_DISABLED_CONTENT = buttonTokens.content.disabled;
6689
+ const DROPDOWN_DISABLED_BORDER = buttonTokens.border.disabled;
6690
+ const isDropdownButtonName = (value) => value in DROPDOWN_BUTTON_CONFIG;
6691
+ const getDropdownButtonPreset = (value) => getPresetName(value);
6692
+
6693
+ const sdDropdownButtonCss = () => `sd-dropdown-button{display:inline-flex;width:fit-content;height:fit-content}.sd-dropdown-button{display:inline-flex;position:relative}.sd-dropdown-button__trigger{--sd-dropdown-button-height:var(--sd-button-md-height, 34px);--sd-dropdown-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-md-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-md-typography-text-decoration, none);--sd-dropdown-button-bg:#025497;--sd-dropdown-button-bg-hover:#004177;--sd-dropdown-button-border:transparent;--sd-dropdown-button-content:#ffffff;--sd-dropdown-button-divider:#006ac1;--sd-dropdown-button-accent:#006ac1;--sd-dropdown-button-min-width:106px;--sd-dropdown-button-disabled-bg:var(--sd-button-bg-disabled, $grey_30);--sd-dropdown-button-disabled-content:var(--sd-button-content-disabled, $grey_65);--sd-dropdown-button-disabled-border:var(--sd-button-border-disabled, $grey_45);display:inline-flex;align-items:stretch;justify-content:space-between;min-width:var(--sd-dropdown-button-min-width);min-height:var(--sd-dropdown-button-height);padding:0;border:var(--sd-button-border-width-default, 1px) solid var(--sd-dropdown-button-border);border-radius:var(--sd-button-radius-default, 4px);background:var(--sd-dropdown-button-bg);color:var(--sd-dropdown-button-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-dropdown-button-font-family);font-size:var(--sd-dropdown-button-font-size);font-weight:var(--sd-dropdown-button-font-weight);line-height:1;text-decoration:var(--sd-dropdown-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap}.sd-dropdown-button__trigger:hover:not(.sd-dropdown-button__trigger--disabled){background:var(--sd-dropdown-button-bg-hover)}.sd-dropdown-button__trigger:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-dropdown-button-accent)}.sd-dropdown-button__trigger--xs{--sd-dropdown-button-height:var(--sd-button-xs-height, 24px);--sd-dropdown-button-padding-x:var(--sd-button-xs-padding-x, 8px);--sd-dropdown-button-gap:var(--sd-button-xs-gap, 4px);--sd-dropdown-button-font-family:var(--sd-button-xs-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-xs-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-xs-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-xs-typography-text-decoration, none)}.sd-dropdown-button__trigger--sm{--sd-dropdown-button-height:var(--sd-button-sm-height, 28px);--sd-dropdown-button-padding-x:var(--sd-button-sm-padding-x, 12px);--sd-dropdown-button-gap:var(--sd-button-sm-gap, 6px);--sd-dropdown-button-font-family:var(--sd-button-sm-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-sm-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-sm-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-sm-typography-text-decoration, none)}.sd-dropdown-button__trigger--md{--sd-dropdown-button-height:var(--sd-button-md-height, 34px);--sd-dropdown-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-md-typography-font-size, 16px);--sd-dropdown-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-md-typography-text-decoration, none)}.sd-dropdown-button__trigger--disabled{border-color:var(--sd-dropdown-button-disabled-border);background:var(--sd-dropdown-button-disabled-bg);color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__trigger--disabled .sd-dropdown-button__trigger-divider{background:var(--sd-dropdown-button-disabled-border)}.sd-dropdown-button__trigger-label,.sd-dropdown-button__trigger-icon{display:inline-flex;align-items:center;justify-content:center}.sd-dropdown-button__trigger-label{flex:1 1 auto;min-width:0;padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button__trigger-divider{align-self:stretch;width:1px;height:auto;background:var(--sd-dropdown-button-divider);opacity:0.9}.sd-dropdown-button__trigger-icon{flex:0 0 auto;min-width:calc(var(--sd-dropdown-button-height) - 2px);padding:0 calc(var(--sd-dropdown-button-gap) + 2px)}.sd-dropdown-button__menu{display:grid;width:max-content;min-width:max-content;max-width:calc(100vw - 24px);padding:4px 0;border:0;border-radius:4px;background:#FFFFFF;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1019607843);box-sizing:border-box;overflow:hidden}.sd-dropdown-button__menu-item{display:inline-flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--sd-dropdown-button-menu-item-color);cursor:pointer;box-sizing:border-box;font:inherit;text-align:left;transition:background-color 0.15s ease, color 0.15s ease}.sd-dropdown-button__menu-item--active{background:var(--sd-dropdown-button-menu-item-active-bg);color:var(--sd-dropdown-button-menu-item-active-color)}.sd-dropdown-button__menu-item--disabled{color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__menu-item-icon{flex:0 0 auto}.sd-dropdown-button__menu-item-label{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;font-size:12px}`;
6694
+
6695
+ class SdDropdownButton extends BaseDropdownEvent {
6696
+ constructor(hostRef) {
6697
+ super();
6698
+ registerInstance(this, hostRef);
6699
+ this.click = createEvent(this, "sdClick");
6700
+ this.dropDownShow = createEvent(this, "sdDropDownShow");
6701
+ }
6702
+ get el() { return getElement(this); }
6703
+ name = 'primary_sm';
6704
+ label = '';
6705
+ items = [];
6706
+ disabled = false;
6707
+ isOpen = false;
6708
+ itemIndex = -1;
6709
+ triggerRef;
6710
+ menuRef;
6711
+ click;
6712
+ dropDownShow;
6713
+ handleOpenChange(isOpen) {
6714
+ this.onDropdownToggle(isOpen);
6715
+ this.dropDownShow.emit({ isOpen });
6716
+ if (!isOpen) {
6717
+ this.itemIndex = -1;
6718
+ }
6719
+ }
6720
+ componentWillLoad() {
6721
+ this.initializeEvent();
6722
+ }
6723
+ disconnectedCallback() {
6724
+ this.cleanupEvent();
6725
+ }
6726
+ async sdOpen() {
6727
+ if (this.disabled || this.items.length === 0)
6728
+ return;
6729
+ this.isOpen = true;
6730
+ }
6731
+ async sdClose() {
6732
+ this.closeDropdown();
6733
+ }
6734
+ closeDropdown = () => {
6735
+ this.isOpen = false;
6736
+ };
6737
+ handleDocumentClick(event) {
6738
+ const target = event.target;
6739
+ if (!target)
6740
+ return;
6741
+ if (this.el.contains(target))
6742
+ return;
6743
+ if (this.menuRef?.contains(target))
6744
+ return;
6745
+ this.closeDropdown();
6746
+ }
6747
+ handleDocumentKeydown(event) {
6748
+ if (!this.isOpen)
6749
+ return;
6750
+ const targetKeys = ['ArrowDown', 'ArrowUp', 'Enter', 'Escape'];
6751
+ if (!targetKeys.includes(event.key))
6752
+ return;
6753
+ event.preventDefault();
6754
+ event.stopPropagation();
6755
+ switch (event.key) {
6756
+ case 'ArrowDown':
6757
+ this.itemIndex = this.getNextEnabledIndex(1);
6758
+ break;
6759
+ case 'ArrowUp':
6760
+ this.itemIndex = this.getNextEnabledIndex(-1);
6761
+ break;
6762
+ case 'Enter':
6763
+ if (this.itemIndex < 0)
6764
+ return;
6765
+ this.selectItem(this.items[this.itemIndex]);
6766
+ break;
6767
+ case 'Escape':
6768
+ this.closeDropdown();
6769
+ break;
6770
+ }
6771
+ }
6772
+ get resolvedConfig() {
6773
+ if (!isDropdownButtonName(this.name)) {
6774
+ throw new Error(`Invalid sd-dropdown-button name: ${this.name}`);
6775
+ }
6776
+ const config = DROPDOWN_BUTTON_CONFIG[this.name];
6777
+ const preset = getDropdownButtonPreset(this.name);
6778
+ return {
6779
+ config,
6780
+ preset,
6781
+ };
6782
+ }
6783
+ getNextEnabledIndex(direction) {
6784
+ const enabledIndices = this.items.reduce((acc, item, index) => {
6785
+ if (!item.disabled) {
6786
+ acc.push(index);
6787
+ }
6788
+ return acc;
6789
+ }, []);
6790
+ if (enabledIndices.length === 0) {
6791
+ return -1;
6792
+ }
6793
+ const currentPosition = enabledIndices.indexOf(this.itemIndex);
6794
+ if (currentPosition === -1) {
6795
+ return direction === 1 ? enabledIndices[0] : enabledIndices[enabledIndices.length - 1];
6796
+ }
6797
+ const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length;
6798
+ return enabledIndices[nextPosition];
6799
+ }
6800
+ toggleDropdown = (event) => {
6801
+ event.stopPropagation();
6802
+ if (this.disabled || this.items.length === 0) {
6803
+ return;
6804
+ }
6805
+ this.isOpen = !this.isOpen;
6806
+ };
6807
+ selectItem(item, event) {
6808
+ event?.stopPropagation();
6809
+ if (!item || item.disabled) {
6810
+ return;
6811
+ }
6812
+ this.click.emit(item.value);
6813
+ this.closeDropdown();
6814
+ }
6815
+ getTriggerClasses(preset, size, disabled, isOpen) {
6816
+ const classes = [
6817
+ 'sd-dropdown-button__trigger',
6818
+ `sd-dropdown-button__trigger--${preset}`,
6819
+ `sd-dropdown-button__trigger--${size}`,
6820
+ ];
6821
+ if (disabled) {
6822
+ classes.push('sd-dropdown-button__trigger--disabled');
6823
+ }
6824
+ if (isOpen) {
6825
+ classes.push('sd-dropdown-button__trigger--open');
6826
+ }
6827
+ return classes.join(' ');
6828
+ }
6829
+ getMenuItemClasses(isActive, isDisabled) {
6830
+ const classes = ['sd-dropdown-button__menu-item'];
6831
+ if (isActive) {
6832
+ classes.push('sd-dropdown-button__menu-item--active');
6833
+ }
6834
+ if (isDisabled) {
6835
+ classes.push('sd-dropdown-button__menu-item--disabled');
6836
+ }
6837
+ return classes.join(' ');
6838
+ }
6839
+ renderDropdown(preset) {
6840
+ if (!this.isOpen || !this.triggerRef)
6841
+ return null;
6842
+ return (hAsync("sd-portal", { open: this.isOpen, parentRef: this.triggerRef, onSdClose: this.closeDropdown }, hAsync("div", { class: "sd-dropdown-button__menu", role: "menu", ref: el => (this.menuRef = el), style: {
6843
+ '--sd-dropdown-button-menu-item-color': PRESET_MENU_ITEM_COLORS[preset],
6844
+ '--sd-dropdown-button-menu-item-active-bg': PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS[preset],
6845
+ '--sd-dropdown-button-menu-item-active-color': PRESET_MENU_ITEM_ACTIVE_COLORS[preset],
6846
+ '--sd-dropdown-button-menu-border': PRESET_BORDER_COLORS[preset] === 'transparent'
6847
+ ? PRESET_DIVIDER_COLORS[preset]
6848
+ : PRESET_BORDER_COLORS[preset],
6849
+ } }, this.items.map((item, index) => {
6850
+ const isActive = this.itemIndex === index && !item.disabled;
6851
+ const iconColor = item.disabled
6852
+ ? DROPDOWN_DISABLED_CONTENT
6853
+ : isActive
6854
+ ? PRESET_MENU_ITEM_ACTIVE_COLORS[preset]
6855
+ : PRESET_MENU_ITEM_COLORS[preset];
6856
+ return (hAsync("button", { type: "button", role: "menuitem", class: this.getMenuItemClasses(isActive, Boolean(item.disabled)), disabled: item.disabled, onClick: event => this.selectItem(item, event), onMouseEnter: () => {
6857
+ if (!item.disabled) {
6858
+ this.itemIndex = index;
6859
+ }
6860
+ } }, item.icon && (hAsync("sd-icon", { class: "sd-dropdown-button__menu-item-icon", name: item.icon, size: 12, color: iconColor })), hAsync("span", { class: "sd-dropdown-button__menu-item-label", innerHTML: item.label })));
6861
+ }))));
6862
+ }
6863
+ render() {
6864
+ const { config, preset } = this.resolvedConfig;
6865
+ const chevronColor = this.disabled ? DROPDOWN_DISABLED_CONTENT : PRESET_CONTENT_COLORS[preset];
6866
+ return (hAsync("div", { key: '0bd454e599c8eb56b88f63a5f74e1d9db4b568f9', class: "sd-dropdown-button" }, hAsync("button", { key: '804dd19dc0d49969e89d0742e71f61fe610e3f3d', type: "button", class: this.getTriggerClasses(preset, config.size, this.disabled, this.isOpen), disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": String(this.isOpen), onClick: this.toggleDropdown, ref: el => (this.triggerRef = el), style: {
6867
+ '--sd-dropdown-button-min-width': `${DROPDOWN_BUTTON_MIN_WIDTHS[config.size]}px`,
6868
+ '--sd-dropdown-button-bg': config.color,
6869
+ '--sd-dropdown-button-bg-hover': PRESET_HOVER_BACKGROUNDS[preset],
6870
+ '--sd-dropdown-button-border': PRESET_BORDER_COLORS[preset],
6871
+ '--sd-dropdown-button-content': PRESET_CONTENT_COLORS[preset],
6872
+ '--sd-dropdown-button-divider': PRESET_DIVIDER_COLORS[preset],
6873
+ '--sd-dropdown-button-accent': BUTTON_FOCUS_RING_COLOR,
6874
+ '--sd-dropdown-button-disabled-bg': DROPDOWN_DISABLED_BACKGROUND,
6875
+ '--sd-dropdown-button-disabled-content': DROPDOWN_DISABLED_CONTENT,
6876
+ '--sd-dropdown-button-disabled-border': DROPDOWN_DISABLED_BORDER,
6877
+ } }, hAsync("span", { key: '038dd3ad8c7c07d3ebb435a6fec27dd31b8fdba0', class: "sd-dropdown-button__trigger-label" }, this.label), hAsync("span", { key: 'c5c2c0fffa200a4772d7e448e1a1b95745be4faa', class: "sd-dropdown-button__trigger-divider", "aria-hidden": "true" }), hAsync("span", { key: 'a6f1db25929c10b9dc9ccbae2655eed3c67dff22', class: "sd-dropdown-button__trigger-icon", "aria-hidden": "true" }, hAsync("sd-icon", { key: '4c1533a7efd5a7d695e460bad9dfc2b8a7fe5740', name: this.isOpen ? 'arrowUp' : 'arrowDown', size: 12, color: chevronColor }))), this.renderDropdown(preset)));
6878
+ }
6879
+ static get watchers() { return {
6880
+ "isOpen": [{
6881
+ "handleOpenChange": 0
6882
+ }]
6883
+ }; }
6884
+ static get style() { return sdDropdownButtonCss(); }
6885
+ static get cmpMeta() { return {
6886
+ "$flags$": 512,
6887
+ "$tagName$": "sd-dropdown-button",
6888
+ "$members$": {
6889
+ "name": [1],
6890
+ "label": [1],
6891
+ "items": [16],
6892
+ "disabled": [4],
6893
+ "isOpen": [32],
6894
+ "itemIndex": [32],
6895
+ "sdOpen": [64],
6896
+ "sdClose": [64]
6897
+ },
6898
+ "$listeners$": undefined,
6899
+ "$lazyBundleId$": "-",
6900
+ "$attrsToReflect$": []
6901
+ }; }
6902
+ }
6903
+
6154
6904
  const sdFieldCss = () => `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 #0075FF !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:#EEEEEE;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:12px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__required-icon{margin-right:4px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:#333333;white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-label-inside .sd-field__wrapper .sd-field__label{margin-right:0;display:flex;align-items:center;justify-content:center;padding:3px 12px;border:1px solid #CCCCCC;border-right:none;border-radius:4px 0 0 4px;border-color:#AAAAAA;background-color:#F6F6F6}sd-field .sd-field__wrapper{width:100%;height:28px;display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:#333333;cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;width:100%;height:100%;display:flex;flex:1;border:1px solid #AAAAAA;border-radius:4px;background:white}sd-field .sd-field__wrapper .sd-field__control--label-inside{border-top-left-radius:0px;border-bottom-left-radius:0px}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid #FB4444 !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 #0075FF !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:#FB4444;font-size:12px;line-height:20px;margin-top:4px}`;
6155
6905
 
6156
6906
  const FORM_PARENT_TAGS = [
@@ -6271,15 +7021,15 @@ class SdField {
6271
7021
  }
6272
7022
  }
6273
7023
  render() {
6274
- return (hAsync("div", { key: '3c69abe493110b5665795706a9ae0e525f213aca', class: {
7024
+ return (hAsync("div", { key: '83d20191373b759f18d25e25330ead65217dea4f', class: {
6275
7025
  'sd-field': true,
6276
7026
  'sd-field--has-label': !!this.label,
6277
7027
  'sd-field--has-label-inside': !!this.label && this.insideLabel,
6278
7028
  [this.fieldStatus]: !!this.fieldStatus,
6279
- } }, hAsync("div", { key: 'decc6821b7172f5ecc2343472014c08674725904', class: "sd-field__wrapper" }, this.renderLabel(this.label), hAsync("div", { key: 'ca5e93f049db10ecaaaab091fdf394ac4b55e292', class: {
7029
+ } }, hAsync("div", { key: '2f04e19997c077c32843173c85dc04840f8fa0f6', class: "sd-field__wrapper" }, this.renderLabel(this.label), hAsync("div", { key: 'c7fa5c334cd4dc0b99919850b3059a35a77ea5c6', class: {
6280
7030
  'sd-field__control': true,
6281
7031
  'sd-field__control--label-inside ': !!this.label && this.insideLabel,
6282
- } }, hAsync("slot", { key: '7ee38983d32985f4b4a035830bcdca0e14b2cf71' }))), this.errorMsg && hAsync("div", { key: 'c2d6ef860ced48657b906806f2618594b094ea79', class: "sd-field__error-message" }, this.errorMsg)));
7032
+ } }, hAsync("slot", { key: '15f7bd40ca6ed1667f97f6362be914e203c491af' }))), this.errorMsg && hAsync("div", { key: 'd940bca4d3074e8051bc5392aad36be4c58f88af', class: "sd-field__error-message" }, this.errorMsg)));
6283
7033
  }
6284
7034
  renderLabel(label) {
6285
7035
  if (!label)
@@ -6413,15 +7163,15 @@ class SdFilePicker {
6413
7163
  render() {
6414
7164
  const hasFiles = this.hasFiles();
6415
7165
  const displayText = this.getDisplayText();
6416
- return (hAsync("div", { key: '659ab6f0e1fedadfbef1838def391aab28ae6e62', class: {
7166
+ return (hAsync("div", { key: 'dfdb1f7cc4793c23cfb1ae97464981833263421e', class: {
6417
7167
  'sd-file-picker': true,
6418
7168
  [this.getStatusClass()]: true,
6419
7169
  'sd-file-picker--inline': this.inline,
6420
- }, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("input", { key: '55ffb6c1b3ff502b555cb48a31301ac9b30701a4', ref: el => (this.fileInputRef = el), type: "file", class: "sd-file-picker__input", disabled: this.disabled, multiple: this.multiple, accept: this.accept, onInput: this.handleFileChange, "aria-label": this.placeholder }), hAsync("sd-icon", { key: 'b7755876e0f327d15a886a86592cd59bd3435202', name: "attachFile", size: 16, color: this.getIconColor(), class: "sd-file-picker__icon" }), hAsync("div", { key: 'e1e2004c64166eb2b611c48ca51cc793fb90434c', ref: el => (this.fileNamesRef = el), class: {
7170
+ }, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("input", { key: 'bd4a072a517391b63116de1561aaf6606b1a8343', ref: el => (this.fileInputRef = el), type: "file", class: "sd-file-picker__input", disabled: this.disabled, multiple: this.multiple, accept: this.accept, onInput: this.handleFileChange, "aria-label": this.placeholder }), hAsync("sd-icon", { key: '12280a64236d3fd9b63a9d15be11426efdd81629', name: "attachFile", size: 16, color: this.getIconColor(), class: "sd-file-picker__icon" }), hAsync("div", { key: '935a7d98ee034d59f16b410eb1495cd009ce6024', ref: el => (this.fileNamesRef = el), class: {
6421
7171
  'sd-file-picker__text': true,
6422
7172
  'sd-file-picker__text--placeholder': !hasFiles,
6423
7173
  'sd-file-picker__text--active': hasFiles,
6424
- } }, displayText), !this.disabled && hasFiles && (hAsync("sd-icon", { key: '0a3c122382cab2148a88fbd4fdc9ff1f7cde757b', name: "close", size: 12, color: "#888888", class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (hAsync("div", { key: '628717309bf16c0906e9ac21ecbf14a416eea8d8', class: "sd-file-picker__tooltip" }, displayText))));
7174
+ } }, displayText), !this.disabled && hasFiles && (hAsync("sd-icon", { key: '08f38161be5d1754b4f5b1bba185a29976ffd1dd', name: "close", size: 12, color: "#888888", class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (hAsync("div", { key: 'db6edfa98b3832276b320a6f3b4e195cfaeff4d6', class: "sd-file-picker__tooltip" }, displayText))));
6425
7175
  }
6426
7176
  static get watchers() { return {
6427
7177
  "value": [{
@@ -6600,7 +7350,7 @@ class SdFloatingPopover {
6600
7350
  this.close.emit();
6601
7351
  }
6602
7352
  render() {
6603
- return hAsync("slot", { key: '2f33d335a7cf00ace576aed610a0e77d711a5b10' });
7353
+ return hAsync("slot", { key: 'd8bdd90d00b52153d1144bbea871ace4888e37e4' });
6604
7354
  }
6605
7355
  static get style() { return sdFloatingPortalCss(); }
6606
7356
  static get cmpMeta() { return {
@@ -6757,9 +7507,9 @@ class SdGuide {
6757
7507
  };
6758
7508
  render() {
6759
7509
  const { name: iconName, size: iconSize, color: iconColor } = GUIDE_ICON[this.type];
6760
- return (hAsync("div", { key: '2a7d3d040d3fbe7d0c22afc62d67a848fbae67d9', class: "sd-guide", style: {
7510
+ return (hAsync("div", { key: '3e6914fc5c99e8f95d5ed613ddd61271bc4e91f9', class: "sd-guide", style: {
6761
7511
  '--sd-guide-color': GUIDE_ICON[this.type].color,
6762
- } }, hAsync("sd-button", { key: 'e354fa7a48aacabbd7688f9546d71ec138b4a648', ref: el => (this.guideRef = el), class: this.guideClass, variant: this.popupShow ? 'primary' : 'outline', label: this.label || GUIDE_LABEL[this.type], size: "sm", color: this.popupShow ? GUIDE_ICON[this.type].color : 'grey_45', icon: iconName, iconColor: this.popupShow ? 'white' : iconColor, iconSize: iconSize, noHover: this.popupShow, onSdClick: this.handleClickGuide }), this.type === 'help' && this.popupShow && (hAsync("sd-portal", { key: '157583215cdba27ae493a07aaa3eb4a0e3923971', open: this.popupShow, parentRef: this.guideRef, onSdClose: this.closeDropdown, offset: [0, 4] }, hAsync("div", { key: '6aaa8f4ee6f44225ee63ef740d7398e87207c0c0', style: { position: 'absolute', width: '0px', height: '0px' } }, hAsync("div", { key: '9184936963f96e2537b3713bd5ee38d0c058c72b', class: "sd-guide__popup", style: { width: this.popupWidth ? this.popupWidth + 'px' : '426px' } }, hAsync("sd-button", { key: 'a1f653f7e40f6ad4e97dca82e10d4f03843469fd', class: "sd-guide__popup__close", icon: "close", color: "grey_65", size: "md", variant: "ghost", noHover: true, onSdClick: this.closeDropdown }), hAsync("div", { key: '561433ec3fcf6f9de4badd8e24ffaffbab4e62df', class: "sd-guide__popup__header" }, hAsync("sd-icon", { key: '69aafb073fa680f8353deccb860320da083ff121', name: "helpOutline", size: 24, color: "green_65" }), hAsync("h3", { key: '71f7fcb3068d572523c6bf53276e654feb1056f6', class: "sd-guide__popup__title" }, this.popupTitle || GUIDE_LABEL[this.type])), hAsync("ul", { key: '407db996ded71b9a5786b1e7967349517c7eb877', class: "sd-guide__popup__list" }, this.renderListItem(this.message))))))));
7512
+ } }, hAsync("sd-button", { key: 'b8e5be2cecec423cb2695c47c9493281c867dbde', ref: el => (this.guideRef = el), class: this.guideClass, variant: this.popupShow ? 'primary' : 'outline', label: this.label || GUIDE_LABEL[this.type], size: "sm", color: this.popupShow ? GUIDE_ICON[this.type].color : 'grey_45', icon: iconName, iconColor: this.popupShow ? 'white' : iconColor, iconSize: iconSize, noHover: this.popupShow, onSdClick: this.handleClickGuide }), this.type === 'help' && this.popupShow && (hAsync("sd-portal", { key: '7d87b81704d2912f9a4bbe22ff702063da9ca0ff', open: this.popupShow, parentRef: this.guideRef, onSdClose: this.closeDropdown, offset: [0, 4] }, hAsync("div", { key: 'd34d55e52ecb3b0a72356dcd86c2127217da4af5', style: { position: 'absolute', width: '0px', height: '0px' } }, hAsync("div", { key: '396bf4845c0e9167440c623c876f895705b973e9', class: "sd-guide__popup", style: { width: this.popupWidth ? this.popupWidth + 'px' : '426px' } }, hAsync("sd-button", { key: '6a678e322df5d9daffd09188daebbbcc0e757ed9', class: "sd-guide__popup__close", icon: "close", color: "grey_65", size: "md", variant: "ghost", noHover: true, onSdClick: this.closeDropdown }), hAsync("div", { key: '8b4abeac25a09b1eb8ee8285d2afff9a0a470c6c', class: "sd-guide__popup__header" }, hAsync("sd-icon", { key: 'b6216567fa83cf131e97c10f2b9f827b13f660a3', name: "helpOutline", size: 24, color: "green_65" }), hAsync("h3", { key: '5a87da148989c89e196fee9a96bbb51e516dca4d', class: "sd-guide__popup__title" }, this.popupTitle || GUIDE_LABEL[this.type])), hAsync("ul", { key: 'a4ebb25ecef588ca5367006adb6aaf446fbd59a9', class: "sd-guide__popup__list" }, this.renderListItem(this.message))))))));
6763
7513
  }
6764
7514
  // 현재 2depth까지만 스타일 적용
6765
7515
  renderListItem(message, depth = 0) {
@@ -8804,7 +9554,7 @@ class SdIcon {
8804
9554
  }
8805
9555
  render() {
8806
9556
  const IconComponent = Icons[this.name]?.[this.size];
8807
- return (hAsync("i", { key: '1d6a48769c99bbfe9576016e24766b8c82ab570e', class: this.getIconClasses(), style: this.iconStyle }, hAsync(IconComponent, { key: '3fdb4195ef13656e79b402a4eae2fb0210fb3a97', color: this.resolvedColor })));
9557
+ return (hAsync("i", { key: '2c1ef942e674d6dc85911f9a87c6859e0e86a706', class: this.getIconClasses(), style: this.iconStyle }, hAsync(IconComponent, { key: 'fa1bc7cd1cf4dc5ec2565f5bbfe65e8137673204', color: this.resolvedColor })));
8808
9558
  }
8809
9559
  static get style() { return sdIconCss(); }
8810
9560
  static get cmpMeta() { return {
@@ -8929,7 +9679,7 @@ class SdInput {
8929
9679
  }
8930
9680
  };
8931
9681
  render() {
8932
- return (hAsync("sd-field", { key: '87f02ba890fd952f89eb86d200318038137ba1a4', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("label", { key: '0bb5824067b33c178b1f60ececdccfe0a3d5f294', class: "sd-input__content", style: { width: '100%' } }, hAsync("slot", { key: '6f67712b4ca708ba511c57379a6b5118732f146a', name: "prefix" }), hAsync("input", { key: 'b337a1161dedb41ed29a690fa963c0ac60dd0c79', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), hAsync("slot", { key: 'bf45d9fd71551dc6a3bb96cdc44512796beee923', name: "suffix" }), this.clearable && this.internalValue && (hAsync("sd-icon", { key: 'aed0a5d9115ba8b7601dc62423349bee1a9978c7', name: "close", color: "grey_65", size: "16", class: "sd-input__clear-icon", onClick: async () => {
9682
+ return (hAsync("sd-field", { key: '757bf7b330f93ec9cd344098bdf124b999e04bb5', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("label", { key: '2dde85e905d77bb6337a2ad10a9f0f872fed5e8a', class: "sd-input__content", style: { width: '100%' } }, hAsync("slot", { key: '20f47646ca476bf6ca6412ebb9e6aac0c72e7eab', name: "prefix" }), hAsync("input", { key: 'a4f4f1594c80a8d834db7d6125110b4c65ad9906', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), hAsync("slot", { key: '35c7c173d72cbc295ad8f6e12f94bfe96e9f98d1', name: "suffix" }), this.clearable && this.internalValue && (hAsync("sd-icon", { key: '82bf96b1a01516e0a7ea0dd735509511aa8a0e05', name: "close", color: "grey_65", size: "16", class: "sd-input__clear-icon", onClick: async () => {
8933
9683
  this.internalValue = '';
8934
9684
  await this.formField?.sdValidate();
8935
9685
  } })))));
@@ -8992,7 +9742,7 @@ class SdLoadingSpinner {
8992
9742
  return resolveColor(this.color);
8993
9743
  }
8994
9744
  render() {
8995
- return (hAsync(Fragment, { key: 'c3b3448fcc65334af3246f80157b195ec5595afe' }, hAsync("svg", { key: '24701b65d17e56434cf46b72dbd5acec208b5dc8', class: "sd-loading-spinner", width: "72px", height: "72px", viewBox: "25 25 50 50", style: { color: this.resolvedColor } }, hAsync("circle", { key: 'e19c68c082348d36eecd05fa561eee91182349f2', class: "path", cx: "50", cy: "50", r: "20", fill: "none", stroke: "currentColor", "stroke-width": "5", "stroke-miterlimit": "10" }))));
9745
+ return (hAsync(Fragment, { key: '1a4edb8be9cc83ab900cd615ee30958d9822e98b' }, hAsync("svg", { key: '634070026b58303bf3423b10f37ed6603179b9b1', class: "sd-loading-spinner", width: "72px", height: "72px", viewBox: "25 25 50 50", style: { color: this.resolvedColor } }, hAsync("circle", { key: 'fda3f7e4f787176f6030e19a3f2c1dd59326d35a', class: "path", cx: "50", cy: "50", r: "20", fill: "none", stroke: "currentColor", "stroke-width": "5", "stroke-miterlimit": "10" }))));
8996
9746
  }
8997
9747
  static get style() { return sdLoadingSpinnerCss(); }
8998
9748
  static get cmpMeta() { return {
@@ -9314,17 +10064,17 @@ class SdNumberInput {
9314
10064
  const inputStyles = {
9315
10065
  textAlign: this.useButton ? 'center' : 'right',
9316
10066
  };
9317
- return (hAsync("sd-field", { key: '7aa387eeb5850052e121931b3f8183373b4319aa', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, ref: el => (this.formField = el), style: inputWidth }, hAsync("label", { key: 'f5bbb6c76e32de4aefe59c6958a38e1a560f05c9', class: {
10067
+ return (hAsync("sd-field", { key: '837e3b5c34396eb83adcf52f3242d24ad122be0a', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, ref: el => (this.formField = el), style: inputWidth }, hAsync("label", { key: '57000cb104bb65b1827e2cdb059bad004c236b2a', class: {
9318
10068
  'sd-number-input': true,
9319
10069
  [this.getInputStatus()]: true,
9320
10070
  'sd-number-input--with-buttons': this.useButton,
9321
- }, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("input", { key: 'fc26b7cf0d121025c9a748b158640e03188d72d3', name: this.name, ref: el => (this.nativeEl = el), class: `sd-number-input__input ${this.inputClass}`, type: "text", inputMode: "numeric", value: this.displayValue, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onKeyDown: this.handleKeyDown, style: inputStyles, onFocus: this.handleFocus, onBlur: this.handleBlur }), this.useButton && (hAsync("div", { key: 'c9325ea7dd19c02fead55a0d63ac0b7b16143d08', class: "sd-number-input__buttons" }, hAsync("button", { key: 'ec96811ce7046a3fe9506ca0635db97413d8283a', type: "button", class: {
10071
+ }, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("input", { key: 'da7fe761d7e2528dd299d6ee5867bc7a5e0983ee', name: this.name, ref: el => (this.nativeEl = el), class: `sd-number-input__input ${this.inputClass}`, type: "text", inputMode: "numeric", value: this.displayValue, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onKeyDown: this.handleKeyDown, style: inputStyles, onFocus: this.handleFocus, onBlur: this.handleBlur }), this.useButton && (hAsync("div", { key: '3a58c1b9da818dbe0d4d29b79816bbc81288be49', class: "sd-number-input__buttons" }, hAsync("button", { key: '507b418d1aea67247d10fcba514b51cc966b3ce9', type: "button", class: {
9322
10072
  'sd-number-input__button': true,
9323
10073
  'sd-number-input__button--decrement': true,
9324
- }, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: '70311a7723356ecc88125042d366bf567b0b5a2a', name: "minus", size: 12, color: this.isDecrementDisabled() ? 'grey_45' : 'brilliantblue_70' })), hAsync("button", { key: 'b7086218dc98fec4287e4becb0d834634fd52055', type: "button", class: {
10074
+ }, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: 'e0b28e6cf9a5c9d578688e45f7db227516f6373f', name: "minus", size: 12, color: this.isDecrementDisabled() ? 'grey_45' : 'brilliantblue_70' })), hAsync("button", { key: '813bf64d160888e610da067fef9dea11375dd51b', type: "button", class: {
9325
10075
  'sd-number-input__button': true,
9326
10076
  'sd-number-input__button--increment': true,
9327
- }, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: 'b945a1561978dc4bba1868fa57652e94a6bcfc34', name: "add", size: 12, color: this.isIncrementDisabled() ? 'grey_45' : 'brilliantblue_70' })))))));
10077
+ }, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: '6677d8b46b123e5534bfa8b2fcb45276d9b70782', name: "add", size: 12, color: this.isIncrementDisabled() ? 'grey_45' : 'brilliantblue_70' })))))));
9328
10078
  }
9329
10079
  static get watchers() { return {
9330
10080
  "value": [{
@@ -9448,12 +10198,12 @@ class SdPagination {
9448
10198
  }
9449
10199
  }
9450
10200
  render() {
9451
- return (hAsync("div", { key: 'feed08139c382f91539bc316a967ed1738529688', class: this.paginationClasses }, hAsync("div", { key: '42c908d7a685f2acab29a94d040e4f4c513fff38', class: "prepend-btns" }, this.renderPrevButtons()), this.simple ? (hAsync("div", { class: "pagination-info" }, hAsync("span", { class: "current-page" }, this.currentPage), hAsync("span", null, "/"), hAsync("span", { class: "last-page" }, this.lastPage))) : (this.pageNumbers.map(n => (hAsync("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
10201
+ return (hAsync("div", { key: '1adbe18d363ff7946e900929d0dfaec1a1807d45', class: this.paginationClasses }, hAsync("div", { key: '104eb4ac5fa9e8564c8730f34aefca4e0ac31cc6', class: "prepend-btns" }, this.renderPrevButtons()), this.simple ? (hAsync("div", { class: "pagination-info" }, hAsync("span", { class: "current-page" }, this.currentPage), hAsync("span", null, "/"), hAsync("span", { class: "last-page" }, this.lastPage))) : (this.pageNumbers.map(n => (hAsync("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
9452
10202
  'pagination-btn': true,
9453
10203
  'pagination-btn--selected': this.currentPage === n,
9454
10204
  }, disabled: this.currentPage === n, style: {
9455
10205
  '--pagination-btn-width': `${this.buttonWidth}px`,
9456
- }, onClick: () => this.handlePageChange(n) }, n)))), hAsync("div", { key: '2be11ae773c0bce71ecaf53f99daff3f5b2d567d', class: "append-btns" }, this.renderNextButtons())));
10206
+ }, onClick: () => this.handlePageChange(n) }, n)))), hAsync("div", { key: 'e596b6a182e22ae4a8e95d5babb548d3bfba373d', class: "append-btns" }, this.renderNextButtons())));
9457
10207
  }
9458
10208
  static get style() { return sdPaginationCss(); }
9459
10209
  static get cmpMeta() { return {
@@ -9507,11 +10257,11 @@ class SdPopover {
9507
10257
  this.showPopover = false;
9508
10258
  };
9509
10259
  render() {
9510
- return (hAsync(Fragment, { key: '883bea0d5ef88bb63b4a1a2d778aedf0bce6f000' }, this.label ? (hAsync("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) })) : (hAsync("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 && (hAsync("sd-floating-portal", { key: 'f38658d537cd8cebb84e579b02c73209e8a81d3a', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, hAsync("div", { key: '472702d7d51c08051670012fc2e930f41ad7f1b5', class: {
10260
+ return (hAsync(Fragment, { key: '4c256f17bc8601f889d18e2b8ee9ce5b4436b75e' }, this.label ? (hAsync("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) })) : (hAsync("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 && (hAsync("sd-floating-portal", { key: 'd1a8ef964dc6b9458b47d2d2e0d1eb25662e1537', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, hAsync("div", { key: '1aef778cbd469b16fe145957ea05c0ccbc2af8e7', class: {
9511
10261
  'sd-floating-menu': true,
9512
10262
  [`sd-floating-menu--${this.placement}`]: true,
9513
10263
  [this.menuClass]: !!this.menuClass,
9514
- } }, hAsync("i", { key: '1895eba14b74f393c7221db83fdf97e9a8f3a1aa', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, hAsync(TooltipArrow, { key: '4307eb8e750dc36cae5477b366a4ea08a59a5a45' })), hAsync("div", { key: '840d94cf1d4e3c63346cd48a2d47c1c0b0633046', class: "sd-floating-menu__content" }, this.menuTitle && hAsync("div", { key: 'ede807dfdb2efc2a8bf8f89ef597965092c79211', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (hAsync("div", { key: '613ea1b46810eec1958b735fc23811d66ff2ebf8', class: "sd-floating-menu__messages" }, this.messages.map(message => (hAsync("div", null, message))))), this.buttons.length > 0 && (hAsync("div", { key: '06712ed73687c0e99778d5fda6d75a4e07d815dd', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (hAsync("sd-button", { ...button })))))), this.useClose && (hAsync("button", { key: '20d628d8d31bd6464c26f3cf5ba894c5c3a2428f', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, hAsync("sd-icon", { key: 'cd1dcbe02ed55a25364e88621db5ab287eb7ed8e', name: "close", size: "12", color: "gery_55" }))))))));
10264
+ } }, hAsync("i", { key: 'ff8f07f418d3bdcaf15b7e058158b91bd1cd2185', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, hAsync(TooltipArrow, { key: '9b1fb0577a5dcdf54ec1cc60935a9c3c1aa8319c' })), hAsync("div", { key: '0bfd33f6dde24fcdca635cbee04d2bc618f15185', class: "sd-floating-menu__content" }, this.menuTitle && hAsync("div", { key: 'de381d79af2f5d976e5cbccf5ed2b60aae9e6f26', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (hAsync("div", { key: '316f3398861cc9e54f5c16bd08c7b45422857ae1', class: "sd-floating-menu__messages" }, this.messages.map(message => (hAsync("div", null, message))))), this.buttons.length > 0 && (hAsync("div", { key: '2466d39c9105310821a509cc8d493d34b27bbb7d', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (hAsync("sd-button", { ...button })))))), this.useClose && (hAsync("button", { key: 'd9cf295dfe0a20e9f79f371292520d9c757df55d', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, hAsync("sd-icon", { key: '3ecc02bbfc890b1f66c57160041882c27153e44b', name: "close", size: "12", color: "gery_55" }))))))));
9515
10265
  }
9516
10266
  static get watchers() { return {
9517
10267
  "show": [{
@@ -9562,25 +10312,31 @@ class SdPortal {
9562
10312
  wrapper;
9563
10313
  rafId;
9564
10314
  isInsideClick = false;
10315
+ handleObservedScroll = () => this.updatePosition();
9565
10316
  resizeObserver;
9566
10317
  mutationObserver;
10318
+ scrollParents = [];
10319
+ isObserved = false;
10320
+ handleOpenChange() {
10321
+ this.syncPortalState();
10322
+ }
9567
10323
  componentDidLoad() {
9568
10324
  this.container = this.resolveContainer();
9569
- this.createWrapper();
9570
- this.moveSlotContent();
9571
- this.updatePosition();
9572
- this.observeParent();
10325
+ this.syncPortalState();
9573
10326
  }
9574
10327
  componentDidRender() {
9575
- if (!this.wrapper)
9576
- return;
9577
- this.wrapper.style.display = this.open ? 'block' : 'none';
9578
- if (this.open)
9579
- this.updatePosition();
10328
+ this.syncPortalState();
9580
10329
  }
9581
10330
  disconnectedCallback() {
9582
10331
  this.unobserveParent();
9583
- this.wrapper?.remove();
10332
+ if (this.wrapper?.parentNode) {
10333
+ try {
10334
+ this.wrapper.parentNode.removeChild(this.wrapper);
10335
+ }
10336
+ catch {
10337
+ // Stencil spec mock DOM can already detach the wrapper before this callback runs.
10338
+ }
10339
+ }
9584
10340
  }
9585
10341
  resolveContainer() {
9586
10342
  const el = typeof this.to === 'string' ? document.querySelector(this.to) : this.to;
@@ -9595,6 +10351,26 @@ class SdPortal {
9595
10351
  });
9596
10352
  this.container.appendChild(this.wrapper);
9597
10353
  }
10354
+ ensureWrapper() {
10355
+ if (this.wrapper)
10356
+ return;
10357
+ this.container ||= this.resolveContainer();
10358
+ this.createWrapper();
10359
+ this.moveSlotContent();
10360
+ }
10361
+ syncPortalState() {
10362
+ if (!this.open) {
10363
+ this.wrapper && (this.wrapper.style.display = 'none');
10364
+ this.unobserveParent();
10365
+ return;
10366
+ }
10367
+ this.ensureWrapper();
10368
+ if (!this.wrapper)
10369
+ return;
10370
+ this.wrapper.style.display = 'block';
10371
+ this.observeParent();
10372
+ this.updatePosition();
10373
+ }
9598
10374
  moveSlotContent() {
9599
10375
  if (!this.wrapper)
9600
10376
  return;
@@ -9636,19 +10412,57 @@ class SdPortal {
9636
10412
  }
9637
10413
  // parentRef의 이동 / 크기변경 감지
9638
10414
  observeParent() {
9639
- if (!this.parentRef)
10415
+ if (!this.parentRef || this.isObserved)
9640
10416
  return;
9641
- this.resizeObserver = new ResizeObserver(() => this.updatePosition());
9642
- this.resizeObserver.observe(this.parentRef);
9643
- this.mutationObserver = new MutationObserver(() => this.updatePosition());
9644
- this.mutationObserver.observe(document.body, {
9645
- childList: true,
9646
- subtree: true,
9647
- });
10417
+ this.observeScrollParents(this.parentRef);
10418
+ if (typeof ResizeObserver !== 'undefined') {
10419
+ this.resizeObserver = new ResizeObserver(() => this.updatePosition());
10420
+ this.resizeObserver.observe(this.parentRef);
10421
+ }
10422
+ if (typeof MutationObserver !== 'undefined') {
10423
+ this.mutationObserver = new MutationObserver(() => this.updatePosition());
10424
+ this.mutationObserver.observe(document.body, {
10425
+ childList: true,
10426
+ subtree: true,
10427
+ });
10428
+ }
10429
+ this.isObserved = true;
9648
10430
  }
9649
10431
  unobserveParent() {
10432
+ if (!this.isObserved)
10433
+ return;
10434
+ this.unobserveScrollParents();
9650
10435
  this.resizeObserver?.disconnect();
10436
+ this.resizeObserver = undefined;
9651
10437
  this.mutationObserver?.disconnect();
10438
+ this.mutationObserver = undefined;
10439
+ this.isObserved = false;
10440
+ }
10441
+ observeScrollParents(element) {
10442
+ const nextScrollParents = this.getScrollParents(element);
10443
+ nextScrollParents.forEach(parent => {
10444
+ parent.addEventListener('scroll', this.handleObservedScroll, { passive: true });
10445
+ });
10446
+ this.scrollParents = nextScrollParents;
10447
+ }
10448
+ unobserveScrollParents() {
10449
+ this.scrollParents.forEach(parent => {
10450
+ parent.removeEventListener('scroll', this.handleObservedScroll);
10451
+ });
10452
+ this.scrollParents = [];
10453
+ }
10454
+ getScrollParents(element) {
10455
+ const scrollParents = [];
10456
+ let currentElement = element.parentElement;
10457
+ while (currentElement) {
10458
+ const { overflow, overflowX, overflowY } = getComputedStyle(currentElement);
10459
+ const isScrollable = [overflow, overflowX, overflowY].some(value => /(auto|scroll|overlay)/.test(value));
10460
+ if (isScrollable) {
10461
+ scrollParents.push(currentElement);
10462
+ }
10463
+ currentElement = currentElement.parentElement;
10464
+ }
10465
+ return scrollParents;
9652
10466
  }
9653
10467
  // 외부 클릭 감지
9654
10468
  handleMouseDown(e) {
@@ -9664,8 +10478,13 @@ class SdPortal {
9664
10478
  this.close.emit();
9665
10479
  }
9666
10480
  render() {
9667
- return hAsync("slot", { key: 'ba2bf5df16f9bef0acef1ac8a08b090a23d02bc7' });
10481
+ return hAsync("slot", { key: 'be76727404b0172e1049ae572acf4eacd4ea4a25' });
9668
10482
  }
10483
+ static get watchers() { return {
10484
+ "open": [{
10485
+ "handleOpenChange": 0
10486
+ }]
10487
+ }; }
9669
10488
  static get cmpMeta() { return {
9670
10489
  "$flags$": 772,
9671
10490
  "$tagName$": "sd-portal",
@@ -9721,10 +10540,10 @@ class SdProgress {
9721
10540
  return this.statusColor[this.progressStatus];
9722
10541
  }
9723
10542
  render() {
9724
- return (hAsync("div", { key: '43da9dac67e760bfe53b8db11c27eef7ef0d8b3b', style: {
10543
+ return (hAsync("div", { key: 'a11cc2a22ad1628d63882ca1e5f7f1e3715ba719', style: {
9725
10544
  '--progress-color': this.progressColor,
9726
10545
  '--progress-percentage': `${this.progressPercentage}%`,
9727
- } }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && hAsync("div", { key: 'af4b1c44f655546fede8ad548bddc6afb7810d2b', class: "sd-progress__label" }, this.label)));
10546
+ } }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && hAsync("div", { key: 'dbc62a8fa4039127356f8b734482e1d0eb26c22b', class: "sd-progress__label" }, this.label)));
9728
10547
  }
9729
10548
  renderBarProgress() {
9730
10549
  return (hAsync("div", { class: `sd-progress__bar sd-progress__bar--${this.progressStatus}` }, hAsync("div", { class: ['sd-progress__bar__percent', this.progressPercentage < 100 ? 'proceed' : ''].join(' ') }), hAsync("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--left" }, this.progressPercentage, "%"), hAsync("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--right" }, this.progressPercentage, "%")));
@@ -9922,94 +10741,6 @@ class SdRadioGroup {
9922
10741
  }; }
9923
10742
  }
9924
10743
 
9925
- class DropdownManager {
9926
- static instance;
9927
- activeDropdowns = new Set();
9928
- static getInstance() {
9929
- if (!DropdownManager.instance) {
9930
- DropdownManager.instance = new DropdownManager();
9931
- }
9932
- return DropdownManager.instance;
9933
- }
9934
- register(component) {
9935
- this.activeDropdowns.add(component);
9936
- }
9937
- unregister(component) {
9938
- this.activeDropdowns.delete(component);
9939
- }
9940
- openDropdown(targetComponent) {
9941
- // 다른 모든 드롭다운 닫기
9942
- this.activeDropdowns.forEach(component => {
9943
- if (component !== targetComponent && component.isOpen) {
9944
- component.closeDropdown();
9945
- }
9946
- });
9947
- }
9948
- closeAllDropdowns() {
9949
- this.activeDropdowns.forEach(component => {
9950
- if (component.isOpen) {
9951
- component.closeDropdown();
9952
- }
9953
- });
9954
- }
9955
- }
9956
- const dropdownManager = DropdownManager.getInstance();
9957
-
9958
- // 여러 select를 동시에 사용할때에 이벤트 리스너의 등록이 충돌나는 문제를 해결하기 위한 Base class
9959
- // 각 드롭다운 컴포넌트는 이 클래스를 상속 및 구현 필요
9960
- // 기본적으로 click, keydown 추상 이벤트를 구현해야하고
9961
- // isOpen가 true일때에만 이벤트 등록 그외에는 이벤트 클리닝을 수행
9962
- // 추후 필요한 이벤트는 이곳에 추가하여 추가 구현 후 사용
9963
- // 별도로 드롭다운 전용의 Base class가 아닌 공통적으로 사용할 수 있는 Base class가 필요할지 검토 필요
9964
- class BaseDropdownEvent {
9965
- documentClickHandler;
9966
- documentKeydownHandler;
9967
- // 컴포넌트 생명주기에서 호출할 메서드들
9968
- initializeEvent() {
9969
- dropdownManager.register(this);
9970
- this.initializeEventHandlers();
9971
- }
9972
- cleanupEvent() {
9973
- dropdownManager.unregister(this);
9974
- this.cleanup();
9975
- }
9976
- initializeEventHandlers() {
9977
- this.documentClickHandler = (event) => this.handleDocumentClick(event);
9978
- this.documentKeydownHandler = (event) => this.handleDocumentKeydown(event);
9979
- }
9980
- addGlobalEventListeners() {
9981
- if (this.documentClickHandler) {
9982
- document.addEventListener('click', this.documentClickHandler);
9983
- }
9984
- if (this.documentKeydownHandler) {
9985
- document.addEventListener('keydown', this.documentKeydownHandler);
9986
- }
9987
- }
9988
- removeGlobalEventListeners() {
9989
- if (this.documentClickHandler) {
9990
- document.removeEventListener('click', this.documentClickHandler);
9991
- }
9992
- if (this.documentKeydownHandler) {
9993
- document.removeEventListener('keydown', this.documentKeydownHandler);
9994
- }
9995
- }
9996
- onDropdownToggle(isOpen) {
9997
- if (isOpen && !this.disabled) {
9998
- dropdownManager.openDropdown(this);
9999
- this.addGlobalEventListeners();
10000
- }
10001
- else {
10002
- this.removeGlobalEventListeners();
10003
- }
10004
- }
10005
- cleanup() {
10006
- this.removeGlobalEventListeners();
10007
- }
10008
- closeDropdown() {
10009
- this.isOpen = false;
10010
- }
10011
- }
10012
-
10013
10744
  class SelectKeyboardNavigation {
10014
10745
  isSearchable;
10015
10746
  filteredOptions;
@@ -10391,10 +11122,10 @@ class SdSelectDropdown {
10391
11122
  this.isScrolled = scrollTop > 0;
10392
11123
  };
10393
11124
  render() {
10394
- return (hAsync("div", { key: 'ff55e2e133114accc2641a0025bdcf551eda3511', class: {
11125
+ return (hAsync("div", { key: 'd69eabae6b1769212fb4755413de8e54ede8a213', class: {
10395
11126
  'sd-select-dropdown': true,
10396
11127
  'sd-select-dropdown--ready': this.isDropdownReady,
10397
- }, style: this.dropdownSize, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (hAsync("sd-select-search-input", { key: 'bfcee14aa06a9a259dd8e67013ed1074c1f9c318', ref: el => (this.searchRef = el), isScrolled: this.isScrolled, searchText: this.searchText, onSdSearchInput: (event) => (this.searchText = event.detail || ''), onSdSearchFocus: () => (this.itemIndex = -1) })), this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (hAsync("slot", { name: `option-${option.value}` }, hAsync("sd-select-option", { option: option, index: index, isSelected: this.isOptionSelected(option.value), isFocused: index === this.itemIndex, onOptionClick: ({ detail }) => this.optionClick.emit(detail), useCheckbox: this.useCheckbox }))))) : (hAsync("slot", { name: "option-placeholder" }, hAsync("div", { class: 'sd-select-option-placeholder' }, this.optionPlaceholder)))));
11128
+ }, style: this.dropdownSize, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (hAsync("sd-select-search-input", { key: '7e9937e5b38a038b4b7bb0cd09ef4a69a336c673', ref: el => (this.searchRef = el), isScrolled: this.isScrolled, searchText: this.searchText, onSdSearchInput: (event) => (this.searchText = event.detail || ''), onSdSearchFocus: () => (this.itemIndex = -1) })), this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (hAsync("slot", { name: `option-${option.value}` }, hAsync("sd-select-option", { option: option, index: index, isSelected: this.isOptionSelected(option.value), isFocused: index === this.itemIndex, onOptionClick: ({ detail }) => this.optionClick.emit(detail), useCheckbox: this.useCheckbox }))))) : (hAsync("slot", { name: "option-placeholder" }, hAsync("div", { class: 'sd-select-option-placeholder' }, this.optionPlaceholder)))));
10398
11129
  }
10399
11130
  static get watchers() { return {
10400
11131
  "filteredOptions": [{
@@ -10580,7 +11311,7 @@ class SdSelectMultiple extends BaseDropdownEvent {
10580
11311
  this.handleOptionSelection(option);
10581
11312
  };
10582
11313
  render() {
10583
- return (hAsync("sd-field", { key: 'e445d2c3f80d78be0e74b1f54371eb27d9c316e8', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, hAsync("div", { key: '9fad0ed744cafb9e1e5f16ee413f36edd8f2c1f3', class: {
11314
+ return (hAsync("sd-field", { key: '9f78c7a47f580ba6d64fbc4a69e2f1f72f30e66f', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, hAsync("div", { key: 'fab43f26f83788991067096f8574421ddeb0a829', class: {
10584
11315
  'sd-select-multiple': true,
10585
11316
  'sd-select-multiple--open': this.isOpen,
10586
11317
  'sd-select-multiple--disabled': this.disabled,
@@ -11173,7 +11904,7 @@ class SdSelectOption {
11173
11904
  }
11174
11905
  };
11175
11906
  render() {
11176
- return (hAsync("div", { key: 'a4fcca24b0bdde4f4665585c6cede84bd3b64d59', class: {
11907
+ return (hAsync("div", { key: 'b9844296973b6e85d3c3e3652671e89f470ec7a9', class: {
11177
11908
  'sd-select__option': true,
11178
11909
  'sd-select__option--selected': this.isSelected,
11179
11910
  'sd-select__option--disabled': !!this.option.disabled,
@@ -11259,7 +11990,7 @@ class SdSelectOptionGroup {
11259
11990
  }
11260
11991
  };
11261
11992
  render() {
11262
- return (hAsync("div", { key: '8e88aacd2c3122a563fcf78bcbe9731b6a29d8c5', class: {
11993
+ return (hAsync("div", { key: '70ab9a558faf068cfc4eb0a5f6a29453ceedc6ec', class: {
11263
11994
  'sd-select__option-group': true,
11264
11995
  'sd-select__option-group--selected': !!this.isSelected,
11265
11996
  'sd-select__option-group--disabled': !!this.option.disabled,
@@ -11268,10 +11999,10 @@ class SdSelectOptionGroup {
11268
11999
  'sd-select__option-group--group': this.option.type === 'group',
11269
12000
  'sd-select__option-group--subgroup': this.option.type === 'subgroup',
11270
12001
  'sd-select__option-group--item': this.option.type === 'item',
11271
- }, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, hAsync("div", { key: 'be4bc7f2867ea5c86505bc9284ac3de46f7077f9', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (hAsync("sd-checkbox", { key: '00063ab3a6f1d4f44671ac82dd05524968bec668', value: this.isSelected, disabled: this.option.disabled, onClick: e => {
12002
+ }, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, hAsync("div", { key: 'ca5dc0033231ab204a8688f98453742cdbde7d26', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (hAsync("sd-checkbox", { key: 'bba6cb9fe649f6eda82ba287f73d0142e02c53c2', value: this.isSelected, disabled: this.option.disabled, onClick: e => {
11272
12003
  e.preventDefault();
11273
12004
  this.handleClick(this.option, this.isSelected, e);
11274
- } })), hAsync("span", { key: '802c908d44bf1c0db5d64bf4c8d4bab4ebe2b87c', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (hAsync("span", { key: 'efd26a2d6e4e2662410de3755b70a2a2585ad0c4', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
12005
+ } })), hAsync("span", { key: '7d03c080b7f5b92881389bfec787015a6ac55fa1', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (hAsync("span", { key: '7066453f92eac7549569db6854e3dc32515d80b9', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
11275
12006
  }
11276
12007
  static get style() { return sdSelectOptionGroupCss(); }
11277
12008
  static get cmpMeta() { return {
@@ -11320,17 +12051,17 @@ class SdSelectSearchInput {
11320
12051
  input?.focus({ preventScroll: true });
11321
12052
  }
11322
12053
  render() {
11323
- return (hAsync("div", { key: 'b19a029ef82d876c984c1f827d7a0f29bb823f5d', class: {
12054
+ return (hAsync("div", { key: '2d211645dc4041411e187f248a260a23b7c544f6', class: {
11324
12055
  'sd-select-search-input': true,
11325
12056
  'sd-select-search-input--scrolled': !!this.isScrolled,
11326
- }, onClick: event => event.stopPropagation() }, hAsync("sd-input", { key: '8e27f40e1b507f0c5cb2d4bde48750cd0089a9da', ref: el => (this.searchRef = el), value: this.searchText, placeholder: "\uAC80\uC0C9", clearable: true, inputStyle: { 'padding-left': '8px' }, autofocus: true, onSdUpdate: event => {
12057
+ }, onClick: event => event.stopPropagation() }, hAsync("sd-input", { key: 'c609af0ab36359c8ccaea5827821dbc509d13eac', ref: el => (this.searchRef = el), value: this.searchText, placeholder: "\uAC80\uC0C9", clearable: true, inputStyle: { 'padding-left': '8px' }, autofocus: true, onSdUpdate: event => {
11327
12058
  this.searchInput.emit(String(event?.detail));
11328
12059
  }, onSdFocus: () => {
11329
12060
  this.searchFocus.emit();
11330
12061
  }, onKeyDown: event => {
11331
12062
  if (event.code === 'Enter')
11332
12063
  event.stopPropagation();
11333
- } }, hAsync("sd-icon", { key: '2b38a07cbc0bb0d7dd020ece45f18bdff4c262e5', name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" }))));
12064
+ } }, hAsync("sd-icon", { key: '96a511b1f8625c883ec50d5e2985ff396d7b57c7', name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" }))));
11334
12065
  }
11335
12066
  static get style() { return sdSelectSearchInputCss(); }
11336
12067
  static get cmpMeta() { return {
@@ -12425,10 +13156,10 @@ class SdTextarea {
12425
13156
  }
12426
13157
  render() {
12427
13158
  const maxLengthCounter = this.getMaxLengthCounter();
12428
- return (hAsync("div", { key: '888d11be57629e83e1215daddab63351a323672f', class: {
13159
+ return (hAsync("div", { key: 'd538d3ab99c174f1fedc92c547fcba61d1097608', class: {
12429
13160
  'sd-textarea': true,
12430
13161
  [this.getTextareaStatus()]: true,
12431
- }, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("div", { key: '1f91a1e435b2dba1817ce181f91bdf3829142682', class: "sd-textarea__content" }, hAsync("textarea", { key: 'd883f4cdfd56220cf4382893f94a469f7afd7ff2', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, autofocus: this.autoFocus, maxLength: this.maxLength, onInput: this.handleInput.bind(this), onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event) })), this.hasFooter() && (hAsync("div", { key: 'e9350d8e49eb87b2caddfc24079ece0d59c79739', class: "sd-textarea__footer" }, this.helpText !== undefined && hAsync("span", { key: 'cda9e2b8b0c15fbc7356597d4363d438688c8e4e', class: "sd-textarea__help-text" }, this.helpText), maxLengthCounter !== null && hAsync("span", { key: '491e990142e07837169e84a3fcc3e80c00bc7153', class: "sd-textarea__counter" }, maxLengthCounter)))));
13162
+ }, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("div", { key: '1f4b6059d56e673568e4662f423bf6c76b781ad7', class: "sd-textarea__content" }, hAsync("textarea", { key: '812814fdfc3044ba796830be47d5e5f93a423734', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, autofocus: this.autoFocus, maxLength: this.maxLength, onInput: this.handleInput.bind(this), onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event) })), this.hasFooter() && (hAsync("div", { key: '2ea2c482ea874607411d1f4ecaabb99d095122ad', class: "sd-textarea__footer" }, this.helpText !== undefined && hAsync("span", { key: 'b14afd0acf981bbbd3cef6bd7490f3a3fe9b443a', class: "sd-textarea__help-text" }, this.helpText), maxLengthCounter !== null && hAsync("span", { key: '2aa68acd081a61d22010c799621b06fa49e7b8a6', class: "sd-textarea__counter" }, maxLengthCounter)))));
12432
13163
  }
12433
13164
  static get watchers() { return {
12434
13165
  "value": [{
@@ -12569,7 +13300,7 @@ class SdToggle {
12569
13300
  this.change.emit(newValue);
12570
13301
  };
12571
13302
  render() {
12572
- return (hAsync("label", { key: 'c0fcd12c231fdb995b5edae756157c58b352fd0f', "aria-label": this.label || 'toggle', class: this.toggleClasses }, hAsync("input", { key: 'e50042ae04830f4c276d8140725ab62cc2d0490d', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), this.label && hAsync("span", { key: '99f9506a2dcea8cfd85aabf6b71243c116a2bf11', class: "sd-toggle__label" }, this.label), hAsync("div", { key: '424e1ae78d5684051bd7a2b3ba89f6760f773f1c', class: "sd-toggle__track" }, hAsync("div", { key: '29aab89e58022ce22f026fb694bb9b1e4531d8cf', class: "sd-toggle__thumb" }))));
13303
+ return (hAsync("label", { key: '96e1e542413ede219dddf64f80112c1267973507', "aria-label": this.label || 'toggle', class: this.toggleClasses }, hAsync("input", { key: '301ea8516df99c351fc7162ef80db112778d55ad', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), this.label && hAsync("span", { key: '7382cf219c544aec9169a69a07856948512d2ac1', class: "sd-toggle__label" }, this.label), hAsync("div", { key: 'f9d6c5d4e94f12a64c242026974d71b8b8b140c7', class: "sd-toggle__track" }, hAsync("div", { key: '2798217a6e9766c0e6d3cc6ed333c54a0106d978', class: "sd-toggle__thumb" }))));
12573
13304
  }
12574
13305
  static get style() { return sdToggleCss(); }
12575
13306
  static get cmpMeta() { return {
@@ -12625,7 +13356,7 @@ class SdToggleButton {
12625
13356
  this.change.emit(newValue);
12626
13357
  };
12627
13358
  render() {
12628
- return (hAsync("label", { key: '6f8d9e738490ef344ff26a4026b9de17af68041e', class: this.buttonClasses, "aria-label": this.label || 'toggle button' }, this.label, hAsync("input", { key: '6d9d45c451301c4635e610fd70280be1fe65b316', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
13359
+ return (hAsync("label", { key: '65bd84349d293e027829dc8a7e80c1bbee123b25', class: this.buttonClasses, "aria-label": this.label || 'toggle button' }, this.label, hAsync("input", { key: 'f03c1a1dd64d608766c0996539cb6422efa99ef7', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
12629
13360
  }
12630
13361
  static get style() { return sdToggleButtonCss(); }
12631
13362
  static get cmpMeta() { return {
@@ -12725,11 +13456,13 @@ class SdTooltip {
12725
13456
  registerComponents([
12726
13457
  SdBadge,
12727
13458
  SdButton,
13459
+ SdButtonV2,
12728
13460
  SdCard,
12729
13461
  SdCheckbox,
12730
13462
  SdDateBox,
12731
13463
  SdDatePicker,
12732
13464
  SdDateRangePicker,
13465
+ SdDropdownButton,
12733
13466
  SdField,
12734
13467
  SdFilePicker,
12735
13468
  SdFloatingPopover,