@sellmate/design-system 0.0.53 → 0.0.54

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 (118) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{sd-button_21.cjs.entry.js → sd-button_23.cjs.entry.js} +591 -80
  4. package/dist/cjs/sd-popover.cjs.entry.js +2 -2
  5. package/dist/cjs/sd-progress.cjs.entry.js +2 -2
  6. package/dist/cjs/sd-select-multiple.cjs.entry.js +266 -0
  7. package/dist/cjs/sd-tbody_3.cjs.entry.js +3 -3
  8. package/dist/cjs/sd-td.cjs.entry.js +2 -2
  9. package/dist/collection/collection-manifest.json +1 -0
  10. package/dist/collection/components/sd-number-input/sd-number-input.css +128 -0
  11. package/dist/collection/components/sd-number-input/sd-number-input.js +744 -0
  12. package/dist/collection/components/sd-number-input/sd-number-input.js.map +1 -0
  13. package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
  14. package/dist/collection/components/sd-popover/sd-popover.js +2 -2
  15. package/dist/collection/components/sd-portal/sd-portal.js +1 -1
  16. package/dist/collection/components/sd-progress/sd-progress.js +2 -2
  17. package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
  18. package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +2 -2
  19. package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.css +5 -0
  20. package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +91 -42
  21. package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js.map +1 -1
  22. package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
  23. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +1 -1
  24. package/dist/collection/components/sd-table/sd-td/sd-td.js +2 -2
  25. package/dist/collection/components/sd-table/sd-th/sd-th.js +1 -1
  26. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +1 -1
  27. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  28. package/dist/collection/components/sd-toggle-button/sd-toggle-button.js +1 -1
  29. package/dist/collection/components/sd-tooltip/sd-tooltip.js +4 -4
  30. package/dist/collection/components/sd-tooltip-portal/sd-tooltip-portal.js +1 -1
  31. package/dist/components/{p-CYadUxId.js → p-BBNolp5g.js} +3 -3
  32. package/dist/components/{p-CYadUxId.js.map → p-BBNolp5g.js.map} +1 -1
  33. package/dist/components/{p-71Aop19u.js → p-BH3t01Im.js} +5 -5
  34. package/dist/components/{p-71Aop19u.js.map → p-BH3t01Im.js.map} +1 -1
  35. package/dist/components/{p-Be8w5kOo.js → p-BqxmCDlz.js} +7 -7
  36. package/dist/components/{p-Be8w5kOo.js.map → p-BqxmCDlz.js.map} +1 -1
  37. package/dist/components/{p-B13lOU0D.js → p-C5T02a4h.js} +4 -4
  38. package/dist/components/{p-B13lOU0D.js.map → p-C5T02a4h.js.map} +1 -1
  39. package/dist/components/{p-Cf-LyLYk.js → p-CEDtmtIo.js} +3 -3
  40. package/dist/components/{p-Cf-LyLYk.js.map → p-CEDtmtIo.js.map} +1 -1
  41. package/dist/components/{p-DP33nj_I.js → p-Cx3euWvk.js} +3 -3
  42. package/dist/components/{p-DP33nj_I.js.map → p-Cx3euWvk.js.map} +1 -1
  43. package/dist/components/{p-ChQIkICO.js → p-DdeknsBE.js} +3 -3
  44. package/dist/components/{p-ChQIkICO.js.map → p-DdeknsBE.js.map} +1 -1
  45. package/dist/components/{p-j-ZEdgz4.js → p-GHGGjwP3.js} +3 -3
  46. package/dist/components/{p-j-ZEdgz4.js.map → p-GHGGjwP3.js.map} +1 -1
  47. package/dist/components/{p-B4wWf5r8.js → p-XAhTfI7Q.js} +4 -4
  48. package/dist/components/{p-B4wWf5r8.js.map → p-XAhTfI7Q.js.map} +1 -1
  49. package/dist/components/{p-CVtij2QI.js → p-at_j60O8.js} +3 -3
  50. package/dist/components/{p-CVtij2QI.js.map → p-at_j60O8.js.map} +1 -1
  51. package/dist/components/sd-date-picker.js +1 -1
  52. package/dist/components/sd-date-range-picker.js +1 -1
  53. package/dist/components/sd-guide.js +1 -1
  54. package/dist/components/sd-number-input.d.ts +11 -0
  55. package/dist/components/sd-number-input.js +335 -0
  56. package/dist/components/sd-number-input.js.map +1 -0
  57. package/dist/components/sd-pagination.js +1 -1
  58. package/dist/components/sd-popover.js +3 -3
  59. package/dist/components/sd-portal.js +1 -1
  60. package/dist/components/sd-progress.js +2 -2
  61. package/dist/components/sd-select-multiple-group.js +74 -45
  62. package/dist/components/sd-select-multiple-group.js.map +1 -1
  63. package/dist/components/sd-select-multiple.js +4 -4
  64. package/dist/components/sd-select-option-group.js +1 -1
  65. package/dist/components/sd-select-option.js +1 -1
  66. package/dist/components/sd-select.js +1 -1
  67. package/dist/components/sd-table-backup.js +6 -6
  68. package/dist/components/sd-table.js +9 -9
  69. package/dist/components/sd-tbody.js +1 -1
  70. package/dist/components/sd-td.js +2 -2
  71. package/dist/components/sd-th.js +1 -1
  72. package/dist/components/sd-toggle-button.js +1 -1
  73. package/dist/components/sd-toggle.js +1 -1
  74. package/dist/components/sd-tooltip-portal.js +1 -1
  75. package/dist/components/sd-tooltip.js +1 -1
  76. package/dist/components/sd-tr.js +1 -1
  77. package/dist/design-system/design-system.esm.js +1 -1
  78. package/dist/design-system/p-26266f8c.entry.js +2 -0
  79. package/dist/design-system/p-2df41cc3.entry.js +2 -0
  80. package/dist/design-system/p-2df41cc3.entry.js.map +1 -0
  81. package/dist/design-system/p-3cc7957d.entry.js +2 -0
  82. package/dist/design-system/p-a18c202d.entry.js +2 -0
  83. package/dist/design-system/{p-0cbdb34f.entry.js → p-b0668ce9.entry.js} +2 -2
  84. package/dist/design-system/{p-d02b3369.entry.js → p-f9e04bf9.entry.js} +2 -2
  85. package/dist/design-system/p-f9e04bf9.entry.js.map +1 -0
  86. package/dist/esm/design-system.js +1 -1
  87. package/dist/esm/loader.js +1 -1
  88. package/dist/esm/{sd-button_21.entry.js → sd-button_23.entry.js} +589 -80
  89. package/dist/esm/sd-popover.entry.js +2 -2
  90. package/dist/esm/sd-progress.entry.js +2 -2
  91. package/dist/esm/sd-select-multiple.entry.js +264 -0
  92. package/dist/esm/sd-select-multiple.entry.js.map +1 -0
  93. package/dist/esm/sd-tbody_3.entry.js +3 -3
  94. package/dist/esm/sd-td.entry.js +2 -2
  95. package/dist/types/components/sd-number-input/sd-number-input.d.ts +58 -0
  96. package/dist/types/components/sd-select-multiple-group/sd-select-multiple-group.d.ts +2 -0
  97. package/dist/types/components.d.ts +145 -0
  98. package/hydrate/index.js +407 -68
  99. package/hydrate/index.mjs +407 -68
  100. package/package.json +1 -1
  101. package/dist/cjs/sd-select-multiple-group.cjs.entry.js +0 -406
  102. package/dist/cjs/sd-select-option-group.cjs.entry.js +0 -69
  103. package/dist/design-system/p-1e7a06ef.entry.js +0 -2
  104. package/dist/design-system/p-761882f5.entry.js +0 -2
  105. package/dist/design-system/p-790ae9ce.entry.js +0 -2
  106. package/dist/design-system/p-790ae9ce.entry.js.map +0 -1
  107. package/dist/design-system/p-a8e8fc17.entry.js +0 -2
  108. package/dist/design-system/p-d02b3369.entry.js.map +0 -1
  109. package/dist/design-system/p-e492d625.entry.js +0 -2
  110. package/dist/design-system/p-e492d625.entry.js.map +0 -1
  111. package/dist/esm/sd-select-multiple-group.entry.js +0 -404
  112. package/dist/esm/sd-select-multiple-group.entry.js.map +0 -1
  113. package/dist/esm/sd-select-option-group.entry.js +0 -67
  114. package/dist/esm/sd-select-option-group.entry.js.map +0 -1
  115. /package/dist/design-system/{p-1e7a06ef.entry.js.map → p-26266f8c.entry.js.map} +0 -0
  116. /package/dist/design-system/{p-761882f5.entry.js.map → p-3cc7957d.entry.js.map} +0 -0
  117. /package/dist/design-system/{p-a8e8fc17.entry.js.map → p-a18c202d.entry.js.map} +0 -0
  118. /package/dist/design-system/{p-0cbdb34f.entry.js.map → p-b0668ce9.entry.js.map} +0 -0
@@ -2481,6 +2481,285 @@ const SdLoadingSpinner = class {
2481
2481
  };
2482
2482
  SdLoadingSpinner.style = sdLoadingSpinnerCss();
2483
2483
 
2484
+ const sdNumberInputCss = () => `sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}.sd-number-input{box-sizing:border-box;display:flex;width:var(--input-width, 100%);align-items:center;height:28px;padding:4px 8px;border:1px solid #aaaaaa;border-radius:4px;color:#333333;font-size:12px;line-height:20px;background:white;position:relative}.sd-number-input--hovered{border-color:#0075ff;box-shadow:0 0 4px 0 rgba(0, 113, 255, 0.4)}.sd-number-input.sd-number-input--error{border-color:#fb4444}.sd-number-input.sd-number-input--pass{border-color:#2bce6c}.sd-number-input.sd-number-input--disabled{background-color:#eeeeee !important;border-color:#cccccc !important;cursor:not-allowed !important;box-shadow:none !important}.sd-number-input.sd-number-input--disabled .sd-number-input__input{color:#888888 !important}.sd-number-input .sd-number-input__input{display:block;width:100%;height:20px;line-height:20px;border:none;outline:none;background:transparent;font-size:inherit;color:#333333;margin-left:4px;margin-right:4px;padding-block:0;padding-inline:0;text-align:right}.sd-number-input .sd-number-input__input::placeholder{font-size:12px;height:20px;line-height:20px;color:#aaaaaa}.sd-number-input .sd-number-input__clear-icon{cursor:pointer;margin-left:8px}.sd-number-input .sd-number-input__buttons{padding:4px;display:flex;justify-content:space-between;align-items:center;position:absolute;inset:0;opacity:0;pointer-events:none;transition:opacity 0.2s ease}.sd-number-input .sd-number-input__button{width:20px;height:20px;border:none;border-radius:2px;background-color:#eff6ff;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.2s ease}.sd-number-input .sd-number-input__button:hover:not(:disabled){background-color:#e6f1ff}.sd-number-input .sd-number-input__button:disabled{background-color:#eeeeee;cursor:not-allowed}.sd-number-input .sd-number-input__button--decrement{border-bottom-left-radius:0;border-bottom-right-radius:0}.sd-number-input .sd-number-input__button--increment{border-top-left-radius:0;border-top-right-radius:0}.sd-number-input .sd-number-input__label{margin-bottom:8px;font-weight:500;color:#333333}sd-number-input:focus-within .sd-number-input__buttons{opacity:1;pointer-events:auto}sd-number-input:focus-within .sd-number-input{border-color:#0075ff;box-shadow:0 0 4px 0 rgba(0, 113, 255, 0.4)}`;
2485
+
2486
+ const SdNumberInput = class {
2487
+ constructor(hostRef) {
2488
+ registerInstance(this, hostRef);
2489
+ this.sdIncrement = createEvent(this, "sdIncrement");
2490
+ this.sdDecrement = createEvent(this, "sdDecrement");
2491
+ this.sdInput = createEvent(this, "sdInput");
2492
+ this.sdChange = createEvent(this, "sdChange");
2493
+ this.sdFocus = createEvent(this, "sdFocus");
2494
+ this.sdBlur = createEvent(this, "sdBlur");
2495
+ }
2496
+ get el() { return getElement(this); }
2497
+ min = Number.NEGATIVE_INFINITY;
2498
+ max = Number.POSITIVE_INFINITY;
2499
+ step = 1;
2500
+ useButton = false;
2501
+ useDecimal = false;
2502
+ value = null;
2503
+ label;
2504
+ placeholder = '입력해 주세요.';
2505
+ disabled = false;
2506
+ width;
2507
+ rules;
2508
+ autoFocus = false;
2509
+ status;
2510
+ inputClass = '';
2511
+ readonly = false;
2512
+ inputStyle = {};
2513
+ internalValue = null;
2514
+ displayValue = '';
2515
+ hovered = false;
2516
+ error = false;
2517
+ nativeEl = undefined;
2518
+ sdIncrement;
2519
+ sdDecrement;
2520
+ sdInput;
2521
+ sdChange;
2522
+ sdFocus;
2523
+ sdBlur;
2524
+ formatWithCommas(value) {
2525
+ if (value === null || value === undefined)
2526
+ return '';
2527
+ const isNegative = value < 0;
2528
+ const absValue = Math.abs(value);
2529
+ const [intPart, decPart] = absValue.toString().split('.');
2530
+ const formatted = (+intPart).toLocaleString();
2531
+ const result = isNegative ? '-' + formatted : formatted;
2532
+ return decPart ? result + '.' + decPart : String(result);
2533
+ }
2534
+ parseInput(input) {
2535
+ if (!input || input.trim() === '')
2536
+ return null;
2537
+ const cleaned = input.replace(/,/g, '').trim();
2538
+ // -로 시작을 할 수 있을 수 있고, 소수점 0.n | .n
2539
+ if (!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(cleaned)) {
2540
+ return null;
2541
+ }
2542
+ const parsed = parseFloat(cleaned);
2543
+ if (isNaN(parsed))
2544
+ return null;
2545
+ // 소수점 사용 하지 않는데 . 이 있는 경우
2546
+ if (!this.useDecimal && cleaned.includes('.')) {
2547
+ return null;
2548
+ }
2549
+ return parsed;
2550
+ }
2551
+ clampMinMax(value) {
2552
+ return Math.min(Math.max(value, this.min), this.max);
2553
+ }
2554
+ updateDisplay() {
2555
+ this.displayValue = this.formatWithCommas(this.internalValue);
2556
+ }
2557
+ isIncrementDisabled() {
2558
+ if (this.disabled || this.readonly)
2559
+ return true;
2560
+ if (this.internalValue !== null) {
2561
+ return this.internalValue >= this.max;
2562
+ }
2563
+ return false;
2564
+ }
2565
+ isDecrementDisabled() {
2566
+ if (this.disabled || this.readonly)
2567
+ return true;
2568
+ if (this.internalValue !== null) {
2569
+ return this.internalValue <= this.min;
2570
+ }
2571
+ return false;
2572
+ }
2573
+ valueChanged(newValue) {
2574
+ if (newValue === null || newValue === '') {
2575
+ this.internalValue = null;
2576
+ }
2577
+ else {
2578
+ const parsed = typeof newValue === 'string' ? this.parseInput(newValue) : newValue;
2579
+ if (parsed !== null) {
2580
+ this.internalValue = this.clampMinMax(parsed);
2581
+ }
2582
+ }
2583
+ this.updateDisplay();
2584
+ }
2585
+ internalValueChanged(newValue) {
2586
+ this.updateDisplay();
2587
+ if (newValue !== this.value) {
2588
+ this.value = newValue;
2589
+ this.sdInput?.emit(newValue);
2590
+ }
2591
+ if (!this.rules || this.rules.length === 0)
2592
+ return;
2593
+ this.error = false;
2594
+ for (const rule of this.rules) {
2595
+ const result = rule(newValue);
2596
+ if (result !== true) {
2597
+ this.error = true;
2598
+ break;
2599
+ }
2600
+ }
2601
+ }
2602
+ componentWillLoad() {
2603
+ if (this.value !== null && this.value !== undefined) {
2604
+ const parsed = typeof this.value === 'string' ? this.parseInput(this.value) : this.value;
2605
+ if (parsed !== null) {
2606
+ this.internalValue = this.clampMinMax(parsed);
2607
+ }
2608
+ }
2609
+ this.updateDisplay();
2610
+ }
2611
+ handleInput = (event) => {
2612
+ const target = event.target;
2613
+ const inputValue = target.value;
2614
+ if (inputValue === '') {
2615
+ this.internalValue = null;
2616
+ this.displayValue = '';
2617
+ return;
2618
+ }
2619
+ const commasRemoved = inputValue.replace(/,/g, '');
2620
+ // 만약에 소수점 (.) 이 여러개 일 경우
2621
+ const decimalCount = (commasRemoved.match(/\./g) || []).length;
2622
+ if (decimalCount > 1) {
2623
+ target.value = this.displayValue;
2624
+ return;
2625
+ }
2626
+ // 가능: "-", ".", "-." (단순 기호만 있는 경우)
2627
+ if (commasRemoved === '-' || commasRemoved === '.' || commasRemoved === '-.') {
2628
+ target.value = commasRemoved;
2629
+ return;
2630
+ }
2631
+ // 숫자 뒤에 . 이 있는 경우 (예: "1000.") -> 콤마 포맷 적용 + . 유지
2632
+ if (commasRemoved.endsWith('.') && decimalCount === 1) {
2633
+ const numberPart = commasRemoved.slice(0, -1);
2634
+ const parsed = this.parseInput(numberPart);
2635
+ if (parsed !== null) {
2636
+ const formatted = this.formatWithCommas(parsed);
2637
+ target.value = formatted + '.';
2638
+ return;
2639
+ }
2640
+ }
2641
+ const parsed = this.parseInput(commasRemoved);
2642
+ if (parsed !== null) {
2643
+ if (parsed < this.min) {
2644
+ target.value = this.displayValue;
2645
+ return;
2646
+ }
2647
+ if (parsed > this.max) {
2648
+ target.value = this.displayValue;
2649
+ return;
2650
+ }
2651
+ this.internalValue = parsed;
2652
+ this.displayValue = this.formatWithCommas(parsed);
2653
+ target.value = this.displayValue;
2654
+ }
2655
+ else {
2656
+ target.value = this.displayValue;
2657
+ }
2658
+ };
2659
+ handleChange = (event) => {
2660
+ const target = event.target;
2661
+ const inputValue = target.value;
2662
+ if (inputValue === '') {
2663
+ this.internalValue = null;
2664
+ }
2665
+ else {
2666
+ const parsed = this.parseInput(inputValue);
2667
+ if (parsed !== null) {
2668
+ this.internalValue = this.clampMinMax(parsed);
2669
+ }
2670
+ }
2671
+ this.sdChange?.emit(this.internalValue);
2672
+ };
2673
+ handleFocus = (event) => {
2674
+ this.sdFocus?.emit(event);
2675
+ };
2676
+ handleBlur = (event) => {
2677
+ this.updateDisplay();
2678
+ if (this.nativeEl) {
2679
+ this.nativeEl.value = this.displayValue;
2680
+ }
2681
+ this.sdBlur?.emit(event);
2682
+ };
2683
+ handleKeyDown = (event) => {
2684
+ if (event.key === 'ArrowUp') {
2685
+ event.preventDefault();
2686
+ this.handleIncrement();
2687
+ }
2688
+ else if (event.key === 'ArrowDown') {
2689
+ event.preventDefault();
2690
+ this.handleDecrement();
2691
+ }
2692
+ };
2693
+ handleIncrement = () => {
2694
+ if (this.isIncrementDisabled())
2695
+ return;
2696
+ const currentVal = this.internalValue ?? (this.min ?? 0);
2697
+ let nextVal = currentVal + this.step;
2698
+ if (nextVal > this.max) {
2699
+ nextVal = this.max;
2700
+ }
2701
+ if (nextVal === currentVal)
2702
+ return;
2703
+ this.sdIncrement?.emit({ currentVal: nextVal, prevVal: currentVal });
2704
+ this.internalValue = nextVal;
2705
+ this.sdChange?.emit(nextVal);
2706
+ };
2707
+ handleDecrement = () => {
2708
+ if (this.isDecrementDisabled())
2709
+ return;
2710
+ const currentVal = this.internalValue ?? (this.min ?? 0);
2711
+ let nextVal = currentVal - this.step;
2712
+ if (nextVal < this.min) {
2713
+ nextVal = this.min;
2714
+ }
2715
+ if (nextVal === currentVal)
2716
+ return;
2717
+ this.sdDecrement?.emit({ currentVal: nextVal, prevVal: currentVal });
2718
+ this.internalValue = nextVal;
2719
+ this.sdChange?.emit(nextVal);
2720
+ };
2721
+ async getNativeElement() {
2722
+ return this.nativeEl || null;
2723
+ }
2724
+ getInputStatus() {
2725
+ if (this.disabled)
2726
+ return 'sd-number-input--disabled';
2727
+ if (this.hovered)
2728
+ return 'sd-number-input--hovered';
2729
+ if (this.status)
2730
+ return `sd-number-input--${this.status}`;
2731
+ if (this.error)
2732
+ return 'sd-number-input--error';
2733
+ return '';
2734
+ }
2735
+ render() {
2736
+ const inputWidth = this.width
2737
+ ? {
2738
+ '--input-width': typeof this.width === 'number' ? `${this.width}px` : this.width,
2739
+ }
2740
+ : {};
2741
+ const inputStyles = {
2742
+ textAlign: this.useButton ? 'center' : 'right',
2743
+ };
2744
+ return (h(Host, { key: '353b3f99bf5933d6f445a78c9cecd93fcbdd3a9c', style: inputWidth, onFocus: this.handleFocus, onBlur: this.handleBlur }, this.useButton ? 'use buttons' : 'dont use buttons', this.label && h("div", { key: '95d9687fa5634fb53f6a2120d2125cf92e12ccdd', class: "sd-number-input__label" }, this.label), h("label", { key: '05ba4deb72261325788b25842c27d7a177fda58a', class: {
2745
+ 'sd-number-input': true,
2746
+ [this.getInputStatus()]: true,
2747
+ 'sd-number-input--with-buttons': this.useButton,
2748
+ }, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, h("input", { key: 'e4c415d40c20f5e915765f4f7d68cd123517acc1', 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, onChange: this.handleChange, onKeyDown: this.handleKeyDown, style: inputStyles }), this.useButton && (h("div", { key: '1b960a710170212032a8cd7c1c6ad002a3275d69', class: "sd-number-input__buttons" }, h("button", { key: 'c9a80bbdf96e4e191c2d43f581eba9c77f465464', type: "button", class: {
2749
+ 'sd-number-input__button': true,
2750
+ 'sd-number-input__button--decrement': true,
2751
+ }, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, h("sd-icon", { key: 'c4791c052f390013e7dfdf78ef42d987e9609da1', name: "minus", size: 12, color: this.isDecrementDisabled() ? '#CCCCCC' : '#2D8DFF' })), h("button", { key: '769fb6ebcde814f1f8667eaadd35f97139869bf3', type: "button", class: {
2752
+ 'sd-number-input__button': true,
2753
+ 'sd-number-input__button--increment': true,
2754
+ }, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, h("sd-icon", { key: '6a4d263152daaf8f4a565f6659f6bfa6c0acc814', name: "add", size: 12, color: this.isIncrementDisabled() ? '#CCCCCC' : '#2D8DFF' })))))));
2755
+ }
2756
+ static get watchers() { return {
2757
+ "value": ["valueChanged"],
2758
+ "internalValue": ["internalValueChanged"]
2759
+ }; }
2760
+ };
2761
+ SdNumberInput.style = sdNumberInputCss();
2762
+
2484
2763
  const sdPaginationCss = () => `.sd-pagination{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;gap:8px;color:#555555;width:100%;font-size:12px}.sd-pagination .prepend-btns{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:60px}.sd-pagination .prepend-btns button{width:26px;height:26px;border:0;background:none}.sd-pagination .prepend-btns button:hover{border:1px solid #006ac1;border-radius:14px}.sd-pagination .append-btns{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:60px}.sd-pagination .append-btns button{width:26px;height:26px;border:0;background:none}.sd-pagination .append-btns button:hover{border:1px solid #006ac1;border-radius:14px}.sd-pagination .pagination-btn{display:flex;align-items:center;justify-content:center;border-radius:14px;outline:none;border:none;cursor:pointer;height:26px;color:#555555;width:var(--pagination-btn-width, 26px)}.sd-pagination .pagination-btn--selected{background-color:#006ac1;color:white}.sd-pagination .pagination-btn:hover{border:1px solid #006ac1}.sd-pagination--simple .pagination-info{line-height:26px;display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.sd-pagination--simple .pagination-info .current-page,.sd-pagination--simple .pagination-info .last-page{padding:0 2px}`;
2485
2764
 
2486
2765
  const BUTTON_WIDTH = {
@@ -2555,12 +2834,12 @@ const SdPagination = class {
2555
2834
  }
2556
2835
  }
2557
2836
  render() {
2558
- return (h("div", { key: '6b743779100f7835b29da728d642ced495b11116', class: this.paginationClasses }, h("div", { key: '34be0cf1db6cc55f761b32fa9e4f9bee236933f6', class: "prepend-btns" }, this.renderPrevButtons()), this.simple ? (h("div", { class: "pagination-info" }, h("span", { class: "current-page" }, this.currentPage), h("span", null, "/"), h("span", { class: "last-page" }, this.lastPage))) : (this.pageNumbers.map(n => (h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
2837
+ return (h("div", { key: 'b027af83594c0408615d4c34b861c5c31112f298', class: this.paginationClasses }, h("div", { key: '959c79e58c7745606d719c66e8090ef23f7db554', class: "prepend-btns" }, this.renderPrevButtons()), this.simple ? (h("div", { class: "pagination-info" }, h("span", { class: "current-page" }, this.currentPage), h("span", null, "/"), h("span", { class: "last-page" }, this.lastPage))) : (this.pageNumbers.map(n => (h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
2559
2838
  'pagination-btn': true,
2560
2839
  'pagination-btn--selected': this.currentPage === n,
2561
2840
  }, disabled: this.currentPage === n, style: {
2562
2841
  '--pagination-btn-width': `${this.buttonWidth}px`,
2563
- }, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: '108017450555fb73c74c71cc7605ef8af5679a20', class: "append-btns" }, this.renderNextButtons())));
2842
+ }, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: '64f13226aa9249395ac7aa7d11ea5cc946f5477a', class: "append-btns" }, this.renderNextButtons())));
2564
2843
  }
2565
2844
  };
2566
2845
  SdPagination.style = sdPaginationCss();
@@ -2683,7 +2962,7 @@ const SdPortal = class {
2683
2962
  this.sdClose.emit();
2684
2963
  }
2685
2964
  render() {
2686
- return h("slot", { key: '5995c7edbf0a54b6efb9afa2b5f67f078282acd8' });
2965
+ return h("slot", { key: 'd93a68ecf1a281765225bf204cd479bb4b7bfdbf' });
2687
2966
  }
2688
2967
  };
2689
2968
 
@@ -3003,9 +3282,9 @@ const SdSelect = class extends BaseDropdownEvent {
3003
3282
  };
3004
3283
  SdSelect.style = sdSelectCss();
3005
3284
 
3006
- const sdSelectMultipleCss = () => `.sd-select-multiple__dropdown{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-select-multiple__dropdown::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-select-multiple__dropdown::-webkit-scrollbar:horizontal{height:8px}.sd-select-multiple__dropdown::-webkit-scrollbar:vertical{width:8px}.sd-select-multiple__dropdown::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-select-multiple__dropdown::-webkit-scrollbar-track{background-color:transparent}:host{display:inline-block;height:fit-content;position:relative}.sd-select-multiple{display:flex;flex-wrap:nowrap;width:var(--select-width, 200px);height:28px;cursor:pointer;user-select:none;border:1px solid #aaaaaa;border-radius:4px;background-color:white}.sd-select-multiple:hover:not(.sd-select-multiple--disabled){background:#f6f6f6}.sd-select-multiple.sd-select-multiple--disabled{cursor:not-allowed;background-color:#eeeeee;border-color:#cccccc}.sd-select-multiple.sd-select-multiple--disabled .sd-select-multiple__label{border-right:1px solid #cccccc}.sd-select-multiple.sd-select-multiple--disabled .sd-select-multiple__trigger{color:#888888}.sd-select-multiple.sd-select-multiple--disabled .sd-select-multiple__trigger:focus,.sd-select-multiple.sd-select-multiple--disabled .sd-select-multiple__trigger:focus-visible,.sd-select-multiple.sd-select-multiple--disabled .sd-select-multiple__trigger:focus-within{outline:none !important}.sd-select-multiple__label{font-size:12px;font-weight:500;color:#333333;padding:4px 12px;border-right:1px solid #cccccc;border-radius:4px 0 0 4px;background-color:#f6f6f6}.sd-select-multiple__container{position:relative;width:100%;display:flex}.sd-select-multiple__container .sd-select-multiple__trigger{padding:4px 20px 4px 12px;display:flex;width:100%;align-items:center}.sd-select-multiple__container .sd-select-multiple__trigger .sd-select-multiple__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400}.sd-select-multiple__container .sd-select-multiple__trigger .sd-select-multiple__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}.sd-select-multiple__container .sd-select-multiple__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}.sd-select-multiple__container .sd-select-multiple__arrow--open{transform:rotate(180deg)}.sd-select-multiple__dropdown{width:var(--select-dropdown-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333}.sd-select-multiple__dropdown .sd-select-multiple__search-container{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center;padding:4px 8px;z-index:1}.sd-select-multiple__dropdown .sd-select-multiple__search-container--scrolled{box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}.sd-select-multiple__dropdown .sd-select-multiple__option-placeholder{padding:4px 12px;font-size:12px;line-height:20px;text-align:left}`;
3285
+ const sdSelectMultipleGroupCss = () => `.sd-select-multiple-group__dropdown{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-select-multiple-group__dropdown::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-select-multiple-group__dropdown::-webkit-scrollbar:horizontal{height:8px}.sd-select-multiple-group__dropdown::-webkit-scrollbar:vertical{width:8px}.sd-select-multiple-group__dropdown::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-select-multiple-group__dropdown::-webkit-scrollbar-track{background-color:transparent}sd-select-multiple-group{display:inline-block;height:fit-content}sd-select-multiple-group .sd-select-multiple-group{display:flex;flex-wrap:nowrap;width:var(--select-width, 200px);cursor:pointer;user-select:none;border:1px solid #aaaaaa;border-radius:4px;background-color:white;color:#333333}sd-select-multiple-group .sd-select-multiple-group:hover:not(.sd-select-multiple-group--disabled){background:#f6f6f6}sd-select-multiple-group .sd-select-multiple-group.sd-select-multiple-group--disabled{cursor:not-allowed;background-color:#eeeeee;border-color:#cccccc}sd-select-multiple-group .sd-select-multiple-group.sd-select-multiple-group--disabled .sd-select-multiple-group__label{border-right:1px solid #cccccc}sd-select-multiple-group .sd-select-multiple-group.sd-select-multiple-group--disabled .sd-select-multiple-group__trigger{color:#888888}sd-select-multiple-group .sd-select-multiple-group.sd-select-multiple-group--disabled .sd-select-multiple-group__trigger:focus,sd-select-multiple-group .sd-select-multiple-group.sd-select-multiple-group--disabled .sd-select-multiple-group__trigger:focus-visible,sd-select-multiple-group .sd-select-multiple-group.sd-select-multiple-group--disabled .sd-select-multiple-group__trigger:focus-within{outline:none !important}sd-select-multiple-group .sd-select-multiple-group__label{font-size:12px;font-weight:500;color:#333333;padding:4px 12px;border-right:1px solid #cccccc;border-radius:4px 0 0 4px;background-color:#f6f6f6}sd-select-multiple-group .sd-select-multiple-group__container{position:relative;width:100%;display:flex}sd-select-multiple-group .sd-select-multiple-group__container .sd-select-multiple-group__trigger{padding:4px 20px 4px 12px;display:flex;width:100%;align-items:center}sd-select-multiple-group .sd-select-multiple-group__container .sd-select-multiple-group__trigger .sd-select-multiple-group__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400}sd-select-multiple-group .sd-select-multiple-group__container .sd-select-multiple-group__trigger .sd-select-multiple-group__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-multiple-group .sd-select-multiple-group__container .sd-select-multiple-group__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}sd-select-multiple-group .sd-select-multiple-group__container .sd-select-multiple-group__arrow--open{transform:rotate(180deg)}.sd-select-multiple-group__dropdown{width:var(--select-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-multiple-group__dropdown--ready{opacity:1}.sd-select-multiple-group__dropdown .sd-select-multiple-group__search-container{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center;padding:4px 8px}.sd-select-multiple-group__dropdown .sd-select-multiple-group__search-container sd-input{width:100%}.sd-select-multiple-group__dropdown .sd-select-multiple-group__search-container--scrolled{box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}.sd-select-multiple-group__dropdown .sd-select-multiple-group__option-placeholder{padding:4px 12px;font-size:12px;line-height:20px}`;
3007
3286
 
3008
- const SdSelectMultiple = class extends BaseDropdownEvent {
3287
+ const SdSelectMultipleGroup = class extends BaseDropdownEvent {
3009
3288
  constructor(hostRef) {
3010
3289
  super();
3011
3290
  registerInstance(this, hostRef);
@@ -3025,6 +3304,15 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
3025
3304
  clearable = false;
3026
3305
  searchable = false;
3027
3306
  useCheckbox = false;
3307
+ useAll = false;
3308
+ allCheckedLabel = '전체';
3309
+ allCheckOptionLabel = '전체';
3310
+ // props - custom styles
3311
+ containerStyle = {};
3312
+ triggerStyle = {};
3313
+ dropdownStyle = {};
3314
+ optionStyle = {};
3315
+ labelStyle = {};
3028
3316
  // props - custom slots
3029
3317
  optionRenderer;
3030
3318
  // states
@@ -3033,6 +3321,7 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
3033
3321
  searchText = null;
3034
3322
  itemIndex = -1;
3035
3323
  isScrolled = false;
3324
+ isDropdownReady = false;
3036
3325
  // events
3037
3326
  sdChange;
3038
3327
  dropDownShow;
@@ -3040,9 +3329,6 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
3040
3329
  searchRef;
3041
3330
  optionRef;
3042
3331
  dropdownRef;
3043
- async open() {
3044
- this.isOpen = true;
3045
- }
3046
3332
  valueChanged() {
3047
3333
  this.sdChange?.emit(this.value);
3048
3334
  }
@@ -3057,15 +3343,17 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
3057
3343
  if (this.searchable) {
3058
3344
  const searchInput = await this.getNativeInputElement();
3059
3345
  if (this.itemIndex === -1) {
3060
- searchInput?.focus();
3346
+ searchInput?.focus({ preventScroll: true });
3061
3347
  return;
3062
3348
  }
3063
3349
  else if (searchInput?.matches(':focus')) {
3064
3350
  searchInput?.blur();
3065
3351
  }
3066
3352
  }
3067
- const optionElements = Array.from(this.dropdownRef?.querySelectorAll('.sd-select-multiple__dropdown sd-select-option') || []);
3068
- const currentItem = optionElements?.[this.itemIndex];
3353
+ const optionElements = Array.from(this.dropdownRef?.querySelectorAll('sd-select-option-group') || []);
3354
+ // useAll 사용시 "전체" 옵션 포함한 인덱스 사용
3355
+ const actualIndex = this.useAll ? this.itemIndex + 1 : this.itemIndex;
3356
+ const currentItem = optionElements?.[actualIndex];
3069
3357
  if (!currentItem || !this.isOpen)
3070
3358
  return;
3071
3359
  this.optionRef = currentItem;
@@ -3079,30 +3367,45 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
3079
3367
  async isOpenChanged() {
3080
3368
  // Base class의 이벤트 관리 호출 - 다른 select와의 이벤트 충돌 방지
3081
3369
  this.onDropdownToggle(this.isOpen);
3082
- const selectedOption = this.getSelectedOption();
3083
- if (!selectedOption) {
3084
- this.itemIndex = -1;
3085
- }
3086
- else {
3087
- this.itemIndex = this.options.indexOf(selectedOption[0]);
3088
- }
3089
3370
  this.dropDownShow?.emit({ isOpen: this.isOpen });
3090
- if (this.isOpen === false)
3371
+ this.isDropdownReady = false;
3372
+ if (this.isOpen === false) {
3091
3373
  return;
3092
- await new Promise(resolve => setTimeout(resolve, 10));
3093
- const optionElements = Array.from(this.dropdownRef?.querySelectorAll('.sd-select-multiple__dropdown sd-select-item') || []);
3094
- const currentItem = optionElements?.[this.itemIndex];
3095
- // 드롭다운이 열릴 때 검색 입력에 포커스
3096
- if (this.searchable) {
3097
- const searchInput = await this.getNativeInputElement();
3098
- searchInput?.focus();
3099
3374
  }
3100
- if (!currentItem)
3101
- return;
3102
- await new Promise(resolve => setTimeout(resolve, 10)); // 추가 딜레이
3103
- this.scrollToOption(currentItem);
3375
+ // DOM 렌더링을 기다리기 위해 이중 requestAnimationFrame 사용 - (레이아웃/스타일 계산 - 페인트 이후)
3376
+ requestAnimationFrame(() => {
3377
+ requestAnimationFrame(async () => {
3378
+ const selectedOptions = this.getSelectedOption();
3379
+ // 선택된 옵션이 있으면 첫 번째 선택된 항목으로 스크롤
3380
+ if (selectedOptions && selectedOptions.length > 0) {
3381
+ const selectedIndex = this.options.indexOf(selectedOptions[0]);
3382
+ const optionElements = Array.from(this.dropdownRef?.querySelectorAll('sd-select-option-group') || []);
3383
+ // useAll 사용시 "전체" 옵션 포함한 인덱스 사용
3384
+ const actualIndex = this.useAll ? selectedIndex + 1 : selectedIndex;
3385
+ // 선택된 옵션이 화면 가운데에 오도록 index 조정
3386
+ const targetIndex = Math.min(actualIndex + 4, optionElements.length - 1);
3387
+ const currentItem = optionElements?.[targetIndex];
3388
+ if (currentItem) {
3389
+ this.scrollToOption(currentItem);
3390
+ }
3391
+ }
3392
+ this.isDropdownReady = true;
3393
+ if (this.searchable) {
3394
+ const searchInput = await this.getNativeInputElement();
3395
+ if (searchInput) {
3396
+ requestAnimationFrame(() => {
3397
+ searchInput.focus({ preventScroll: true });
3398
+ });
3399
+ }
3400
+ }
3401
+ });
3402
+ });
3403
+ }
3404
+ async open() {
3405
+ await new Promise(resolve => setTimeout(resolve, 0));
3406
+ this.isOpen = true;
3104
3407
  }
3105
- connectedCallback() {
3408
+ componentWillLoad() {
3106
3409
  // props가 모두 설정된 후에 실행되므로 올바른 options 값을 가져올 수 있음
3107
3410
  this.filteredOptions = this.options;
3108
3411
  this.initializeEvent(); // global dropdown Manager에 등록 + 이벤트 핸들러 초기화
@@ -3147,19 +3450,84 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
3147
3450
  this.dropDownShow?.emit({ isOpen: this.isOpen });
3148
3451
  }
3149
3452
  };
3453
+ handleAllOptionClick = (detail) => {
3454
+ if (detail.isSelected) {
3455
+ // 이미 선택된 옵션인 경우, 선택 해제
3456
+ const filterDisabledOptions = this.filteredOptions.filter(opt => opt.type === 'item' && !opt.disabled);
3457
+ this.value =
3458
+ this.value?.filter(selected => !filterDisabledOptions.some(opt => opt.value === selected.value)) || this.value;
3459
+ }
3460
+ else {
3461
+ // 새로운 옵션 선택
3462
+ const valueSet = new Set([
3463
+ ...(this.value || []),
3464
+ ...this.filteredOptions.filter(opt => opt.type === 'item' && !opt.disabled),
3465
+ ]);
3466
+ this.value = Array.from(valueSet);
3467
+ }
3468
+ };
3150
3469
  handleOptionClick = (detail) => {
3151
3470
  const { option, event } = detail;
3152
3471
  event.stopPropagation();
3153
- this.handleOptionSelection(option);
3472
+ if (option.type === 'group')
3473
+ this.handleGroupOptionClick(detail);
3474
+ if (option.type === 'subgroup')
3475
+ this.handleSubGroupOptionClick(detail);
3476
+ if (option.type === 'item')
3477
+ this.handleOptionSelection(option);
3478
+ };
3479
+ handleGroupOptionClick = (detail) => {
3480
+ const { option, isSelected } = detail;
3481
+ const childOptions = this.filteredOptions.filter(opt => opt.parent === option.value && !opt.disabled);
3482
+ childOptions.forEach(subgroup => {
3483
+ this.handleSubGroupOptionClick({
3484
+ option: subgroup,
3485
+ isSelected: isSelected || isSelected === null,
3486
+ });
3487
+ });
3488
+ };
3489
+ handleSubGroupOptionClick = (detail) => {
3490
+ const { option, isSelected } = detail;
3491
+ const childOptions = this.filteredOptions.filter(opt => opt.parent === option.value && !opt.disabled);
3492
+ if (isSelected || isSelected === null) {
3493
+ // 모든 자식 옵션이 선택된 경우, 모두 선택 해제
3494
+ this.value =
3495
+ this.value?.filter(selected => !childOptions.some(child => child.value === selected.value)) ||
3496
+ null;
3497
+ }
3498
+ else {
3499
+ // 일부 또는 전체 자식 옵션이 선택되지 않은 경우, 모두 선택
3500
+ const newSelections = childOptions.filter(child => !this.value?.some(selected => selected.value === child.value));
3501
+ this.value = [...(this.value || []), ...newSelections];
3502
+ }
3154
3503
  };
3155
3504
  filterOptions() {
3156
3505
  if (!this.searchText || this.searchText.trim() === '') {
3157
3506
  // 검색어가 없으면 전체 옵션 표시
3158
3507
  this.filteredOptions = this.options;
3508
+ return;
3159
3509
  }
3160
- else {
3161
- // 검색어가 있으면 필터링
3162
- this.filteredOptions = this.options.filter(option => option.label.toLowerCase().includes(this.searchText.toLowerCase()));
3510
+ const searchTerm = this.searchText.toLowerCase();
3511
+ const matchedOptions = new Set();
3512
+ // 1. 직접 매칭되는 옵션들 찾기
3513
+ this.options.forEach(option => {
3514
+ if (option.label.toLowerCase().includes(searchTerm)) {
3515
+ matchedOptions.add(option);
3516
+ // 매칭된 옵션의 상위 그룹들도 포함
3517
+ this.addParentGroups(option, matchedOptions);
3518
+ }
3519
+ });
3520
+ // 2. Set을 배열로 변환하고 원본 순서 유지
3521
+ this.filteredOptions = this.options.filter(option => matchedOptions.has(option));
3522
+ }
3523
+ addParentGroups(option, matchedSet) {
3524
+ if (!option.parent)
3525
+ return;
3526
+ const parentOption = this.options.find(opt => opt.value === option.parent);
3527
+ if (parentOption && !matchedSet.has(parentOption)) {
3528
+ matchedSet.add(parentOption);
3529
+ // 재귀적으로 상위 그룹들도 추가
3530
+ this.addParentGroups(parentOption, matchedSet);
3163
3531
  }
3164
3532
  }
3165
3533
  getSelectedOption() {
@@ -3190,67 +3558,145 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
3190
3558
  this.value = [...(this.value || []), option];
3191
3559
  }
3192
3560
  };
3561
+ getAllItemsUnderOption(parentOption, includeDisabled = false) {
3562
+ const filterChildrenWithParent = (option) => option.parent === parentOption.value && (includeDisabled || !option.disabled);
3563
+ if (parentOption.type === 'subgroup') {
3564
+ return this.filteredOptions.filter(option => filterChildrenWithParent(option) && option.type === 'item');
3565
+ }
3566
+ const allItems = [];
3567
+ const childOptions = this.filteredOptions.filter(filterChildrenWithParent);
3568
+ const subgroupOptions = childOptions.filter(option => option.type === 'subgroup');
3569
+ subgroupOptions.forEach(subgroup => {
3570
+ const itemsUnderSubgroup = this.filteredOptions.filter(option => option.parent === subgroup.value &&
3571
+ option.type === 'item' &&
3572
+ (includeDisabled ? true : !option.disabled));
3573
+ allItems.push(...itemsUnderSubgroup);
3574
+ });
3575
+ const directItems = childOptions.filter(option => option.type === 'item');
3576
+ allItems.push(...directItems);
3577
+ return allItems;
3578
+ }
3579
+ isAllChildrenSelected(groupOption) {
3580
+ const allItems = this.getAllItemsUnderOption(groupOption);
3581
+ if (allItems.length === 0)
3582
+ return false;
3583
+ const selectedItems = allItems.filter(item => this.value?.some(selected => selected.value === item.value));
3584
+ if (selectedItems.length === allItems.length)
3585
+ return true;
3586
+ if (selectedItems.length > 0)
3587
+ return null;
3588
+ return false;
3589
+ }
3590
+ getChildrenOptions(parentOption) {
3591
+ const allItems = this.getAllItemsUnderOption(parentOption, true);
3592
+ const selectedCount = allItems.filter(item => this.value?.some(val => val.value === item.value)).length;
3593
+ return {
3594
+ selectedCount,
3595
+ totalCount: allItems.length,
3596
+ };
3597
+ }
3598
+ isAllOptionsSelected() {
3599
+ if (!this.value || this.value.length === 0)
3600
+ return false;
3601
+ const selectableItems = this.options.filter(opt => opt.type === 'item' && !opt.disabled);
3602
+ if (selectableItems.length === 0)
3603
+ return false;
3604
+ const selectedValues = new Set(this.value.map(v => v.value));
3605
+ return selectableItems.every(option => selectedValues.has(option.value));
3606
+ }
3607
+ getTriggerLabel() {
3608
+ const selectedOption = this.getSelectedOption();
3609
+ if (!selectedOption)
3610
+ return '선택';
3611
+ if (selectedOption.length === 0)
3612
+ return this.placeholder;
3613
+ const isAllChecked = this.isAllOptionsSelected();
3614
+ return isAllChecked
3615
+ ? this.allCheckedLabel
3616
+ : selectedOption.map(option => option.label).join(', ');
3617
+ }
3193
3618
  closeDropdown() {
3194
3619
  this.isOpen = false;
3195
3620
  }
3196
- scrollToOption(optionElement) {
3621
+ async scrollToOption(optionElement) {
3197
3622
  if (!this.dropdownRef || !optionElement)
3198
3623
  return;
3199
- const dropdown = this.dropdownRef;
3200
- const optionTop = optionElement.offsetTop;
3201
- const optionHeight = optionElement.offsetHeight;
3202
- const dropdownScrollTop = dropdown.scrollTop;
3203
- const dropdownHeight = dropdown.clientHeight;
3204
- const searchContainer = dropdown.querySelector('.sd-select__search-container');
3205
- const searchOffset = searchContainer ? searchContainer.offsetHeight : 0;
3206
- const visibleTop = dropdownScrollTop + searchOffset;
3207
- const visibleBottom = dropdownScrollTop + dropdownHeight;
3208
- if (optionTop < visibleTop) {
3209
- dropdown.scrollTop = optionTop - searchOffset;
3210
- }
3211
- else if (optionTop + optionHeight > visibleBottom) {
3212
- dropdown.scrollTop = optionTop + optionHeight - dropdownHeight + searchOffset;
3213
- }
3624
+ requestAnimationFrame(() => {
3625
+ const dropdown = this.dropdownRef;
3626
+ const optionTop = optionElement.offsetTop;
3627
+ const optionHeight = optionElement.offsetHeight;
3628
+ const dropdownScrollTop = dropdown.scrollTop;
3629
+ const dropdownHeight = dropdown.clientHeight;
3630
+ const searchContainer = dropdown.querySelector('.sd-select-multiple-group__search-container');
3631
+ const searchOffset = searchContainer ? searchContainer.offsetHeight : 0;
3632
+ const visibleContentHeight = dropdownHeight - searchOffset;
3633
+ const visibleTop = dropdownScrollTop + searchOffset;
3634
+ const visibleBottom = dropdownScrollTop + dropdownHeight;
3635
+ if (optionTop < visibleTop) {
3636
+ dropdown.scrollTo({ top: optionTop - searchOffset, behavior: 'instant' });
3637
+ }
3638
+ else if (optionTop + optionHeight > visibleBottom) {
3639
+ dropdown.scrollTo({
3640
+ top: optionTop + optionHeight - visibleContentHeight - searchOffset,
3641
+ behavior: 'instant',
3642
+ });
3643
+ }
3644
+ });
3214
3645
  }
3215
- // render method
3216
3646
  render() {
3217
3647
  const style = {
3218
3648
  '--select-width': this.width || '200px',
3219
3649
  '--select-dropdown-height': this.dropdownHeight || '260px',
3220
3650
  };
3221
- return (h(Host, { key: '24d4287067a9706099a20c46abee2d25a8271c1c', style: style }, h("div", { key: '8b6f63ea974841ded9607c592d2c866a32bdccdf', class: {
3222
- 'sd-select-multiple': true,
3223
- 'sd-select-multiple--open': this.isOpen,
3224
- 'sd-select-multiple--disabled': this.disabled,
3225
- }, ref: el => (this.selectRef = el) }, this.renderLabel(this.label), h("div", { key: '2d35e79a95e5cd2ec8b055ca4d7a38e70ac13936', class: "sd-select-multiple__container" }, this.renderTrigger(), this.renderDropdown()))));
3651
+ return (h(Host, { key: '00e3f75c997fe76087ddfa2d9fef2ddb11a10a3e', style: style }, h("div", { key: 'f7e5a9f0d3704e0cfb014c8b7a84e6c93d61d31b', class: {
3652
+ 'sd-select-multiple-group': true,
3653
+ 'sd-select-multiple-group--open': this.isOpen,
3654
+ 'sd-select-multiple-group--disabled': this.disabled,
3655
+ }, style: this.containerStyle, ref: el => (this.selectRef = el) }, this.renderLabel(this.label, this.labelStyle), h("div", { key: '5b4d771e6ba76ce56974eeee2f01e6a267f557f5', class: "sd-select-multiple-group__container" }, this.renderTrigger(), this.renderDropdown()))));
3226
3656
  }
3227
- renderLabel(label) {
3657
+ renderLabel(label, labelStyle) {
3228
3658
  if (!label)
3229
3659
  return null;
3230
- return h("label", { class: "sd-select-multiple__label" }, label);
3660
+ return (h("label", { class: "sd-select-multiple-group__label", style: labelStyle }, label));
3231
3661
  }
3232
3662
  renderTrigger() {
3233
3663
  const selectedOption = this.getSelectedOption();
3234
- return (h("div", { class: "sd-select-multiple__trigger", tabindex: this.disabled ? -1 : 0, onClick: this.handleTriggerClick }, h("span", { class: "sd-select-multiple__value" }, !selectedOption
3235
- ? '선택'
3236
- : selectedOption.length
3237
- ? selectedOption.map(option => option.label).join(', ')
3238
- : this.placeholder), this.clearable && selectedOption?.length > 0 && !this.disabled && (h("sd-icon", { key: "close-icon", name: "close", size: 10, color: "#888", class: "sd-select-multiple__clear", onClick: event => {
3664
+ return (h("div", { class: "sd-select-multiple-group__trigger", tabindex: this.disabled ? -1 : 0, onClick: this.handleTriggerClick, style: this.triggerStyle }, h("span", { class: "sd-select-multiple-group__value" }, this.getTriggerLabel()), this.clearable && selectedOption?.length > 0 && !this.disabled && (h("sd-icon", { key: "close-icon", name: "close", size: 10, color: "#888", class: "sd-select-multiple-group__clear", onClick: event => {
3239
3665
  event.stopPropagation();
3240
3666
  this.value = null;
3241
- } })), h("sd-icon", { key: "arrow-icon", name: "arrowDown", color: "#888", class: { 'sd-select-multiple__arrow': true, 'sd-select-multiple__arrow--open': this.isOpen } })));
3667
+ } })), h("sd-icon", { key: "arrow-icon", name: "arrowDown", color: "#888", class: {
3668
+ 'sd-select-multiple-group__arrow': true,
3669
+ 'sd-select-multiple-group__arrow--open': this.isOpen,
3670
+ } })));
3242
3671
  }
3243
3672
  renderDropdown() {
3673
+ const style = {
3674
+ '--select-width': this.width || '200px',
3675
+ '--select-dropdown-height': this.dropdownHeight || '260px',
3676
+ };
3244
3677
  if (this.isOpen === false)
3245
3678
  return null;
3246
- return (h("sd-portal", { open: this.isOpen, parentRef: this.selectRef, onSdClose: this.closeDropdown }, h("div", { class: "sd-select-multiple__dropdown", onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (h("div", { class: {
3247
- 'sd-select-multiple__search-container': true,
3248
- 'sd-select-multiple__search-container--scrolled': this.isScrolled,
3679
+ return (h("sd-portal", { open: this.isOpen, parentRef: this.selectRef, onSdClose: this.closeDropdown }, h("div", { style: { width: '0', height: '0', overflow: 'visible' } }, h("div", { class: {
3680
+ 'sd-select-multiple-group__dropdown': true,
3681
+ 'sd-select-multiple-group__dropdown--ready': this.isDropdownReady,
3682
+ }, style: { ...style, ...this.dropdownStyle }, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (h("div", { class: {
3683
+ 'sd-select-multiple-group__search-container': true,
3684
+ 'sd-select-multiple-group__search-container--scrolled': this.isScrolled,
3249
3685
  }, onClick: event => event.stopPropagation() }, h("sd-input", { ref: el => (this.searchRef = el), value: this.searchText, placeholder: "\uAC80\uC0C9", clearable: true, inputStyle: { 'padding-left': '8px' }, autofocus: true, onSdInput: event => {
3250
3686
  this.searchText = String(event?.detail);
3251
3687
  }, onSdFocus: () => {
3252
3688
  this.itemIndex = -1;
3253
- } }, h("sd-icon", { name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" })))), this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("slot", { name: `option-${option.value}` }, h("sd-select-option", { option: option, index: index, isSelected: this.value?.some(selected => selected.value === option.value), isFocused: index === this.itemIndex, onOptionClick: ({ detail }) => this.handleOptionClick(detail), useCheckbox: this.useCheckbox }))))) : (h("slot", { name: "option-placeholder" }, h("div", { class: 'sd-select-multiple__option-placeholder' }, this.optionPlaceholder))))));
3689
+ }, onKeyDown: e => {
3690
+ if (e.code === 'Enter')
3691
+ e.stopPropagation();
3692
+ } }, h("sd-icon", { name: "search", size: 16, color: "#737373", slot: "prefix" })))), this.filteredOptions.length > 0 ? (h(Fragment, null, this.useAll && (h("sd-select-option-group", { option: { label: this.allCheckOptionLabel, value: '', type: 'all' }, index: 0, isSelected: this.isAllOptionsSelected(), isFocused: this.itemIndex === 0, optionStyle: this.optionStyle, onOptionClick: ({ detail, }) => this.handleAllOptionClick(detail), useCheckbox: this.useCheckbox, useIndicator: false })), this.filteredOptions.map((option, index) => (h("slot", { name: `option-${option.value}` }, h("sd-select-option-group", { option: option, index: index, isSelected: option.type === 'item'
3693
+ ? this.value?.some(selected => selected.value === option.value)
3694
+ : this.isAllChildrenSelected(option), isFocused: index === this.itemIndex, optionStyle: this.optionStyle, onOptionClick: ({ detail, }) => {
3695
+ if (option.type !== 'item' && !this.useCheckbox) {
3696
+ return;
3697
+ }
3698
+ this.handleOptionClick(detail);
3699
+ }, useCheckbox: this.useCheckbox, ...(option.type !== 'item' && { countInfo: this.getChildrenOptions(option) }) })))))) : (h("slot", { name: "option-placeholder" }, h("div", { class: 'sd-select-multiple-group__option-placeholder', style: this.optionStyle }, this.optionPlaceholder)))))));
3254
3700
  }
3255
3701
  static get watchers() { return {
3256
3702
  "value": ["valueChanged"],
@@ -3260,7 +3706,7 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
3260
3706
  "isOpen": ["isOpenChanged"]
3261
3707
  }; }
3262
3708
  };
3263
- SdSelectMultiple.style = sdSelectMultipleCss();
3709
+ SdSelectMultipleGroup.style = sdSelectMultipleGroupCss();
3264
3710
 
3265
3711
  const sdSelectOptionCss = () => `sd-select-option{display:block;height:fit-content;line-height:0}sd-select-option .sd-select__option{display:flex;padding:4px 12px;font-size:12px;line-height:20px;cursor:pointer}sd-select-option .sd-select__option__checkbox-wrapper{display:flex;width:100%;column-gap:8px;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}sd-select-option .sd-select__option--focused{background-color:#e6f1ff}sd-select-option .sd-select__option--selected:not(:hover):not(.sd-select__option--use-checkbox),sd-select-option .sd-select__option--focused:not(:hover):not(.sd-select__option--use-checkbox){color:#0075ff;font-weight:700}sd-select-option .sd-select__option--disabled{color:#aaaaaa;cursor:not-allowed}sd-select-option .sd-select__option:hover:not(.sd-select__option--disabled){background-color:#0075ff;color:white}`;
3266
3712
 
@@ -3293,7 +3739,7 @@ const SdSelectOption = class {
3293
3739
  }
3294
3740
  };
3295
3741
  render() {
3296
- return (h(Host, { key: 'd3235f4b0314c15a8d280377d88db6bf53f7eb79' }, h("div", { key: '033fe384d67211a387d609a7b462330ee86c67a2', class: {
3742
+ return (h(Host, { key: 'd106374cd96d326e885b65ac94ecf1a397ea2ad9' }, h("div", { key: 'e07601d9c735f7950102449342257a7e39d28a42', class: {
3297
3743
  'sd-select__option': true,
3298
3744
  'sd-select__option--selected': this.isSelected,
3299
3745
  'sd-select__option--disabled': !!this.option.disabled,
@@ -3315,6 +3761,69 @@ const SdSelectOption = class {
3315
3761
  };
3316
3762
  SdSelectOption.style = sdSelectOptionCss();
3317
3763
 
3764
+ const sdSelectOptionGroupCss = () => `sd-select-option-group{display:block;height:fit-content}sd-select-option-group .sd-select__option-group{display:flex;padding:4px 12px;padding-left:12px;font-size:12px;line-height:20px;cursor:pointer}sd-select-option-group .sd-select__option-group.sd-select__option-group--group:not(.sd-select__option-group--use-checkbox),sd-select-option-group .sd-select__option-group.sd-select__option-group--subgroup:not(.sd-select__option-group--use-checkbox){cursor:default !important}sd-select-option-group .sd-select__option-group.sd-select__option-group--group{background-color:#f5faff !important;color:#333333 !important;font-weight:700}sd-select-option-group .sd-select__option-group.sd-select__option-group--subgroup{padding-left:20px;background-color:#f9f9f9 !important;color:#333333 !important;font-weight:500}sd-select-option-group .sd-select__option-group.sd-select__option-group--item{padding-left:28px}sd-select-option-group .sd-select__option-group sd-checkbox__bg{border-color:#888888}sd-select-option-group .sd-select__option-group__label-wrapper{display:flex;width:100%;column-gap:8px;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}sd-select-option-group .sd-select__option-group__label-wrapper sd-checkbox{flex-shrink:0}sd-select-option-group .sd-select__option-group__label-wrapper .sd-select__option-group-label{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-select-option-group .sd-select__option-group__label-wrapper .sd-select__option-group__count-indicator{width:fit-content;flex-shrink:0;font-size:12px;font-weight:500;color:#888888}sd-select-option-group .sd-select__option-group--focused{background-color:#e6f1ff}sd-select-option-group .sd-select__option-group--selected.sd-select__option-group--item:not(:hover):not(.sd-select__option-group--use-checkbox),sd-select-option-group .sd-select__option-group--focused.sd-select__option-group--item:not(:hover):not(.sd-select__option-group--use-checkbox){color:#0075ff;font-weight:700}sd-select-option-group .sd-select__option-group--disabled{color:#aaaaaa;cursor:not-allowed}sd-select-option-group .sd-select__option-group:hover:not(.sd-select__option-group--disabled){background-color:#0075ff;color:white}sd-select-option-group .sd-select__option-group:hover.sd-select__option-group--selected:not(.sd-select__option-group--group):not(.sd-select__option-group--subgroup) sd-checkbox .sd-checkbox__bg{border-color:white !important}`;
3765
+
3766
+ const SdSelectOptionGroup = class {
3767
+ constructor(hostRef) {
3768
+ registerInstance(this, hostRef);
3769
+ this.optionClick = createEvent(this, "optionClick");
3770
+ }
3771
+ get el() { return getElement(this); }
3772
+ option;
3773
+ index;
3774
+ isSelected = false;
3775
+ isFocused = false;
3776
+ optionStyle;
3777
+ disabled = false;
3778
+ useCheckbox = false;
3779
+ useIndicator = true;
3780
+ countInfo = {
3781
+ selectedCount: 0,
3782
+ totalCount: 0,
3783
+ };
3784
+ isHovered = false;
3785
+ async isDisabled() {
3786
+ return !!this.option.disabled || this.option.type === 'group' || this.option.type === 'subgroup';
3787
+ }
3788
+ optionClick;
3789
+ handleClick = (option, isSelected, event) => {
3790
+ event.stopPropagation();
3791
+ if (option.type === 'group' || option.type === 'subgroup') {
3792
+ this.optionClick.emit({
3793
+ option: this.option,
3794
+ isSelected,
3795
+ index: this.index,
3796
+ event,
3797
+ });
3798
+ return;
3799
+ }
3800
+ if (!this.option.disabled && !this.disabled) {
3801
+ this.optionClick.emit({
3802
+ option: this.option,
3803
+ isSelected,
3804
+ index: this.index,
3805
+ event,
3806
+ });
3807
+ }
3808
+ };
3809
+ render() {
3810
+ return (h("div", { key: 'd00236bc84a194509b25efa21ef1c53a25923a60', class: {
3811
+ 'sd-select__option-group': true,
3812
+ 'sd-select__option-group--selected': !!this.isSelected,
3813
+ 'sd-select__option-group--disabled': !!this.option.disabled,
3814
+ 'sd-select__option-group--focused': this.isFocused,
3815
+ 'sd-select__option-group--use-checkbox': this.useCheckbox,
3816
+ 'sd-select__option-group--group': this.option.type === 'group',
3817
+ 'sd-select__option-group--subgroup': this.option.type === 'subgroup',
3818
+ 'sd-select__option-group--item': this.option.type === 'item',
3819
+ }, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: 'c635bb5ce073594dd05926529472db1665d5f86d', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: '984289c89fe90f0cd40a3d022a29b9b974321db0', checked: this.isSelected, disabled: this.option.disabled, onClick: e => {
3820
+ e.preventDefault();
3821
+ this.handleClick(this.option, this.isSelected, e);
3822
+ } })), h("span", { key: 'b01a4ad8c906d6990dcf5c8eb1affa17f3605452', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: '9103fa0bfe93caf8b5c3dea936334cd22727dff0', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
3823
+ }
3824
+ };
3825
+ SdSelectOptionGroup.style = sdSelectOptionGroupCss();
3826
+
3318
3827
  const sdTableBackupCss = () => `.sd-table__wrapper .sd-table__container .sd-table__middle{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:horizontal{height:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:vertical{width:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-track{background-color:transparent}.sd-table__wrapper{height:var(--table-height, auto);width:var(--table-width, 100%);color:#222222}.sd-table__wrapper .sd-table__container{width:100%;height:var(--table-container-height, auto);position:relative;border:1px solid #e1e1e1;border-radius:8px;font-size:12px;overflow:hidden;background:#ffffff}.sd-table__wrapper .sd-table__container .sd-table__middle{overflow:auto;will-change:scroll-position;min-height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--scrollable{height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--loading{overflow:hidden !important;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle--loading__spinner{position:absolute;top:0;left:0;width:100%;height:var(--table-container-height, 100%);min-height:var(--table-container-height, 100%);background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll{position:relative;height:var(--total-virtual-height, --table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr:not([aria-hidden=true]){width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]{padding:0;border:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]:not(.sd-table__virtual-row-spacer) td{display:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable td.sd-td--selected,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable th.sd-th--selected{width:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-header thead{position:sticky;top:0;z-index:120}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-right{position:sticky;background-color:#f5faff;z-index:110 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-right{position:sticky;background-color:white;z-index:100 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-left{left:var(--sticky-left-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-right{right:var(--sticky-right-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-cell{position:sticky;z-index:102;background-color:#f5faff}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-cell{position:sticky;z-index:101;background-color:white}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead{opacity:0.4}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead tr th.sd-th{border-bottom:1px solid rgba(225, 225, 225, 0.4) !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-td,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-th,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table .sd-th__content--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead{height:36px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr{width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th{background:#f5faff;height:36px;padding:0 16px;font-weight:500;vertical-align:middle;border-bottom:1px solid #e1e1e1;-webkit-user-select:none;user-select:none;position:relative}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:4px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--left{justify-content:flex-start}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--center{justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--right{justify-content:flex-end}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:16px;cursor:col-resize;z-index:3;border-left:1px solid #cccccc;border-right:1px solid #cccccc}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td{height:44px;padding:0 16px;border-bottom:1px solid #e1e1e1;background:white;vertical-align:middle}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--left{text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--center{text-align:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--right{text-align:right}.sd-table__wrapper .sd-table__container .sd-table__bottom{background:white;text-align:center}.sd-table__wrapper .sd-table__container .sd-table__bottom .sd-table__no-data{padding-top:15%;color:#888888}.sd-table__wrapper .sd-table__pagination{position:relative;background:#f9f9f9;height:48px;display:flex;align-items:center;justify-content:center;border:1px solid #e1e1e1;border-top:none;border-radius:8px}.sd-table__wrapper .sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.sd-table__wrapper .sd-table__virtual-spacer,.sd-table__wrapper .sd-table__virtual-row-spacer{padding:0 !important}.sd-table__wrapper .sd-table__virtual-spacer td,.sd-table__wrapper .sd-table__virtual-row-spacer td{padding:0 !important;border:none}.sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton,.sd-table__wrapper .sd-table__virtual-row-spacer .sd-table__skeleton{width:100%;height:100%;background-image:repeating-linear-gradient(0deg, rgba(246, 246, 246, 0.3) 0px, rgba(225, 225, 225, 0.5) calc(var(--row-height, 44px) / 2), rgba(246, 246, 246, 0.3) var(--row-height, 44px));background-size:100% 200%;animation:skeleton-loading 1.5s ease-in-out infinite;position:relative}.sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton::before,.sd-table__wrapper .sd-table__virtual-row-spacer .sd-table__skeleton::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row-height, 44px) - 1px), #e1e1e1 calc(var(--row-height, 44px) - 1px), #e1e1e1 var(--row-height, 44px));pointer-events:none}.sd-table__wrapper .sd-table__skeleton-cell{width:100%;height:20px;background:linear-gradient(90deg, rgba(246, 246, 246, 0.3) 0%, rgba(225, 225, 225, 0.5) 50%, rgba(246, 246, 246, 0.3) 100%);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}@keyframes skeleton-loading{0%{background-position:0% 0%}50%{background-position:100% 100%}100%{background-position:0% 0%}}`;
3319
3828
 
3320
3829
  const SdTable = class {
@@ -4182,7 +4691,7 @@ const SdToggle = class {
4182
4691
  this.sdChange.emit(newValue);
4183
4692
  };
4184
4693
  render() {
4185
- return (h("label", { key: 'b21fce826c30404ab3f30cc27a1866d9a7745402', "aria-checked": this.isChecked.toString(), "aria-disabled": this.disabled.toString(), role: "switch", "aria-label": this.label || 'toggle', class: this.toggleClasses }, h("input", { key: '8bac810392c4aa1f0f04f13b37bc73210d70fe98', type: "checkbox", checked: this.isChecked, disabled: this.disabled, onInput: this.handleChange }), this.label && h("span", { key: '2d2949701bb4bf24dbbce2e296d8cb82606f6a62', class: "sd-toggle__label" }, this.label), h("div", { key: '42d39942bd284f3de320735a182bd53569782e1f', class: "sd-toggle__track" }, h("div", { key: 'b2decb4e6c1a1e9459621ea409fec24cf8695f4b', class: "sd-toggle__thumb" }))));
4694
+ return (h("label", { key: 'dda95f842f686a3f595db6ecb651551f717cab18', "aria-checked": this.isChecked.toString(), "aria-disabled": this.disabled.toString(), role: "switch", "aria-label": this.label || 'toggle', class: this.toggleClasses }, h("input", { key: 'a281a6572b7fca32242ba08ad45984445bd1a009', type: "checkbox", checked: this.isChecked, disabled: this.disabled, onInput: this.handleChange }), this.label && h("span", { key: 'dfae7796e9e421e7d6ebc6e6693e6266b2ff87cd', class: "sd-toggle__label" }, this.label), h("div", { key: 'e4343307f2df5f5c68509a3e9576a811bd9192ff', class: "sd-toggle__track" }, h("div", { key: 'be214081e5ccc21ad306e52ce186ba4dc56c6c3b', class: "sd-toggle__thumb" }))));
4186
4695
  }
4187
4696
  };
4188
4697
  SdToggle.style = sdToggleCss();
@@ -4226,7 +4735,7 @@ const SdToggleButton = class {
4226
4735
  this.sdChange.emit(newValue);
4227
4736
  };
4228
4737
  render() {
4229
- return (h("label", { key: 'ffa8699908132e9865ccd5b0dffafe6aa1265d8f', class: this.buttonClasses, role: "button", "aria-pressed": this.isActive.toString(), "aria-disabled": this.disabled.toString(), "aria-label": this.label || 'toggle button' }, this.label, h("input", { key: '772f24705287a4e7efac5f736b784dd3d9c0bf4d', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
4738
+ return (h("label", { key: '4ac2cac1d4b1da4d707f4ce84a03ffc7a8ec7cb8', class: this.buttonClasses, role: "button", "aria-pressed": this.isActive.toString(), "aria-disabled": this.disabled.toString(), "aria-label": this.label || 'toggle button' }, this.label, h("input", { key: 'e9a974d34d7b3803b5ed44dc1b2da1199daf5bef', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
4230
4739
  }
4231
4740
  };
4232
4741
  SdToggleButton.style = sdToggleButtonCss();
@@ -4279,20 +4788,20 @@ const SdTooltip = class {
4279
4788
  : {
4280
4789
  onClick: () => (this.showTooltip = !this.showTooltip),
4281
4790
  };
4282
- return (h(Fragment, { key: 'a4cd9f882795ef5b39a877b004e7d51fccecbfcb' }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-tooltip", ...handleTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-tooltip", ...handleTrigger })), this.showTooltip && (h("sd-tooltip-portal", { key: 'b9128e35e1f28869d0d163088f54b631c9104bf9', parentRef: this.buttonEl, onSdClose: () => this.handleClose(), placement: this.placement }, h("div", { key: '0a6db1e8478f25fd43735ac0cd8977ce2bce5ef6', class: {
4791
+ return (h(Fragment, { key: '55a62a0b80b8c10d8c0d8ced1a34178191b8a688' }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-tooltip", ...handleTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-tooltip", ...handleTrigger })), this.showTooltip && (h("sd-tooltip-portal", { key: '21aaf4460591401ec5eb890d123e3cb381fb76f6', parentRef: this.buttonEl, onSdClose: () => this.handleClose(), placement: this.placement }, h("div", { key: 'ee5d301a2fa72f95a0f89242b174f7e21a086a15', class: {
4283
4792
  'sd-tooltip-menu': true,
4284
4793
  [`sd-tooltip-menu--${this.type}`]: true,
4285
4794
  [`sd-tooltip-menu--${this.placement}`]: true,
4286
4795
  'sd-tooltip-menu--with-close': this.useClose,
4287
4796
  [`bg-${SdTooltip.COLOR_OF_TYPE[this.type].background}`]: true,
4288
4797
  [`text-${SdTooltip.COLOR_OF_TYPE[this.type].text}`]: true,
4289
- } }, h("i", { key: '176b79ce7db54479f2690aca9ae98252e1dfacd4', class: `sd-tooltip-menu__arrow sd-tooltip-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: 'aa1f0d7da5135713d1d51ed2852210895d707931', class: {
4798
+ } }, h("i", { key: '4f7e09f6770fbde0f2e9df81d401ea7cd6739df2', class: `sd-tooltip-menu__arrow sd-tooltip-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: 'd0856082e623129eb56aaab87e54d1b19f33555a', class: {
4290
4799
  [`text-${SdTooltip.COLOR_OF_TYPE[this.type].background}`]: true,
4291
- } })), h("div", { key: '147d42745d18180e92a81ed60404697afd6ea1e5', class: "sd-tooltip-menu__content", ref: el => {
4800
+ } })), h("div", { key: '40dc2a7d4254ed0e712f22cf19032e2f5ef846b4', class: "sd-tooltip-menu__content", ref: el => {
4292
4801
  if (el && this.slotContent && !el.hasChildNodes()) {
4293
4802
  el.appendChild(this.slotContent.cloneNode(true));
4294
4803
  }
4295
- } }, !this.slotContent && h("span", { key: '6204dc0ed996aa8c70cbb12a1388ed8ebce20552' }, this.el.textContent)), this.useClose && (h("div", { key: '7cb4aebb0077b2b17b78e2b2f82cfd90711cfc5f', class: "sd-tooltip-menu__close-button" }, h("button", { key: 'f14b75687492169c4c24e7840c9e0907b2161ea2', type: "button", "aria-label": "Close tooltip", title: "Close tooltip", onClick: () => this.handleClose() }, h("sd-icon", { key: 'fcf6ca6fa0c2a349ef0a6710399ab27e5ceffd3f', name: "close", size: "12", color: "#AAAAAA" })))))))));
4804
+ } }, !this.slotContent && h("span", { key: 'd897c210bb76de430a89243177f3a436cc684e09' }, this.el.textContent)), this.useClose && (h("div", { key: 'ca41d884070a25443833162e2dc50fcb91a6bd2a', class: "sd-tooltip-menu__close-button" }, h("button", { key: '75c911fa76787dda3346b4f18d6169304966d49b', type: "button", "aria-label": "Close tooltip", title: "Close tooltip", onClick: () => this.handleClose() }, h("sd-icon", { key: '4d737bf6cc2952776016b9bc7f11cf90364cdcdb', name: "close", size: "12", color: "#AAAAAA" })))))))));
4296
4805
  }
4297
4806
  };
4298
4807
  SdTooltip.style = sdTooltipCss();
@@ -4446,9 +4955,9 @@ const SdTooltipPortal = class {
4446
4955
  this.sdClose.emit();
4447
4956
  }
4448
4957
  render() {
4449
- return h("slot", { key: 'e6c37c753808b41beeeefa5f04bdf543a48eaa05' });
4958
+ return h("slot", { key: 'c389b848b1dc63a0484f6000ac5443cce752e4ac' });
4450
4959
  }
4451
4960
  };
4452
4961
 
4453
- export { SdButton as sd_button, SdCheckbox as sd_checkbox, SdFilePicker as sd_file_picker, SdGuide as sd_guide, SdIcon as sd_icon, SdInput as sd_input, SdLoadingSpinner as sd_loading_spinner, SdPagination as sd_pagination, SdPortal as sd_portal, SdRadioGroup as sd_radio_group, SdSelect as sd_select, SdSelectMultiple as sd_select_multiple, SdSelectOption as sd_select_option, SdTable as sd_table_backup, SdTabs as sd_tabs, SdTag as sd_tag, SdToastMessage as sd_toast_message, SdToggle as sd_toggle, SdToggleButton as sd_toggle_button, SdTooltip as sd_tooltip, SdTooltipPortal as sd_tooltip_portal };
4454
- //# sourceMappingURL=sd-button.sd-checkbox.sd-file-picker.sd-guide.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-radio-group.sd-select.sd-select-multiple.sd-select-option.sd-table-backup.sd-tabs.sd-tag.sd-toast-message.sd-toggle.sd-toggle-button.sd-tooltip.sd-tooltip-portal.entry.js.map
4962
+ export { SdButton as sd_button, SdCheckbox as sd_checkbox, SdFilePicker as sd_file_picker, SdGuide as sd_guide, SdIcon as sd_icon, SdInput as sd_input, SdLoadingSpinner as sd_loading_spinner, SdNumberInput as sd_number_input, SdPagination as sd_pagination, SdPortal as sd_portal, SdRadioGroup as sd_radio_group, SdSelect as sd_select, SdSelectMultipleGroup as sd_select_multiple_group, SdSelectOption as sd_select_option, SdSelectOptionGroup as sd_select_option_group, SdTable as sd_table_backup, SdTabs as sd_tabs, SdTag as sd_tag, SdToastMessage as sd_toast_message, SdToggle as sd_toggle, SdToggleButton as sd_toggle_button, SdTooltip as sd_tooltip, SdTooltipPortal as sd_tooltip_portal };
4963
+ //# sourceMappingURL=sd-button.sd-checkbox.sd-file-picker.sd-guide.sd-icon.sd-input.sd-loading-spinner.sd-number-input.sd-pagination.sd-portal.sd-radio-group.sd-select.sd-select-multiple-group.sd-select-option.sd-select-option-group.sd-table-backup.sd-tabs.sd-tag.sd-toast-message.sd-toggle.sd-toggle-button.sd-tooltip.sd-tooltip-portal.entry.js.map