@smilodon/core 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -2775,8 +2775,14 @@
2775
2775
  --select-multi-separator-inset-block: 10px;
2776
2776
  --select-multi-action-surface-bg: var(--select-input-bg, var(--select-surface));
2777
2777
  --select-multi-action-divider: 1px solid var(--select-border);
2778
+ --select-separator-width: 1px;
2779
+ --select-separator-height: 50%;
2780
+ --select-separator-display: block;
2778
2781
  --select-separator-opacity: 0.6;
2779
2782
  --select-separator-active-opacity: 1;
2783
+ --select-separator-width: 1px;
2784
+ --select-separator-height: 50%;
2785
+ --select-separator-display: block;
2780
2786
  --select-separator-position: var(--select-arrow-width, 42px);
2781
2787
  --select-separator-position-with-clear: calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px));
2782
2788
  --select-separator-dark-bg: linear-gradient(
@@ -2805,9 +2811,16 @@
2805
2811
  --select-dropdown-transform-origin: top center;
2806
2812
  --select-scrollbar-width: 6px;
2807
2813
  --select-scrollbar-thumb-radius: 3px;
2814
+ --select-option-hover-enabled: 1;
2808
2815
  --select-option-hover-transform: translateX(2px);
2809
2816
  --select-option-font-weight: 450;
2810
2817
  --select-option-margin: 2px 0;
2818
+ --select-input-font-size: inherit;
2819
+ --select-input-font-weight: 400;
2820
+ --select-multi-container-padding: 6px;
2821
+ --select-input-font-size: inherit;
2822
+ --select-input-font-weight: 400;
2823
+ --select-multi-container-padding: 6px;
2811
2824
  --select-option-disabled-opacity: 0.5;
2812
2825
  --select-option-disabled-cursor: not-allowed;
2813
2826
  --select-option-active-outline-offset: -2px;
@@ -3044,9 +3057,13 @@
3044
3057
  min-height: var(--select-input-min-height, 48px);
3045
3058
  max-height: var(--select-input-max-height, 160px);
3046
3059
  overflow: hidden;
3060
+ padding: var(--select-multi-container-padding, 6px);
3047
3061
  align-content: var(--select-input-align-content, center);
3048
3062
  text-align: var(--select-input-text-align, start);
3049
3063
  background: var(--select-input-bg, var(--select-surface));
3064
+ font-size: var(--select-input-font-size, inherit);
3065
+ font-weight: var(--select-input-font-weight, 400);
3066
+ font-weight: var(--select-input-font-weight, 400);
3050
3067
  border: var(--select-input-border, 1.5px solid var(--select-border));
3051
3068
  border-radius: var(--select-input-border-radius, var(--select-radius-md));
3052
3069
  box-shadow: var(--select-shadow-sm);
@@ -3166,6 +3183,7 @@
3166
3183
  /* Elegant separator line before arrow */
3167
3184
  .input-container::after {
3168
3185
  content: '';
3186
+ display: var(--select-separator-display, block);
3169
3187
  position: absolute;
3170
3188
  top: 50%;
3171
3189
  right: var(--select-separator-position, var(--select-arrow-width, 42px));
@@ -3482,22 +3500,26 @@
3482
3500
  ───────────────────────────────────────────────────────────────────────── */
3483
3501
 
3484
3502
  .group-header {
3485
- padding: var(--select-group-header-padding, 10px 12px 6px);
3486
- margin: var(--select-group-header-margin, 0);
3503
+ padding: var(--select-group-header-padding, 10px 12px 8px 12px);
3504
+ margin: var(--select-group-header-margin, 0 calc(var(--select-options-padding, 6px) * -1));
3487
3505
  font-weight: var(--select-group-header-weight, 600);
3488
3506
  color: var(--select-group-header-color, var(--select-text-muted));
3489
- background-color: var(--select-group-header-bg, var(--select-surface));
3507
+ background: var(--select-group-header-bg, #ffffff);
3490
3508
  text-align: var(--select-group-header-text-align, left);
3491
3509
  font-size: var(--select-group-header-font-size, 0.7333em);
3492
3510
  text-transform: var(--select-group-header-text-transform, uppercase);
3493
3511
  letter-spacing: var(--select-group-header-letter-spacing, 0.08em);
3494
3512
  position: sticky;
3495
- top: 0;
3496
- z-index: 1;
3513
+ top: calc(var(--select-options-padding, 6px) * -1);
3514
+ left: 0;
3515
+ right: 0;
3516
+ z-index: 100;
3497
3517
  border: var(--select-group-header-border, none);
3498
- border-bottom: var(--select-group-header-border-bottom, none);
3518
+ border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(0, 0, 0, 0.08));
3499
3519
  border-radius: var(--select-group-header-border-radius, 0);
3500
- box-shadow: var(--select-group-header-shadow, none);
3520
+ box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));
3521
+ /* Force solid background to prevent option bleed-through */
3522
+ isolation: isolate;
3501
3523
  }
3502
3524
 
3503
3525
  .group-header:not(:first-child) {
@@ -3533,10 +3555,10 @@
3533
3555
  }
3534
3556
 
3535
3557
  .option:hover {
3536
- background: var(--select-option-hover-bg, var(--select-surface-elevated));
3537
- border: var(--select-option-hover-border, var(--select-option-border, none));
3538
- color: var(--select-option-hover-color, var(--select-text));
3539
- transform: var(--select-option-hover-transform);
3558
+ background: calc(var(--select-option-hover-enabled, 1) * 1) > 0 ? var(--select-option-hover-bg, var(--select-surface-elevated)) : var(--select-option-bg, transparent);
3559
+ border: calc(var(--select-option-hover-enabled, 1) * 1) > 0 ? var(--select-option-hover-border, var(--select-option-border, none)) : var(--select-option-border, none);
3560
+ color: calc(var(--select-option-hover-enabled, 1) * 1) > 0 ? var(--select-option-hover-color, var(--select-text)) : var(--select-option-color, var(--select-text));
3561
+ transform: calc(var(--select-option-hover-enabled, 1) * 1) > 0 ? var(--select-option-hover-transform) : none;
3540
3562
  }
3541
3563
 
3542
3564
  .option.selected {
@@ -3800,6 +3822,22 @@
3800
3822
 
3801
3823
  --select-dropdown-bg: var(--select-dark-dropdown-bg, var(--select-surface));
3802
3824
 
3825
+ --select-arrow-color: var(--select-dark-arrow-color, #9ca3af);
3826
+ --select-arrow-hover-color: var(--select-dark-arrow-hover-color, #f5f5f5);
3827
+ --select-arrow-bg: var(--select-dark-arrow-bg, transparent);
3828
+ --select-arrow-hover-bg: var(--select-dark-arrow-hover-bg, rgba(156, 163, 175, 0.15));
3829
+
3830
+ --select-separator-bg: var(--select-dark-separator-bg, var(--select-separator-dark-bg));
3831
+ --select-separator-width: var(--select-dark-separator-width, 1px);
3832
+
3833
+ --select-badge-bg: var(--select-dark-badge-bg, rgba(99, 102, 241, 0.2));
3834
+ --select-badge-color: var(--select-dark-badge-color, #e0e7ff);
3835
+
3836
+ --select-group-header-bg: var(--select-group-header-dark-bg, #1a1a2e);
3837
+ --select-group-header-color: var(--select-group-header-dark-color, #9ca3af);
3838
+
3839
+ --select-empty-color: var(--select-dark-empty-color, #9ca3af);
3840
+
3803
3841
  --select-option-bg: var(--select-dark-option-bg, transparent);
3804
3842
  --select-option-color: var(--select-dark-option-color, var(--select-text));
3805
3843
  --select-option-hover-bg: var(--select-dark-option-hover-bg, var(--select-surface-elevated));
@@ -3897,6 +3935,22 @@
3897
3935
  border-top-color: var(--select-border);
3898
3936
  }
3899
3937
 
3938
+ :host(.dark-mode) .group-header,
3939
+ :host([dark-mode]) .group-header,
3940
+ :host([darkmode]) .group-header,
3941
+ :host([data-theme="dark"]) .group-header,
3942
+ :host([theme="dark"]) .group-header,
3943
+ :host-context(.dark-mode) .group-header,
3944
+ :host-context(.dark) .group-header,
3945
+ :host-context([dark-mode]) .group-header,
3946
+ :host-context([darkmode]) .group-header,
3947
+ :host-context([data-theme="dark"]) .group-header,
3948
+ :host-context([theme="dark"]) .group-header {
3949
+ background: var(--select-group-header-bg, #1a1a2e);
3950
+ border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(255, 255, 255, 0.08));
3951
+ box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.3));
3952
+ }
3953
+
3900
3954
  :host(.dark-mode) .option.selected::before,
3901
3955
  :host([dark-mode]) .option.selected::before,
3902
3956
  :host([darkmode]) .option.selected::before,
@@ -4491,8 +4545,12 @@
4491
4545
  }
4492
4546
  break;
4493
4547
  case 'Enter':
4548
+ case ' ':
4494
4549
  e.preventDefault();
4495
- if (this._state.activeIndex >= 0) {
4550
+ if (!this._state.isOpen) {
4551
+ this._handleOpen();
4552
+ }
4553
+ else if (this._state.activeIndex >= 0) {
4496
4554
  this._selectOption(this._state.activeIndex, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });
4497
4555
  }
4498
4556
  break;