@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.mjs CHANGED
@@ -5512,8 +5512,103 @@ const size = {
5512
5512
  icon: "24"
5513
5513
  }
5514
5514
  };
5515
+ const border = {
5516
+ disabled: "#CCCCCC"
5517
+ };
5518
+ const dropdown = {
5519
+ xs: {
5520
+ minWidth: "60"
5521
+ },
5522
+ sm: {
5523
+ minWidth: "76"
5524
+ },
5525
+ md: {
5526
+ minWidth: "106"
5527
+ }
5528
+ };
5529
+ const bg = {
5530
+ disabled: "#E1E1E1"
5531
+ };
5532
+ const content = {
5533
+ disabled: "#888888"
5534
+ };
5535
+ const brand = {
5536
+ strong: {
5537
+ bg: {
5538
+ "default": "#025497",
5539
+ hover: "#004177"
5540
+ },
5541
+ content: "#FFFFFF",
5542
+ dropdown: {
5543
+ divider: "#006AC1"
5544
+ }
5545
+ },
5546
+ subtle: {
5547
+ bg: {
5548
+ "default": "#1F8AE1",
5549
+ hover: "#006AC1"
5550
+ },
5551
+ content: "#FFFFFF",
5552
+ dropdown: {
5553
+ divider: "#5CB0F3"
5554
+ }
5555
+ },
5556
+ outline: {
5557
+ bg: {
5558
+ "default": "#FFFFFF",
5559
+ hover: "#EAF5FE"
5560
+ },
5561
+ border: "#025497",
5562
+ content: "#025497"
5563
+ }
5564
+ };
5565
+ const neutral = {
5566
+ subtle: {
5567
+ bg: {
5568
+ "default": "#FFFFFF",
5569
+ hover: "#EEEEEE"
5570
+ },
5571
+ content: "#333333"
5572
+ },
5573
+ outline: {
5574
+ bg: {
5575
+ "default": "#FFFFFF",
5576
+ hover: "#EEEEEE"
5577
+ },
5578
+ border: "#888888",
5579
+ content: "#333333"
5580
+ }
5581
+ };
5582
+ const danger = {
5583
+ strong: {
5584
+ bg: {
5585
+ "default": "#E30000",
5586
+ hover: "#AD0000"
5587
+ },
5588
+ content: "#FFFFFF",
5589
+ dropdown: {
5590
+ divider: "#FF7C7C"
5591
+ }
5592
+ },
5593
+ outline: {
5594
+ bg: {
5595
+ "default": "#FFFFFF",
5596
+ hover: "#FCEFEF"
5597
+ },
5598
+ border: "#E30000",
5599
+ content: "#E30000"
5600
+ }
5601
+ };
5515
5602
  var buttonTokens = {
5516
- size: size};
5603
+ size: size,
5604
+ border: border,
5605
+ dropdown: dropdown,
5606
+ bg: bg,
5607
+ content: content,
5608
+ brand: brand,
5609
+ neutral: neutral,
5610
+ danger: danger
5611
+ };
5517
5612
 
5518
5613
  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}`;
5519
5614
 
@@ -5597,6 +5692,290 @@ class SdButton {
5597
5692
  }; }
5598
5693
  }
5599
5694
 
5695
+ const BUTTON_FOCUS_RING_COLOR = '#0075FF';
5696
+ const PRESET_DEFAULT_COLORS = {
5697
+ primary: buttonTokens.brand.strong.bg.default,
5698
+ secondary: buttonTokens.brand.subtle.bg.default,
5699
+ primary_outline: buttonTokens.brand.outline.bg.default,
5700
+ neutral: buttonTokens.neutral.subtle.bg.default,
5701
+ neutral_outline: buttonTokens.neutral.outline.bg.default,
5702
+ danger: buttonTokens.danger.strong.bg.default,
5703
+ danger_outline: buttonTokens.danger.outline.bg.default,
5704
+ };
5705
+ const BUTTON_CONFIG = {
5706
+ primary_xs: {
5707
+ variant: 'primary',
5708
+ size: 'xs',
5709
+ color: PRESET_DEFAULT_COLORS.primary,
5710
+ },
5711
+ secondary_xs: {
5712
+ variant: 'primary',
5713
+ size: 'xs',
5714
+ color: PRESET_DEFAULT_COLORS.secondary,
5715
+ },
5716
+ primary_outline_xs: {
5717
+ variant: 'outline',
5718
+ size: 'xs',
5719
+ color: PRESET_DEFAULT_COLORS.primary_outline,
5720
+ },
5721
+ neutral_xs: {
5722
+ variant: 'primary',
5723
+ size: 'xs',
5724
+ color: PRESET_DEFAULT_COLORS.neutral,
5725
+ },
5726
+ neutral_outline_xs: {
5727
+ variant: 'outline',
5728
+ size: 'xs',
5729
+ color: PRESET_DEFAULT_COLORS.neutral_outline,
5730
+ },
5731
+ danger_xs: {
5732
+ variant: 'primary',
5733
+ size: 'xs',
5734
+ color: PRESET_DEFAULT_COLORS.danger,
5735
+ },
5736
+ danger_outline_xs: {
5737
+ variant: 'outline',
5738
+ size: 'xs',
5739
+ color: PRESET_DEFAULT_COLORS.danger_outline,
5740
+ },
5741
+ primary_sm: {
5742
+ variant: 'primary',
5743
+ size: 'sm',
5744
+ color: PRESET_DEFAULT_COLORS.primary,
5745
+ },
5746
+ secondary_sm: {
5747
+ variant: 'primary',
5748
+ size: 'sm',
5749
+ color: PRESET_DEFAULT_COLORS.secondary,
5750
+ },
5751
+ primary_outline_sm: {
5752
+ variant: 'outline',
5753
+ size: 'sm',
5754
+ color: PRESET_DEFAULT_COLORS.primary_outline,
5755
+ },
5756
+ neutral_sm: {
5757
+ variant: 'primary',
5758
+ size: 'sm',
5759
+ color: PRESET_DEFAULT_COLORS.neutral,
5760
+ },
5761
+ neutral_outline_sm: {
5762
+ variant: 'outline',
5763
+ size: 'sm',
5764
+ color: PRESET_DEFAULT_COLORS.neutral_outline,
5765
+ },
5766
+ danger_sm: {
5767
+ variant: 'primary',
5768
+ size: 'sm',
5769
+ color: PRESET_DEFAULT_COLORS.danger,
5770
+ },
5771
+ danger_outline_sm: {
5772
+ variant: 'outline',
5773
+ size: 'sm',
5774
+ color: PRESET_DEFAULT_COLORS.danger_outline,
5775
+ },
5776
+ primary_md: {
5777
+ variant: 'primary',
5778
+ size: 'md',
5779
+ color: PRESET_DEFAULT_COLORS.primary,
5780
+ },
5781
+ secondary_md: {
5782
+ variant: 'primary',
5783
+ size: 'md',
5784
+ color: PRESET_DEFAULT_COLORS.secondary,
5785
+ },
5786
+ primary_outline_md: {
5787
+ variant: 'outline',
5788
+ size: 'md',
5789
+ color: PRESET_DEFAULT_COLORS.primary_outline,
5790
+ },
5791
+ neutral_md: {
5792
+ variant: 'primary',
5793
+ size: 'md',
5794
+ color: PRESET_DEFAULT_COLORS.neutral,
5795
+ },
5796
+ neutral_outline_md: {
5797
+ variant: 'outline',
5798
+ size: 'md',
5799
+ color: PRESET_DEFAULT_COLORS.neutral_outline,
5800
+ },
5801
+ danger_md: {
5802
+ variant: 'primary',
5803
+ size: 'md',
5804
+ color: PRESET_DEFAULT_COLORS.danger,
5805
+ },
5806
+ danger_outline_md: {
5807
+ variant: 'outline',
5808
+ size: 'md',
5809
+ color: PRESET_DEFAULT_COLORS.danger_outline,
5810
+ },
5811
+ primary_lg: {
5812
+ variant: 'primary',
5813
+ size: 'lg',
5814
+ color: PRESET_DEFAULT_COLORS.primary,
5815
+ },
5816
+ secondary_lg: {
5817
+ variant: 'primary',
5818
+ size: 'lg',
5819
+ color: PRESET_DEFAULT_COLORS.secondary,
5820
+ },
5821
+ primary_outline_lg: {
5822
+ variant: 'outline',
5823
+ size: 'lg',
5824
+ color: PRESET_DEFAULT_COLORS.primary_outline,
5825
+ },
5826
+ neutral_lg: {
5827
+ variant: 'primary',
5828
+ size: 'lg',
5829
+ color: PRESET_DEFAULT_COLORS.neutral,
5830
+ },
5831
+ neutral_outline_lg: {
5832
+ variant: 'outline',
5833
+ size: 'lg',
5834
+ color: PRESET_DEFAULT_COLORS.neutral_outline,
5835
+ },
5836
+ danger_lg: {
5837
+ variant: 'primary',
5838
+ size: 'lg',
5839
+ color: PRESET_DEFAULT_COLORS.danger,
5840
+ },
5841
+ danger_outline_lg: {
5842
+ variant: 'outline',
5843
+ size: 'lg',
5844
+ color: PRESET_DEFAULT_COLORS.danger_outline,
5845
+ },
5846
+ };
5847
+ const BUTTON_ICON_SIZES = {
5848
+ xs: Number(buttonTokens.size.xs.icon),
5849
+ sm: Number(buttonTokens.size.sm.icon),
5850
+ md: Number(buttonTokens.size.md.icon),
5851
+ lg: Number(buttonTokens.size.lg.icon),
5852
+ };
5853
+ const PRESET_HOVER_BACKGROUNDS$1 = {
5854
+ primary: buttonTokens.brand.strong.bg.hover,
5855
+ secondary: buttonTokens.brand.subtle.bg.hover,
5856
+ primary_outline: buttonTokens.brand.outline.bg.hover,
5857
+ neutral: buttonTokens.neutral.subtle.bg.hover,
5858
+ neutral_outline: buttonTokens.neutral.outline.bg.hover,
5859
+ danger: buttonTokens.danger.strong.bg.hover,
5860
+ danger_outline: buttonTokens.danger.outline.bg.hover,
5861
+ };
5862
+ const PRESET_CONTENT_COLORS$1 = {
5863
+ primary: buttonTokens.brand.strong.content,
5864
+ secondary: buttonTokens.brand.subtle.content,
5865
+ primary_outline: buttonTokens.brand.outline.content,
5866
+ neutral: buttonTokens.neutral.subtle.content,
5867
+ neutral_outline: buttonTokens.neutral.outline.content,
5868
+ danger: buttonTokens.danger.strong.content,
5869
+ danger_outline: buttonTokens.danger.outline.content,
5870
+ };
5871
+ const PRESET_BORDER_COLORS$1 = {
5872
+ primary: 'transparent',
5873
+ secondary: 'transparent',
5874
+ primary_outline: buttonTokens.brand.outline.border,
5875
+ neutral: 'transparent',
5876
+ neutral_outline: buttonTokens.neutral.outline.border,
5877
+ danger: 'transparent',
5878
+ danger_outline: buttonTokens.danger.outline.border,
5879
+ };
5880
+ const DISABLED_CONTENT = buttonTokens.content.disabled;
5881
+ const SIZE_SUFFIX_PATTERN = /_(xs|sm|md|lg)$/;
5882
+ const isButtonV2Name = (value) => value in BUTTON_CONFIG;
5883
+ const getPresetName = (value) => value.replace(SIZE_SUFFIX_PATTERN, '');
5884
+
5885
+ 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}`;
5886
+
5887
+ class SdButtonV2 {
5888
+ constructor(hostRef) {
5889
+ registerInstance(this, hostRef);
5890
+ this.click = createEvent(this, "sdClick");
5891
+ }
5892
+ name = 'primary_sm';
5893
+ label = '';
5894
+ icon;
5895
+ ariaLabel = '';
5896
+ disabled = false;
5897
+ type = 'button';
5898
+ click;
5899
+ hasWarnedMissingAriaLabel = false;
5900
+ handleClick = (event) => {
5901
+ if (this.disabled) {
5902
+ event.preventDefault();
5903
+ return;
5904
+ }
5905
+ this.click.emit(event);
5906
+ };
5907
+ get resolvedConfig() {
5908
+ if (!isButtonV2Name(this.name)) {
5909
+ throw new Error(`Invalid sd-button-v2 name: ${this.name}`);
5910
+ }
5911
+ const config = BUTTON_CONFIG[this.name];
5912
+ const preset = getPresetName(this.name);
5913
+ return {
5914
+ config,
5915
+ preset,
5916
+ };
5917
+ }
5918
+ getButtonClasses(preset, size, hasLabel, iconOnly) {
5919
+ const classes = ['sd-button-v2', `sd-button-v2--${preset}`, `sd-button-v2--${size}`];
5920
+ if (this.disabled) {
5921
+ classes.push('sd-button-v2--disabled');
5922
+ }
5923
+ if (iconOnly) {
5924
+ classes.push('sd-button-v2--icon-only');
5925
+ }
5926
+ if (hasLabel) {
5927
+ classes.push('sd-button-v2--has-label');
5928
+ }
5929
+ return classes.join(' ');
5930
+ }
5931
+ componentWillRender() {
5932
+ this.warnIfMissingAriaLabel();
5933
+ }
5934
+ warnIfMissingAriaLabel() {
5935
+ const iconOnly = !this.label && Boolean(this.icon);
5936
+ const missingAriaLabel = iconOnly && !this.ariaLabel.trim();
5937
+ if (!missingAriaLabel) {
5938
+ this.hasWarnedMissingAriaLabel = false;
5939
+ return;
5940
+ }
5941
+ if (this.hasWarnedMissingAriaLabel) {
5942
+ return;
5943
+ }
5944
+ console.warn(`[sd-button-v2] icon-only buttons require \`ariaLabel\`. Received name="${this.name}" icon="${this.icon}".`);
5945
+ this.hasWarnedMissingAriaLabel = true;
5946
+ }
5947
+ render() {
5948
+ const { config, preset } = this.resolvedConfig;
5949
+ const hasLabel = Boolean(this.label);
5950
+ const iconOnly = !this.label && Boolean(this.icon);
5951
+ const accessibleName = iconOnly && this.ariaLabel.trim() ? this.ariaLabel : undefined;
5952
+ const iconColor = this.disabled ? DISABLED_CONTENT : PRESET_CONTENT_COLORS$1[preset];
5953
+ return (hAsync("button", { key: 'f1c9355390568831fa0c4c7289e62e701e0174c2', class: this.getButtonClasses(preset, config.size, hasLabel, iconOnly), type: this.type, disabled: this.disabled, "aria-label": accessibleName, style: {
5954
+ '--sd-button-v2-bg': config.variant === 'primary' ? config.color : '#FFFFFF',
5955
+ '--sd-button-v2-bg-hover': PRESET_HOVER_BACKGROUNDS$1[preset],
5956
+ '--sd-button-v2-border': PRESET_BORDER_COLORS$1[preset],
5957
+ '--sd-button-v2-content': PRESET_CONTENT_COLORS$1[preset],
5958
+ '--sd-button-v2-accent': BUTTON_FOCUS_RING_COLOR,
5959
+ }, 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))));
5960
+ }
5961
+ static get style() { return sdButtonV2Css(); }
5962
+ static get cmpMeta() { return {
5963
+ "$flags$": 512,
5964
+ "$tagName$": "sd-button-v2",
5965
+ "$members$": {
5966
+ "name": [1],
5967
+ "label": [1],
5968
+ "icon": [1],
5969
+ "ariaLabel": [1, "aria-label"],
5970
+ "disabled": [4],
5971
+ "type": [1]
5972
+ },
5973
+ "$listeners$": undefined,
5974
+ "$lazyBundleId$": "-",
5975
+ "$attrsToReflect$": []
5976
+ }; }
5977
+ }
5978
+
5600
5979
  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}`;
5601
5980
 
5602
5981
  class SdCard {
@@ -5606,7 +5985,7 @@ class SdCard {
5606
5985
  bordered = false;
5607
5986
  sdClass = '';
5608
5987
  render() {
5609
- return (hAsync(Fragment, { key: '155504b50cb1c21fc1f847af8a9e8b685f7881ef' }, hAsync("div", { key: 'c461e3e40da44586da5e02ad508bf59942a9e82a', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, hAsync("slot", { key: '0c0ee023155c08c565c3496c44699a900666b084' }))));
5988
+ return (hAsync(Fragment, { key: 'a4f5635186614df68acf04c502f804c9f0c77df5' }, hAsync("div", { key: '99af2c33f69d069e108f7f122a6e7762ea918276', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, hAsync("slot", { key: '287c27708b9b80a9f04bfff87abdb65022762a6d' }))));
5610
5989
  }
5611
5990
  static get style() { return sdCardCss(); }
5612
5991
  static get cmpMeta() { return {
@@ -5922,7 +6301,7 @@ class SdDatePicker {
5922
6301
  this.isOpen = false;
5923
6302
  };
5924
6303
  render() {
5925
- 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" }, [
6304
+ 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" }, [
5926
6305
  ...this.calendar.prevMonthDays,
5927
6306
  ...this.calendar.days,
5928
6307
  ...this.calendar.afterMonthDays,
@@ -6114,10 +6493,10 @@ class SdDateRangePicker {
6114
6493
  this.setHoverDate(hoverDate);
6115
6494
  }
6116
6495
  render() {
6117
- return (hAsync("div", { key: '96cd4e99ae976517e7b24c5ff3046af976adc5cb', class: {
6496
+ return (hAsync("div", { key: 'e0eaf7463e91d3afed6ff977deb20d122e837fd4', class: {
6118
6497
  'sd-date-range-picker': true,
6119
6498
  'sd-date-range-picker--disabled': this.disabled,
6120
- } }, 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
6499
+ } }, 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
6121
6500
  ? `${this.prevYear}.${String(this.prevMonth).padStart(2, '0')}`
6122
6501
  : `${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)) }))))))))))))));
6123
6502
  }
@@ -6149,6 +6528,377 @@ class SdDateRangePicker {
6149
6528
  }; }
6150
6529
  }
6151
6530
 
6531
+ class DropdownManager {
6532
+ static instance;
6533
+ activeDropdowns = new Set();
6534
+ static getInstance() {
6535
+ if (!DropdownManager.instance) {
6536
+ DropdownManager.instance = new DropdownManager();
6537
+ }
6538
+ return DropdownManager.instance;
6539
+ }
6540
+ register(component) {
6541
+ this.activeDropdowns.add(component);
6542
+ }
6543
+ unregister(component) {
6544
+ this.activeDropdowns.delete(component);
6545
+ }
6546
+ openDropdown(targetComponent) {
6547
+ // 다른 모든 드롭다운 닫기
6548
+ this.activeDropdowns.forEach(component => {
6549
+ if (component !== targetComponent && component.isOpen) {
6550
+ component.closeDropdown();
6551
+ }
6552
+ });
6553
+ }
6554
+ closeAllDropdowns() {
6555
+ this.activeDropdowns.forEach(component => {
6556
+ if (component.isOpen) {
6557
+ component.closeDropdown();
6558
+ }
6559
+ });
6560
+ }
6561
+ }
6562
+ const dropdownManager = DropdownManager.getInstance();
6563
+
6564
+ // 여러 select를 동시에 사용할때에 이벤트 리스너의 등록이 충돌나는 문제를 해결하기 위한 Base class
6565
+ // 각 드롭다운 컴포넌트는 이 클래스를 상속 및 구현 필요
6566
+ // 기본적으로 click, keydown 추상 이벤트를 구현해야하고
6567
+ // isOpen가 true일때에만 이벤트 등록 그외에는 이벤트 클리닝을 수행
6568
+ // 추후 필요한 이벤트는 이곳에 추가하여 추가 구현 후 사용
6569
+ // 별도로 드롭다운 전용의 Base class가 아닌 공통적으로 사용할 수 있는 Base class가 필요할지 검토 필요
6570
+ class BaseDropdownEvent {
6571
+ documentClickHandler;
6572
+ documentKeydownHandler;
6573
+ // 컴포넌트 생명주기에서 호출할 메서드들
6574
+ initializeEvent() {
6575
+ dropdownManager.register(this);
6576
+ this.initializeEventHandlers();
6577
+ }
6578
+ cleanupEvent() {
6579
+ dropdownManager.unregister(this);
6580
+ this.cleanup();
6581
+ }
6582
+ initializeEventHandlers() {
6583
+ this.documentClickHandler = (event) => this.handleDocumentClick(event);
6584
+ this.documentKeydownHandler = (event) => this.handleDocumentKeydown(event);
6585
+ }
6586
+ addGlobalEventListeners() {
6587
+ if (this.documentClickHandler) {
6588
+ document.addEventListener('click', this.documentClickHandler);
6589
+ }
6590
+ if (this.documentKeydownHandler) {
6591
+ document.addEventListener('keydown', this.documentKeydownHandler);
6592
+ }
6593
+ }
6594
+ removeGlobalEventListeners() {
6595
+ if (this.documentClickHandler) {
6596
+ document.removeEventListener('click', this.documentClickHandler);
6597
+ }
6598
+ if (this.documentKeydownHandler) {
6599
+ document.removeEventListener('keydown', this.documentKeydownHandler);
6600
+ }
6601
+ }
6602
+ onDropdownToggle(isOpen) {
6603
+ if (isOpen && !this.disabled) {
6604
+ dropdownManager.openDropdown(this);
6605
+ this.addGlobalEventListeners();
6606
+ }
6607
+ else {
6608
+ this.removeGlobalEventListeners();
6609
+ }
6610
+ }
6611
+ cleanup() {
6612
+ this.removeGlobalEventListeners();
6613
+ }
6614
+ closeDropdown() {
6615
+ this.isOpen = false;
6616
+ }
6617
+ }
6618
+
6619
+ const color = {
6620
+ bg: {
6621
+ accent: {
6622
+ "default": "#0075FF"}},
6623
+ text: {
6624
+ secondary: "#333333",
6625
+ inverse: "#FFFFFF"
6626
+ }};
6627
+ var systemTokens = {
6628
+ color: color
6629
+ };
6630
+
6631
+ const UNSUPPORTED_DROPDOWN_BUTTON_NAMES = new Set([
6632
+ 'neutral_xs',
6633
+ 'neutral_sm',
6634
+ 'neutral_md',
6635
+ ]);
6636
+ const DROPDOWN_BUTTON_NAMES = Object.keys(BUTTON_CONFIG).filter((name) => !name.endsWith('_lg') && !UNSUPPORTED_DROPDOWN_BUTTON_NAMES.has(name));
6637
+ const DROPDOWN_BUTTON_CONFIG = Object.fromEntries(DROPDOWN_BUTTON_NAMES.map(name => [name, BUTTON_CONFIG[name]]));
6638
+ const DROPDOWN_BUTTON_MIN_WIDTHS = {
6639
+ xs: buttonTokens.dropdown.xs.minWidth,
6640
+ sm: buttonTokens.dropdown.sm.minWidth,
6641
+ md: buttonTokens.dropdown.md.minWidth,
6642
+ };
6643
+ const PRESET_HOVER_BACKGROUNDS = PRESET_HOVER_BACKGROUNDS$1;
6644
+ const PRESET_CONTENT_COLORS = PRESET_CONTENT_COLORS$1;
6645
+ const PRESET_BORDER_COLORS = PRESET_BORDER_COLORS$1;
6646
+ const PRESET_DIVIDER_COLORS = {
6647
+ primary: buttonTokens.brand.strong.dropdown.divider,
6648
+ secondary: buttonTokens.brand.subtle.dropdown.divider,
6649
+ primary_outline: PRESET_BORDER_COLORS.primary_outline,
6650
+ neutral: buttonTokens.neutral.outline.border,
6651
+ neutral_outline: PRESET_BORDER_COLORS.neutral_outline,
6652
+ danger: buttonTokens.danger.strong.dropdown.divider,
6653
+ danger_outline: PRESET_BORDER_COLORS.danger_outline,
6654
+ };
6655
+ const MENU_ITEM_COLOR = systemTokens.color.text.secondary;
6656
+ const MENU_ITEM_ACTIVE_BACKGROUND = systemTokens.color.bg.accent.default;
6657
+ const MENU_ITEM_ACTIVE_COLOR = systemTokens.color.text.inverse;
6658
+ const PRESET_MENU_ITEM_COLORS = {
6659
+ primary: MENU_ITEM_COLOR,
6660
+ secondary: MENU_ITEM_COLOR,
6661
+ primary_outline: MENU_ITEM_COLOR,
6662
+ neutral: MENU_ITEM_COLOR,
6663
+ neutral_outline: MENU_ITEM_COLOR,
6664
+ danger: MENU_ITEM_COLOR,
6665
+ danger_outline: MENU_ITEM_COLOR,
6666
+ };
6667
+ const PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS = {
6668
+ primary: MENU_ITEM_ACTIVE_BACKGROUND,
6669
+ secondary: MENU_ITEM_ACTIVE_BACKGROUND,
6670
+ primary_outline: MENU_ITEM_ACTIVE_BACKGROUND,
6671
+ neutral: MENU_ITEM_ACTIVE_BACKGROUND,
6672
+ neutral_outline: MENU_ITEM_ACTIVE_BACKGROUND,
6673
+ danger: MENU_ITEM_ACTIVE_BACKGROUND,
6674
+ danger_outline: MENU_ITEM_ACTIVE_BACKGROUND,
6675
+ };
6676
+ const PRESET_MENU_ITEM_ACTIVE_COLORS = {
6677
+ primary: MENU_ITEM_ACTIVE_COLOR,
6678
+ secondary: MENU_ITEM_ACTIVE_COLOR,
6679
+ primary_outline: MENU_ITEM_ACTIVE_COLOR,
6680
+ neutral: MENU_ITEM_ACTIVE_COLOR,
6681
+ neutral_outline: MENU_ITEM_ACTIVE_COLOR,
6682
+ danger: MENU_ITEM_ACTIVE_COLOR,
6683
+ danger_outline: MENU_ITEM_ACTIVE_COLOR,
6684
+ };
6685
+ const DROPDOWN_DISABLED_BACKGROUND = buttonTokens.bg.disabled;
6686
+ const DROPDOWN_DISABLED_CONTENT = buttonTokens.content.disabled;
6687
+ const DROPDOWN_DISABLED_BORDER = buttonTokens.border.disabled;
6688
+ const isDropdownButtonName = (value) => value in DROPDOWN_BUTTON_CONFIG;
6689
+ const getDropdownButtonPreset = (value) => getPresetName(value);
6690
+
6691
+ 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}`;
6692
+
6693
+ class SdDropdownButton extends BaseDropdownEvent {
6694
+ constructor(hostRef) {
6695
+ super();
6696
+ registerInstance(this, hostRef);
6697
+ this.click = createEvent(this, "sdClick");
6698
+ this.dropDownShow = createEvent(this, "sdDropDownShow");
6699
+ }
6700
+ get el() { return getElement(this); }
6701
+ name = 'primary_sm';
6702
+ label = '';
6703
+ items = [];
6704
+ disabled = false;
6705
+ isOpen = false;
6706
+ itemIndex = -1;
6707
+ triggerRef;
6708
+ menuRef;
6709
+ click;
6710
+ dropDownShow;
6711
+ handleOpenChange(isOpen) {
6712
+ this.onDropdownToggle(isOpen);
6713
+ this.dropDownShow.emit({ isOpen });
6714
+ if (!isOpen) {
6715
+ this.itemIndex = -1;
6716
+ }
6717
+ }
6718
+ componentWillLoad() {
6719
+ this.initializeEvent();
6720
+ }
6721
+ disconnectedCallback() {
6722
+ this.cleanupEvent();
6723
+ }
6724
+ async sdOpen() {
6725
+ if (this.disabled || this.items.length === 0)
6726
+ return;
6727
+ this.isOpen = true;
6728
+ }
6729
+ async sdClose() {
6730
+ this.closeDropdown();
6731
+ }
6732
+ closeDropdown = () => {
6733
+ this.isOpen = false;
6734
+ };
6735
+ handleDocumentClick(event) {
6736
+ const target = event.target;
6737
+ if (!target)
6738
+ return;
6739
+ if (this.el.contains(target))
6740
+ return;
6741
+ if (this.menuRef?.contains(target))
6742
+ return;
6743
+ this.closeDropdown();
6744
+ }
6745
+ handleDocumentKeydown(event) {
6746
+ if (!this.isOpen)
6747
+ return;
6748
+ const targetKeys = ['ArrowDown', 'ArrowUp', 'Enter', 'Escape'];
6749
+ if (!targetKeys.includes(event.key))
6750
+ return;
6751
+ event.preventDefault();
6752
+ event.stopPropagation();
6753
+ switch (event.key) {
6754
+ case 'ArrowDown':
6755
+ this.itemIndex = this.getNextEnabledIndex(1);
6756
+ break;
6757
+ case 'ArrowUp':
6758
+ this.itemIndex = this.getNextEnabledIndex(-1);
6759
+ break;
6760
+ case 'Enter':
6761
+ if (this.itemIndex < 0)
6762
+ return;
6763
+ this.selectItem(this.items[this.itemIndex]);
6764
+ break;
6765
+ case 'Escape':
6766
+ this.closeDropdown();
6767
+ break;
6768
+ }
6769
+ }
6770
+ get resolvedConfig() {
6771
+ if (!isDropdownButtonName(this.name)) {
6772
+ throw new Error(`Invalid sd-dropdown-button name: ${this.name}`);
6773
+ }
6774
+ const config = DROPDOWN_BUTTON_CONFIG[this.name];
6775
+ const preset = getDropdownButtonPreset(this.name);
6776
+ return {
6777
+ config,
6778
+ preset,
6779
+ };
6780
+ }
6781
+ getNextEnabledIndex(direction) {
6782
+ const enabledIndices = this.items.reduce((acc, item, index) => {
6783
+ if (!item.disabled) {
6784
+ acc.push(index);
6785
+ }
6786
+ return acc;
6787
+ }, []);
6788
+ if (enabledIndices.length === 0) {
6789
+ return -1;
6790
+ }
6791
+ const currentPosition = enabledIndices.indexOf(this.itemIndex);
6792
+ if (currentPosition === -1) {
6793
+ return direction === 1 ? enabledIndices[0] : enabledIndices[enabledIndices.length - 1];
6794
+ }
6795
+ const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length;
6796
+ return enabledIndices[nextPosition];
6797
+ }
6798
+ toggleDropdown = (event) => {
6799
+ event.stopPropagation();
6800
+ if (this.disabled || this.items.length === 0) {
6801
+ return;
6802
+ }
6803
+ this.isOpen = !this.isOpen;
6804
+ };
6805
+ selectItem(item, event) {
6806
+ event?.stopPropagation();
6807
+ if (!item || item.disabled) {
6808
+ return;
6809
+ }
6810
+ this.click.emit(item.value);
6811
+ this.closeDropdown();
6812
+ }
6813
+ getTriggerClasses(preset, size, disabled, isOpen) {
6814
+ const classes = [
6815
+ 'sd-dropdown-button__trigger',
6816
+ `sd-dropdown-button__trigger--${preset}`,
6817
+ `sd-dropdown-button__trigger--${size}`,
6818
+ ];
6819
+ if (disabled) {
6820
+ classes.push('sd-dropdown-button__trigger--disabled');
6821
+ }
6822
+ if (isOpen) {
6823
+ classes.push('sd-dropdown-button__trigger--open');
6824
+ }
6825
+ return classes.join(' ');
6826
+ }
6827
+ getMenuItemClasses(isActive, isDisabled) {
6828
+ const classes = ['sd-dropdown-button__menu-item'];
6829
+ if (isActive) {
6830
+ classes.push('sd-dropdown-button__menu-item--active');
6831
+ }
6832
+ if (isDisabled) {
6833
+ classes.push('sd-dropdown-button__menu-item--disabled');
6834
+ }
6835
+ return classes.join(' ');
6836
+ }
6837
+ renderDropdown(preset) {
6838
+ if (!this.isOpen || !this.triggerRef)
6839
+ return null;
6840
+ 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: {
6841
+ '--sd-dropdown-button-menu-item-color': PRESET_MENU_ITEM_COLORS[preset],
6842
+ '--sd-dropdown-button-menu-item-active-bg': PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS[preset],
6843
+ '--sd-dropdown-button-menu-item-active-color': PRESET_MENU_ITEM_ACTIVE_COLORS[preset],
6844
+ '--sd-dropdown-button-menu-border': PRESET_BORDER_COLORS[preset] === 'transparent'
6845
+ ? PRESET_DIVIDER_COLORS[preset]
6846
+ : PRESET_BORDER_COLORS[preset],
6847
+ } }, this.items.map((item, index) => {
6848
+ const isActive = this.itemIndex === index && !item.disabled;
6849
+ const iconColor = item.disabled
6850
+ ? DROPDOWN_DISABLED_CONTENT
6851
+ : isActive
6852
+ ? PRESET_MENU_ITEM_ACTIVE_COLORS[preset]
6853
+ : PRESET_MENU_ITEM_COLORS[preset];
6854
+ return (hAsync("button", { type: "button", role: "menuitem", class: this.getMenuItemClasses(isActive, Boolean(item.disabled)), disabled: item.disabled, onClick: event => this.selectItem(item, event), onMouseEnter: () => {
6855
+ if (!item.disabled) {
6856
+ this.itemIndex = index;
6857
+ }
6858
+ } }, 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 })));
6859
+ }))));
6860
+ }
6861
+ render() {
6862
+ const { config, preset } = this.resolvedConfig;
6863
+ const chevronColor = this.disabled ? DROPDOWN_DISABLED_CONTENT : PRESET_CONTENT_COLORS[preset];
6864
+ 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: {
6865
+ '--sd-dropdown-button-min-width': `${DROPDOWN_BUTTON_MIN_WIDTHS[config.size]}px`,
6866
+ '--sd-dropdown-button-bg': config.color,
6867
+ '--sd-dropdown-button-bg-hover': PRESET_HOVER_BACKGROUNDS[preset],
6868
+ '--sd-dropdown-button-border': PRESET_BORDER_COLORS[preset],
6869
+ '--sd-dropdown-button-content': PRESET_CONTENT_COLORS[preset],
6870
+ '--sd-dropdown-button-divider': PRESET_DIVIDER_COLORS[preset],
6871
+ '--sd-dropdown-button-accent': BUTTON_FOCUS_RING_COLOR,
6872
+ '--sd-dropdown-button-disabled-bg': DROPDOWN_DISABLED_BACKGROUND,
6873
+ '--sd-dropdown-button-disabled-content': DROPDOWN_DISABLED_CONTENT,
6874
+ '--sd-dropdown-button-disabled-border': DROPDOWN_DISABLED_BORDER,
6875
+ } }, 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)));
6876
+ }
6877
+ static get watchers() { return {
6878
+ "isOpen": [{
6879
+ "handleOpenChange": 0
6880
+ }]
6881
+ }; }
6882
+ static get style() { return sdDropdownButtonCss(); }
6883
+ static get cmpMeta() { return {
6884
+ "$flags$": 512,
6885
+ "$tagName$": "sd-dropdown-button",
6886
+ "$members$": {
6887
+ "name": [1],
6888
+ "label": [1],
6889
+ "items": [16],
6890
+ "disabled": [4],
6891
+ "isOpen": [32],
6892
+ "itemIndex": [32],
6893
+ "sdOpen": [64],
6894
+ "sdClose": [64]
6895
+ },
6896
+ "$listeners$": undefined,
6897
+ "$lazyBundleId$": "-",
6898
+ "$attrsToReflect$": []
6899
+ }; }
6900
+ }
6901
+
6152
6902
  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}`;
6153
6903
 
6154
6904
  const FORM_PARENT_TAGS = [
@@ -6269,15 +7019,15 @@ class SdField {
6269
7019
  }
6270
7020
  }
6271
7021
  render() {
6272
- return (hAsync("div", { key: '3c69abe493110b5665795706a9ae0e525f213aca', class: {
7022
+ return (hAsync("div", { key: '83d20191373b759f18d25e25330ead65217dea4f', class: {
6273
7023
  'sd-field': true,
6274
7024
  'sd-field--has-label': !!this.label,
6275
7025
  'sd-field--has-label-inside': !!this.label && this.insideLabel,
6276
7026
  [this.fieldStatus]: !!this.fieldStatus,
6277
- } }, hAsync("div", { key: 'decc6821b7172f5ecc2343472014c08674725904', class: "sd-field__wrapper" }, this.renderLabel(this.label), hAsync("div", { key: 'ca5e93f049db10ecaaaab091fdf394ac4b55e292', class: {
7027
+ } }, hAsync("div", { key: '2f04e19997c077c32843173c85dc04840f8fa0f6', class: "sd-field__wrapper" }, this.renderLabel(this.label), hAsync("div", { key: 'c7fa5c334cd4dc0b99919850b3059a35a77ea5c6', class: {
6278
7028
  'sd-field__control': true,
6279
7029
  'sd-field__control--label-inside ': !!this.label && this.insideLabel,
6280
- } }, hAsync("slot", { key: '7ee38983d32985f4b4a035830bcdca0e14b2cf71' }))), this.errorMsg && hAsync("div", { key: 'c2d6ef860ced48657b906806f2618594b094ea79', class: "sd-field__error-message" }, this.errorMsg)));
7030
+ } }, hAsync("slot", { key: '15f7bd40ca6ed1667f97f6362be914e203c491af' }))), this.errorMsg && hAsync("div", { key: 'd940bca4d3074e8051bc5392aad36be4c58f88af', class: "sd-field__error-message" }, this.errorMsg)));
6281
7031
  }
6282
7032
  renderLabel(label) {
6283
7033
  if (!label)
@@ -6411,15 +7161,15 @@ class SdFilePicker {
6411
7161
  render() {
6412
7162
  const hasFiles = this.hasFiles();
6413
7163
  const displayText = this.getDisplayText();
6414
- return (hAsync("div", { key: '659ab6f0e1fedadfbef1838def391aab28ae6e62', class: {
7164
+ return (hAsync("div", { key: 'dfdb1f7cc4793c23cfb1ae97464981833263421e', class: {
6415
7165
  'sd-file-picker': true,
6416
7166
  [this.getStatusClass()]: true,
6417
7167
  'sd-file-picker--inline': this.inline,
6418
- }, 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: {
7168
+ }, 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: {
6419
7169
  'sd-file-picker__text': true,
6420
7170
  'sd-file-picker__text--placeholder': !hasFiles,
6421
7171
  'sd-file-picker__text--active': hasFiles,
6422
- } }, 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))));
7172
+ } }, 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))));
6423
7173
  }
6424
7174
  static get watchers() { return {
6425
7175
  "value": [{
@@ -6598,7 +7348,7 @@ class SdFloatingPopover {
6598
7348
  this.close.emit();
6599
7349
  }
6600
7350
  render() {
6601
- return hAsync("slot", { key: '2f33d335a7cf00ace576aed610a0e77d711a5b10' });
7351
+ return hAsync("slot", { key: 'd8bdd90d00b52153d1144bbea871ace4888e37e4' });
6602
7352
  }
6603
7353
  static get style() { return sdFloatingPortalCss(); }
6604
7354
  static get cmpMeta() { return {
@@ -6755,9 +7505,9 @@ class SdGuide {
6755
7505
  };
6756
7506
  render() {
6757
7507
  const { name: iconName, size: iconSize, color: iconColor } = GUIDE_ICON[this.type];
6758
- return (hAsync("div", { key: '2a7d3d040d3fbe7d0c22afc62d67a848fbae67d9', class: "sd-guide", style: {
7508
+ return (hAsync("div", { key: '3e6914fc5c99e8f95d5ed613ddd61271bc4e91f9', class: "sd-guide", style: {
6759
7509
  '--sd-guide-color': GUIDE_ICON[this.type].color,
6760
- } }, 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))))))));
7510
+ } }, 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))))))));
6761
7511
  }
6762
7512
  // 현재 2depth까지만 스타일 적용
6763
7513
  renderListItem(message, depth = 0) {
@@ -8802,7 +9552,7 @@ class SdIcon {
8802
9552
  }
8803
9553
  render() {
8804
9554
  const IconComponent = Icons[this.name]?.[this.size];
8805
- return (hAsync("i", { key: '1d6a48769c99bbfe9576016e24766b8c82ab570e', class: this.getIconClasses(), style: this.iconStyle }, hAsync(IconComponent, { key: '3fdb4195ef13656e79b402a4eae2fb0210fb3a97', color: this.resolvedColor })));
9555
+ return (hAsync("i", { key: '2c1ef942e674d6dc85911f9a87c6859e0e86a706', class: this.getIconClasses(), style: this.iconStyle }, hAsync(IconComponent, { key: 'fa1bc7cd1cf4dc5ec2565f5bbfe65e8137673204', color: this.resolvedColor })));
8806
9556
  }
8807
9557
  static get style() { return sdIconCss(); }
8808
9558
  static get cmpMeta() { return {
@@ -8927,7 +9677,7 @@ class SdInput {
8927
9677
  }
8928
9678
  };
8929
9679
  render() {
8930
- 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 () => {
9680
+ 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 () => {
8931
9681
  this.internalValue = '';
8932
9682
  await this.formField?.sdValidate();
8933
9683
  } })))));
@@ -8990,7 +9740,7 @@ class SdLoadingSpinner {
8990
9740
  return resolveColor(this.color);
8991
9741
  }
8992
9742
  render() {
8993
- 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" }))));
9743
+ 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" }))));
8994
9744
  }
8995
9745
  static get style() { return sdLoadingSpinnerCss(); }
8996
9746
  static get cmpMeta() { return {
@@ -9312,17 +10062,17 @@ class SdNumberInput {
9312
10062
  const inputStyles = {
9313
10063
  textAlign: this.useButton ? 'center' : 'right',
9314
10064
  };
9315
- 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: {
10065
+ 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: {
9316
10066
  'sd-number-input': true,
9317
10067
  [this.getInputStatus()]: true,
9318
10068
  'sd-number-input--with-buttons': this.useButton,
9319
- }, 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: {
10069
+ }, 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: {
9320
10070
  'sd-number-input__button': true,
9321
10071
  'sd-number-input__button--decrement': true,
9322
- }, 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: {
10072
+ }, 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: {
9323
10073
  'sd-number-input__button': true,
9324
10074
  'sd-number-input__button--increment': true,
9325
- }, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: 'b945a1561978dc4bba1868fa57652e94a6bcfc34', name: "add", size: 12, color: this.isIncrementDisabled() ? 'grey_45' : 'brilliantblue_70' })))))));
10075
+ }, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: '6677d8b46b123e5534bfa8b2fcb45276d9b70782', name: "add", size: 12, color: this.isIncrementDisabled() ? 'grey_45' : 'brilliantblue_70' })))))));
9326
10076
  }
9327
10077
  static get watchers() { return {
9328
10078
  "value": [{
@@ -9446,12 +10196,12 @@ class SdPagination {
9446
10196
  }
9447
10197
  }
9448
10198
  render() {
9449
- 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: {
10199
+ 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: {
9450
10200
  'pagination-btn': true,
9451
10201
  'pagination-btn--selected': this.currentPage === n,
9452
10202
  }, disabled: this.currentPage === n, style: {
9453
10203
  '--pagination-btn-width': `${this.buttonWidth}px`,
9454
- }, onClick: () => this.handlePageChange(n) }, n)))), hAsync("div", { key: '2be11ae773c0bce71ecaf53f99daff3f5b2d567d', class: "append-btns" }, this.renderNextButtons())));
10204
+ }, onClick: () => this.handlePageChange(n) }, n)))), hAsync("div", { key: 'e596b6a182e22ae4a8e95d5babb548d3bfba373d', class: "append-btns" }, this.renderNextButtons())));
9455
10205
  }
9456
10206
  static get style() { return sdPaginationCss(); }
9457
10207
  static get cmpMeta() { return {
@@ -9505,11 +10255,11 @@ class SdPopover {
9505
10255
  this.showPopover = false;
9506
10256
  };
9507
10257
  render() {
9508
- 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: {
10258
+ 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: {
9509
10259
  'sd-floating-menu': true,
9510
10260
  [`sd-floating-menu--${this.placement}`]: true,
9511
10261
  [this.menuClass]: !!this.menuClass,
9512
- } }, 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" }))))))));
10262
+ } }, 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" }))))))));
9513
10263
  }
9514
10264
  static get watchers() { return {
9515
10265
  "show": [{
@@ -9560,25 +10310,31 @@ class SdPortal {
9560
10310
  wrapper;
9561
10311
  rafId;
9562
10312
  isInsideClick = false;
10313
+ handleObservedScroll = () => this.updatePosition();
9563
10314
  resizeObserver;
9564
10315
  mutationObserver;
10316
+ scrollParents = [];
10317
+ isObserved = false;
10318
+ handleOpenChange() {
10319
+ this.syncPortalState();
10320
+ }
9565
10321
  componentDidLoad() {
9566
10322
  this.container = this.resolveContainer();
9567
- this.createWrapper();
9568
- this.moveSlotContent();
9569
- this.updatePosition();
9570
- this.observeParent();
10323
+ this.syncPortalState();
9571
10324
  }
9572
10325
  componentDidRender() {
9573
- if (!this.wrapper)
9574
- return;
9575
- this.wrapper.style.display = this.open ? 'block' : 'none';
9576
- if (this.open)
9577
- this.updatePosition();
10326
+ this.syncPortalState();
9578
10327
  }
9579
10328
  disconnectedCallback() {
9580
10329
  this.unobserveParent();
9581
- this.wrapper?.remove();
10330
+ if (this.wrapper?.parentNode) {
10331
+ try {
10332
+ this.wrapper.parentNode.removeChild(this.wrapper);
10333
+ }
10334
+ catch {
10335
+ // Stencil spec mock DOM can already detach the wrapper before this callback runs.
10336
+ }
10337
+ }
9582
10338
  }
9583
10339
  resolveContainer() {
9584
10340
  const el = typeof this.to === 'string' ? document.querySelector(this.to) : this.to;
@@ -9593,6 +10349,26 @@ class SdPortal {
9593
10349
  });
9594
10350
  this.container.appendChild(this.wrapper);
9595
10351
  }
10352
+ ensureWrapper() {
10353
+ if (this.wrapper)
10354
+ return;
10355
+ this.container ||= this.resolveContainer();
10356
+ this.createWrapper();
10357
+ this.moveSlotContent();
10358
+ }
10359
+ syncPortalState() {
10360
+ if (!this.open) {
10361
+ this.wrapper && (this.wrapper.style.display = 'none');
10362
+ this.unobserveParent();
10363
+ return;
10364
+ }
10365
+ this.ensureWrapper();
10366
+ if (!this.wrapper)
10367
+ return;
10368
+ this.wrapper.style.display = 'block';
10369
+ this.observeParent();
10370
+ this.updatePosition();
10371
+ }
9596
10372
  moveSlotContent() {
9597
10373
  if (!this.wrapper)
9598
10374
  return;
@@ -9634,19 +10410,57 @@ class SdPortal {
9634
10410
  }
9635
10411
  // parentRef의 이동 / 크기변경 감지
9636
10412
  observeParent() {
9637
- if (!this.parentRef)
10413
+ if (!this.parentRef || this.isObserved)
9638
10414
  return;
9639
- this.resizeObserver = new ResizeObserver(() => this.updatePosition());
9640
- this.resizeObserver.observe(this.parentRef);
9641
- this.mutationObserver = new MutationObserver(() => this.updatePosition());
9642
- this.mutationObserver.observe(document.body, {
9643
- childList: true,
9644
- subtree: true,
9645
- });
10415
+ this.observeScrollParents(this.parentRef);
10416
+ if (typeof ResizeObserver !== 'undefined') {
10417
+ this.resizeObserver = new ResizeObserver(() => this.updatePosition());
10418
+ this.resizeObserver.observe(this.parentRef);
10419
+ }
10420
+ if (typeof MutationObserver !== 'undefined') {
10421
+ this.mutationObserver = new MutationObserver(() => this.updatePosition());
10422
+ this.mutationObserver.observe(document.body, {
10423
+ childList: true,
10424
+ subtree: true,
10425
+ });
10426
+ }
10427
+ this.isObserved = true;
9646
10428
  }
9647
10429
  unobserveParent() {
10430
+ if (!this.isObserved)
10431
+ return;
10432
+ this.unobserveScrollParents();
9648
10433
  this.resizeObserver?.disconnect();
10434
+ this.resizeObserver = undefined;
9649
10435
  this.mutationObserver?.disconnect();
10436
+ this.mutationObserver = undefined;
10437
+ this.isObserved = false;
10438
+ }
10439
+ observeScrollParents(element) {
10440
+ const nextScrollParents = this.getScrollParents(element);
10441
+ nextScrollParents.forEach(parent => {
10442
+ parent.addEventListener('scroll', this.handleObservedScroll, { passive: true });
10443
+ });
10444
+ this.scrollParents = nextScrollParents;
10445
+ }
10446
+ unobserveScrollParents() {
10447
+ this.scrollParents.forEach(parent => {
10448
+ parent.removeEventListener('scroll', this.handleObservedScroll);
10449
+ });
10450
+ this.scrollParents = [];
10451
+ }
10452
+ getScrollParents(element) {
10453
+ const scrollParents = [];
10454
+ let currentElement = element.parentElement;
10455
+ while (currentElement) {
10456
+ const { overflow, overflowX, overflowY } = getComputedStyle(currentElement);
10457
+ const isScrollable = [overflow, overflowX, overflowY].some(value => /(auto|scroll|overlay)/.test(value));
10458
+ if (isScrollable) {
10459
+ scrollParents.push(currentElement);
10460
+ }
10461
+ currentElement = currentElement.parentElement;
10462
+ }
10463
+ return scrollParents;
9650
10464
  }
9651
10465
  // 외부 클릭 감지
9652
10466
  handleMouseDown(e) {
@@ -9662,8 +10476,13 @@ class SdPortal {
9662
10476
  this.close.emit();
9663
10477
  }
9664
10478
  render() {
9665
- return hAsync("slot", { key: 'ba2bf5df16f9bef0acef1ac8a08b090a23d02bc7' });
10479
+ return hAsync("slot", { key: 'be76727404b0172e1049ae572acf4eacd4ea4a25' });
9666
10480
  }
10481
+ static get watchers() { return {
10482
+ "open": [{
10483
+ "handleOpenChange": 0
10484
+ }]
10485
+ }; }
9667
10486
  static get cmpMeta() { return {
9668
10487
  "$flags$": 772,
9669
10488
  "$tagName$": "sd-portal",
@@ -9719,10 +10538,10 @@ class SdProgress {
9719
10538
  return this.statusColor[this.progressStatus];
9720
10539
  }
9721
10540
  render() {
9722
- return (hAsync("div", { key: '43da9dac67e760bfe53b8db11c27eef7ef0d8b3b', style: {
10541
+ return (hAsync("div", { key: 'a11cc2a22ad1628d63882ca1e5f7f1e3715ba719', style: {
9723
10542
  '--progress-color': this.progressColor,
9724
10543
  '--progress-percentage': `${this.progressPercentage}%`,
9725
- } }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && hAsync("div", { key: 'af4b1c44f655546fede8ad548bddc6afb7810d2b', class: "sd-progress__label" }, this.label)));
10544
+ } }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && hAsync("div", { key: 'dbc62a8fa4039127356f8b734482e1d0eb26c22b', class: "sd-progress__label" }, this.label)));
9726
10545
  }
9727
10546
  renderBarProgress() {
9728
10547
  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, "%")));
@@ -9920,94 +10739,6 @@ class SdRadioGroup {
9920
10739
  }; }
9921
10740
  }
9922
10741
 
9923
- class DropdownManager {
9924
- static instance;
9925
- activeDropdowns = new Set();
9926
- static getInstance() {
9927
- if (!DropdownManager.instance) {
9928
- DropdownManager.instance = new DropdownManager();
9929
- }
9930
- return DropdownManager.instance;
9931
- }
9932
- register(component) {
9933
- this.activeDropdowns.add(component);
9934
- }
9935
- unregister(component) {
9936
- this.activeDropdowns.delete(component);
9937
- }
9938
- openDropdown(targetComponent) {
9939
- // 다른 모든 드롭다운 닫기
9940
- this.activeDropdowns.forEach(component => {
9941
- if (component !== targetComponent && component.isOpen) {
9942
- component.closeDropdown();
9943
- }
9944
- });
9945
- }
9946
- closeAllDropdowns() {
9947
- this.activeDropdowns.forEach(component => {
9948
- if (component.isOpen) {
9949
- component.closeDropdown();
9950
- }
9951
- });
9952
- }
9953
- }
9954
- const dropdownManager = DropdownManager.getInstance();
9955
-
9956
- // 여러 select를 동시에 사용할때에 이벤트 리스너의 등록이 충돌나는 문제를 해결하기 위한 Base class
9957
- // 각 드롭다운 컴포넌트는 이 클래스를 상속 및 구현 필요
9958
- // 기본적으로 click, keydown 추상 이벤트를 구현해야하고
9959
- // isOpen가 true일때에만 이벤트 등록 그외에는 이벤트 클리닝을 수행
9960
- // 추후 필요한 이벤트는 이곳에 추가하여 추가 구현 후 사용
9961
- // 별도로 드롭다운 전용의 Base class가 아닌 공통적으로 사용할 수 있는 Base class가 필요할지 검토 필요
9962
- class BaseDropdownEvent {
9963
- documentClickHandler;
9964
- documentKeydownHandler;
9965
- // 컴포넌트 생명주기에서 호출할 메서드들
9966
- initializeEvent() {
9967
- dropdownManager.register(this);
9968
- this.initializeEventHandlers();
9969
- }
9970
- cleanupEvent() {
9971
- dropdownManager.unregister(this);
9972
- this.cleanup();
9973
- }
9974
- initializeEventHandlers() {
9975
- this.documentClickHandler = (event) => this.handleDocumentClick(event);
9976
- this.documentKeydownHandler = (event) => this.handleDocumentKeydown(event);
9977
- }
9978
- addGlobalEventListeners() {
9979
- if (this.documentClickHandler) {
9980
- document.addEventListener('click', this.documentClickHandler);
9981
- }
9982
- if (this.documentKeydownHandler) {
9983
- document.addEventListener('keydown', this.documentKeydownHandler);
9984
- }
9985
- }
9986
- removeGlobalEventListeners() {
9987
- if (this.documentClickHandler) {
9988
- document.removeEventListener('click', this.documentClickHandler);
9989
- }
9990
- if (this.documentKeydownHandler) {
9991
- document.removeEventListener('keydown', this.documentKeydownHandler);
9992
- }
9993
- }
9994
- onDropdownToggle(isOpen) {
9995
- if (isOpen && !this.disabled) {
9996
- dropdownManager.openDropdown(this);
9997
- this.addGlobalEventListeners();
9998
- }
9999
- else {
10000
- this.removeGlobalEventListeners();
10001
- }
10002
- }
10003
- cleanup() {
10004
- this.removeGlobalEventListeners();
10005
- }
10006
- closeDropdown() {
10007
- this.isOpen = false;
10008
- }
10009
- }
10010
-
10011
10742
  class SelectKeyboardNavigation {
10012
10743
  isSearchable;
10013
10744
  filteredOptions;
@@ -10389,10 +11120,10 @@ class SdSelectDropdown {
10389
11120
  this.isScrolled = scrollTop > 0;
10390
11121
  };
10391
11122
  render() {
10392
- return (hAsync("div", { key: 'ff55e2e133114accc2641a0025bdcf551eda3511', class: {
11123
+ return (hAsync("div", { key: 'd69eabae6b1769212fb4755413de8e54ede8a213', class: {
10393
11124
  'sd-select-dropdown': true,
10394
11125
  'sd-select-dropdown--ready': this.isDropdownReady,
10395
- }, 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)))));
11126
+ }, 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)))));
10396
11127
  }
10397
11128
  static get watchers() { return {
10398
11129
  "filteredOptions": [{
@@ -10578,7 +11309,7 @@ class SdSelectMultiple extends BaseDropdownEvent {
10578
11309
  this.handleOptionSelection(option);
10579
11310
  };
10580
11311
  render() {
10581
- 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: {
11312
+ 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: {
10582
11313
  'sd-select-multiple': true,
10583
11314
  'sd-select-multiple--open': this.isOpen,
10584
11315
  'sd-select-multiple--disabled': this.disabled,
@@ -11171,7 +11902,7 @@ class SdSelectOption {
11171
11902
  }
11172
11903
  };
11173
11904
  render() {
11174
- return (hAsync("div", { key: 'a4fcca24b0bdde4f4665585c6cede84bd3b64d59', class: {
11905
+ return (hAsync("div", { key: 'b9844296973b6e85d3c3e3652671e89f470ec7a9', class: {
11175
11906
  'sd-select__option': true,
11176
11907
  'sd-select__option--selected': this.isSelected,
11177
11908
  'sd-select__option--disabled': !!this.option.disabled,
@@ -11257,7 +11988,7 @@ class SdSelectOptionGroup {
11257
11988
  }
11258
11989
  };
11259
11990
  render() {
11260
- return (hAsync("div", { key: '8e88aacd2c3122a563fcf78bcbe9731b6a29d8c5', class: {
11991
+ return (hAsync("div", { key: '70ab9a558faf068cfc4eb0a5f6a29453ceedc6ec', class: {
11261
11992
  'sd-select__option-group': true,
11262
11993
  'sd-select__option-group--selected': !!this.isSelected,
11263
11994
  'sd-select__option-group--disabled': !!this.option.disabled,
@@ -11266,10 +11997,10 @@ class SdSelectOptionGroup {
11266
11997
  'sd-select__option-group--group': this.option.type === 'group',
11267
11998
  'sd-select__option-group--subgroup': this.option.type === 'subgroup',
11268
11999
  'sd-select__option-group--item': this.option.type === 'item',
11269
- }, 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 => {
12000
+ }, 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 => {
11270
12001
  e.preventDefault();
11271
12002
  this.handleClick(this.option, this.isSelected, e);
11272
- } })), 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})`)))));
12003
+ } })), 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})`)))));
11273
12004
  }
11274
12005
  static get style() { return sdSelectOptionGroupCss(); }
11275
12006
  static get cmpMeta() { return {
@@ -11318,17 +12049,17 @@ class SdSelectSearchInput {
11318
12049
  input?.focus({ preventScroll: true });
11319
12050
  }
11320
12051
  render() {
11321
- return (hAsync("div", { key: 'b19a029ef82d876c984c1f827d7a0f29bb823f5d', class: {
12052
+ return (hAsync("div", { key: '2d211645dc4041411e187f248a260a23b7c544f6', class: {
11322
12053
  'sd-select-search-input': true,
11323
12054
  'sd-select-search-input--scrolled': !!this.isScrolled,
11324
- }, 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 => {
12055
+ }, 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 => {
11325
12056
  this.searchInput.emit(String(event?.detail));
11326
12057
  }, onSdFocus: () => {
11327
12058
  this.searchFocus.emit();
11328
12059
  }, onKeyDown: event => {
11329
12060
  if (event.code === 'Enter')
11330
12061
  event.stopPropagation();
11331
- } }, hAsync("sd-icon", { key: '2b38a07cbc0bb0d7dd020ece45f18bdff4c262e5', name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" }))));
12062
+ } }, hAsync("sd-icon", { key: '96a511b1f8625c883ec50d5e2985ff396d7b57c7', name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" }))));
11332
12063
  }
11333
12064
  static get style() { return sdSelectSearchInputCss(); }
11334
12065
  static get cmpMeta() { return {
@@ -12423,10 +13154,10 @@ class SdTextarea {
12423
13154
  }
12424
13155
  render() {
12425
13156
  const maxLengthCounter = this.getMaxLengthCounter();
12426
- return (hAsync("div", { key: '888d11be57629e83e1215daddab63351a323672f', class: {
13157
+ return (hAsync("div", { key: 'd538d3ab99c174f1fedc92c547fcba61d1097608', class: {
12427
13158
  'sd-textarea': true,
12428
13159
  [this.getTextareaStatus()]: true,
12429
- }, 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)))));
13160
+ }, 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)))));
12430
13161
  }
12431
13162
  static get watchers() { return {
12432
13163
  "value": [{
@@ -12567,7 +13298,7 @@ class SdToggle {
12567
13298
  this.change.emit(newValue);
12568
13299
  };
12569
13300
  render() {
12570
- 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" }))));
13301
+ 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" }))));
12571
13302
  }
12572
13303
  static get style() { return sdToggleCss(); }
12573
13304
  static get cmpMeta() { return {
@@ -12623,7 +13354,7 @@ class SdToggleButton {
12623
13354
  this.change.emit(newValue);
12624
13355
  };
12625
13356
  render() {
12626
- 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 })));
13357
+ 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 })));
12627
13358
  }
12628
13359
  static get style() { return sdToggleButtonCss(); }
12629
13360
  static get cmpMeta() { return {
@@ -12723,11 +13454,13 @@ class SdTooltip {
12723
13454
  registerComponents([
12724
13455
  SdBadge,
12725
13456
  SdButton,
13457
+ SdButtonV2,
12726
13458
  SdCard,
12727
13459
  SdCheckbox,
12728
13460
  SdDateBox,
12729
13461
  SdDatePicker,
12730
13462
  SdDateRangePicker,
13463
+ SdDropdownButton,
12731
13464
  SdField,
12732
13465
  SdFilePicker,
12733
13466
  SdFloatingPopover,