@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/README.md +113 -0
- package/dist/index.cjs +70 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +70 -12
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +70 -12
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2769,8 +2769,14 @@ class EnhancedSelect extends HTMLElement {
|
|
|
2769
2769
|
--select-multi-separator-inset-block: 10px;
|
|
2770
2770
|
--select-multi-action-surface-bg: var(--select-input-bg, var(--select-surface));
|
|
2771
2771
|
--select-multi-action-divider: 1px solid var(--select-border);
|
|
2772
|
+
--select-separator-width: 1px;
|
|
2773
|
+
--select-separator-height: 50%;
|
|
2774
|
+
--select-separator-display: block;
|
|
2772
2775
|
--select-separator-opacity: 0.6;
|
|
2773
2776
|
--select-separator-active-opacity: 1;
|
|
2777
|
+
--select-separator-width: 1px;
|
|
2778
|
+
--select-separator-height: 50%;
|
|
2779
|
+
--select-separator-display: block;
|
|
2774
2780
|
--select-separator-position: var(--select-arrow-width, 42px);
|
|
2775
2781
|
--select-separator-position-with-clear: calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px));
|
|
2776
2782
|
--select-separator-dark-bg: linear-gradient(
|
|
@@ -2799,9 +2805,16 @@ class EnhancedSelect extends HTMLElement {
|
|
|
2799
2805
|
--select-dropdown-transform-origin: top center;
|
|
2800
2806
|
--select-scrollbar-width: 6px;
|
|
2801
2807
|
--select-scrollbar-thumb-radius: 3px;
|
|
2808
|
+
--select-option-hover-enabled: 1;
|
|
2802
2809
|
--select-option-hover-transform: translateX(2px);
|
|
2803
2810
|
--select-option-font-weight: 450;
|
|
2804
2811
|
--select-option-margin: 2px 0;
|
|
2812
|
+
--select-input-font-size: inherit;
|
|
2813
|
+
--select-input-font-weight: 400;
|
|
2814
|
+
--select-multi-container-padding: 6px;
|
|
2815
|
+
--select-input-font-size: inherit;
|
|
2816
|
+
--select-input-font-weight: 400;
|
|
2817
|
+
--select-multi-container-padding: 6px;
|
|
2805
2818
|
--select-option-disabled-opacity: 0.5;
|
|
2806
2819
|
--select-option-disabled-cursor: not-allowed;
|
|
2807
2820
|
--select-option-active-outline-offset: -2px;
|
|
@@ -3038,9 +3051,13 @@ class EnhancedSelect extends HTMLElement {
|
|
|
3038
3051
|
min-height: var(--select-input-min-height, 48px);
|
|
3039
3052
|
max-height: var(--select-input-max-height, 160px);
|
|
3040
3053
|
overflow: hidden;
|
|
3054
|
+
padding: var(--select-multi-container-padding, 6px);
|
|
3041
3055
|
align-content: var(--select-input-align-content, center);
|
|
3042
3056
|
text-align: var(--select-input-text-align, start);
|
|
3043
3057
|
background: var(--select-input-bg, var(--select-surface));
|
|
3058
|
+
font-size: var(--select-input-font-size, inherit);
|
|
3059
|
+
font-weight: var(--select-input-font-weight, 400);
|
|
3060
|
+
font-weight: var(--select-input-font-weight, 400);
|
|
3044
3061
|
border: var(--select-input-border, 1.5px solid var(--select-border));
|
|
3045
3062
|
border-radius: var(--select-input-border-radius, var(--select-radius-md));
|
|
3046
3063
|
box-shadow: var(--select-shadow-sm);
|
|
@@ -3160,6 +3177,7 @@ class EnhancedSelect extends HTMLElement {
|
|
|
3160
3177
|
/* Elegant separator line before arrow */
|
|
3161
3178
|
.input-container::after {
|
|
3162
3179
|
content: '';
|
|
3180
|
+
display: var(--select-separator-display, block);
|
|
3163
3181
|
position: absolute;
|
|
3164
3182
|
top: 50%;
|
|
3165
3183
|
right: var(--select-separator-position, var(--select-arrow-width, 42px));
|
|
@@ -3476,22 +3494,26 @@ class EnhancedSelect extends HTMLElement {
|
|
|
3476
3494
|
───────────────────────────────────────────────────────────────────────── */
|
|
3477
3495
|
|
|
3478
3496
|
.group-header {
|
|
3479
|
-
padding: var(--select-group-header-padding, 10px 12px
|
|
3480
|
-
margin: var(--select-group-header-margin, 0);
|
|
3497
|
+
padding: var(--select-group-header-padding, 10px 12px 8px 12px);
|
|
3498
|
+
margin: var(--select-group-header-margin, 0 calc(var(--select-options-padding, 6px) * -1));
|
|
3481
3499
|
font-weight: var(--select-group-header-weight, 600);
|
|
3482
3500
|
color: var(--select-group-header-color, var(--select-text-muted));
|
|
3483
|
-
background
|
|
3501
|
+
background: var(--select-group-header-bg, #ffffff);
|
|
3484
3502
|
text-align: var(--select-group-header-text-align, left);
|
|
3485
3503
|
font-size: var(--select-group-header-font-size, 0.7333em);
|
|
3486
3504
|
text-transform: var(--select-group-header-text-transform, uppercase);
|
|
3487
3505
|
letter-spacing: var(--select-group-header-letter-spacing, 0.08em);
|
|
3488
3506
|
position: sticky;
|
|
3489
|
-
top:
|
|
3490
|
-
|
|
3507
|
+
top: calc(var(--select-options-padding, 6px) * -1);
|
|
3508
|
+
left: 0;
|
|
3509
|
+
right: 0;
|
|
3510
|
+
z-index: 100;
|
|
3491
3511
|
border: var(--select-group-header-border, none);
|
|
3492
|
-
border-bottom: var(--select-group-header-border-bottom,
|
|
3512
|
+
border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(0, 0, 0, 0.08));
|
|
3493
3513
|
border-radius: var(--select-group-header-border-radius, 0);
|
|
3494
|
-
box-shadow: var(--select-group-header-shadow,
|
|
3514
|
+
box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));
|
|
3515
|
+
/* Force solid background to prevent option bleed-through */
|
|
3516
|
+
isolation: isolate;
|
|
3495
3517
|
}
|
|
3496
3518
|
|
|
3497
3519
|
.group-header:not(:first-child) {
|
|
@@ -3527,10 +3549,10 @@ class EnhancedSelect extends HTMLElement {
|
|
|
3527
3549
|
}
|
|
3528
3550
|
|
|
3529
3551
|
.option:hover {
|
|
3530
|
-
background: var(--select-option-hover-bg, var(--select-surface-elevated));
|
|
3531
|
-
border: var(--select-option-hover-border, var(--select-option-border, none));
|
|
3532
|
-
color: var(--select-option-hover-color, var(--select-text));
|
|
3533
|
-
transform: var(--select-option-hover-transform);
|
|
3552
|
+
background: calc(var(--select-option-hover-enabled, 1) * 1) > 0 ? var(--select-option-hover-bg, var(--select-surface-elevated)) : var(--select-option-bg, transparent);
|
|
3553
|
+
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);
|
|
3554
|
+
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));
|
|
3555
|
+
transform: calc(var(--select-option-hover-enabled, 1) * 1) > 0 ? var(--select-option-hover-transform) : none;
|
|
3534
3556
|
}
|
|
3535
3557
|
|
|
3536
3558
|
.option.selected {
|
|
@@ -3794,6 +3816,22 @@ class EnhancedSelect extends HTMLElement {
|
|
|
3794
3816
|
|
|
3795
3817
|
--select-dropdown-bg: var(--select-dark-dropdown-bg, var(--select-surface));
|
|
3796
3818
|
|
|
3819
|
+
--select-arrow-color: var(--select-dark-arrow-color, #9ca3af);
|
|
3820
|
+
--select-arrow-hover-color: var(--select-dark-arrow-hover-color, #f5f5f5);
|
|
3821
|
+
--select-arrow-bg: var(--select-dark-arrow-bg, transparent);
|
|
3822
|
+
--select-arrow-hover-bg: var(--select-dark-arrow-hover-bg, rgba(156, 163, 175, 0.15));
|
|
3823
|
+
|
|
3824
|
+
--select-separator-bg: var(--select-dark-separator-bg, var(--select-separator-dark-bg));
|
|
3825
|
+
--select-separator-width: var(--select-dark-separator-width, 1px);
|
|
3826
|
+
|
|
3827
|
+
--select-badge-bg: var(--select-dark-badge-bg, rgba(99, 102, 241, 0.2));
|
|
3828
|
+
--select-badge-color: var(--select-dark-badge-color, #e0e7ff);
|
|
3829
|
+
|
|
3830
|
+
--select-group-header-bg: var(--select-group-header-dark-bg, #1a1a2e);
|
|
3831
|
+
--select-group-header-color: var(--select-group-header-dark-color, #9ca3af);
|
|
3832
|
+
|
|
3833
|
+
--select-empty-color: var(--select-dark-empty-color, #9ca3af);
|
|
3834
|
+
|
|
3797
3835
|
--select-option-bg: var(--select-dark-option-bg, transparent);
|
|
3798
3836
|
--select-option-color: var(--select-dark-option-color, var(--select-text));
|
|
3799
3837
|
--select-option-hover-bg: var(--select-dark-option-hover-bg, var(--select-surface-elevated));
|
|
@@ -3891,6 +3929,22 @@ class EnhancedSelect extends HTMLElement {
|
|
|
3891
3929
|
border-top-color: var(--select-border);
|
|
3892
3930
|
}
|
|
3893
3931
|
|
|
3932
|
+
:host(.dark-mode) .group-header,
|
|
3933
|
+
:host([dark-mode]) .group-header,
|
|
3934
|
+
:host([darkmode]) .group-header,
|
|
3935
|
+
:host([data-theme="dark"]) .group-header,
|
|
3936
|
+
:host([theme="dark"]) .group-header,
|
|
3937
|
+
:host-context(.dark-mode) .group-header,
|
|
3938
|
+
:host-context(.dark) .group-header,
|
|
3939
|
+
:host-context([dark-mode]) .group-header,
|
|
3940
|
+
:host-context([darkmode]) .group-header,
|
|
3941
|
+
:host-context([data-theme="dark"]) .group-header,
|
|
3942
|
+
:host-context([theme="dark"]) .group-header {
|
|
3943
|
+
background: var(--select-group-header-bg, #1a1a2e);
|
|
3944
|
+
border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(255, 255, 255, 0.08));
|
|
3945
|
+
box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.3));
|
|
3946
|
+
}
|
|
3947
|
+
|
|
3894
3948
|
:host(.dark-mode) .option.selected::before,
|
|
3895
3949
|
:host([dark-mode]) .option.selected::before,
|
|
3896
3950
|
:host([darkmode]) .option.selected::before,
|
|
@@ -4485,8 +4539,12 @@ class EnhancedSelect extends HTMLElement {
|
|
|
4485
4539
|
}
|
|
4486
4540
|
break;
|
|
4487
4541
|
case 'Enter':
|
|
4542
|
+
case ' ':
|
|
4488
4543
|
e.preventDefault();
|
|
4489
|
-
if (this._state.
|
|
4544
|
+
if (!this._state.isOpen) {
|
|
4545
|
+
this._handleOpen();
|
|
4546
|
+
}
|
|
4547
|
+
else if (this._state.activeIndex >= 0) {
|
|
4490
4548
|
this._selectOption(this._state.activeIndex, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });
|
|
4491
4549
|
}
|
|
4492
4550
|
break;
|