@smilodon/core 1.3.3 → 1.3.5
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 +192 -10
- package/dist/index.cjs +117 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +117 -72
- 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 +117 -72
- 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
|
@@ -1666,19 +1666,19 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1666
1666
|
display: flex;
|
|
1667
1667
|
align-items: center;
|
|
1668
1668
|
flex-wrap: wrap;
|
|
1669
|
-
gap: 6px;
|
|
1670
|
-
padding: 6px 52px 6px 8px;
|
|
1671
|
-
min-height: 44px;
|
|
1672
|
-
background: white;
|
|
1673
|
-
border: 1px solid #d1d5db;
|
|
1674
|
-
border-radius: 6px;
|
|
1669
|
+
gap: var(--select-input-gap, 6px);
|
|
1670
|
+
padding: var(--select-input-padding, 6px 52px 6px 8px);
|
|
1671
|
+
min-height: var(--select-input-min-height, 44px);
|
|
1672
|
+
background: var(--select-input-bg, white);
|
|
1673
|
+
border: var(--select-input-border, 1px solid #d1d5db);
|
|
1674
|
+
border-radius: var(--select-input-border-radius, 6px);
|
|
1675
1675
|
box-sizing: border-box;
|
|
1676
1676
|
transition: all 0.2s ease;
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
1679
|
.input-container:focus-within {
|
|
1680
|
-
border-color: #667eea;
|
|
1681
|
-
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
|
1680
|
+
border-color: var(--select-input-focus-border, #667eea);
|
|
1681
|
+
box-shadow: var(--select-input-focus-shadow, 0 0 0 3px rgba(102, 126, 234, 0.1));
|
|
1682
1682
|
}
|
|
1683
1683
|
|
|
1684
1684
|
/* Gradient separator before arrow */
|
|
@@ -1686,17 +1686,17 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1686
1686
|
content: '';
|
|
1687
1687
|
position: absolute;
|
|
1688
1688
|
top: 50%;
|
|
1689
|
-
right: 40px;
|
|
1689
|
+
right: var(--select-separator-position, 40px);
|
|
1690
1690
|
transform: translateY(-50%);
|
|
1691
|
-
width: 1px;
|
|
1692
|
-
height: 60
|
|
1693
|
-
background: linear-gradient(
|
|
1691
|
+
width: var(--select-separator-width, 1px);
|
|
1692
|
+
height: var(--select-separator-height, 60%);
|
|
1693
|
+
background: var(--select-separator-gradient, linear-gradient(
|
|
1694
1694
|
to bottom,
|
|
1695
1695
|
transparent 0%,
|
|
1696
1696
|
rgba(0, 0, 0, 0.1) 20%,
|
|
1697
1697
|
rgba(0, 0, 0, 0.1) 80%,
|
|
1698
1698
|
transparent 100%
|
|
1699
|
-
);
|
|
1699
|
+
));
|
|
1700
1700
|
pointer-events: none;
|
|
1701
1701
|
z-index: 1;
|
|
1702
1702
|
}
|
|
@@ -1706,30 +1706,30 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1706
1706
|
top: 0;
|
|
1707
1707
|
right: 0;
|
|
1708
1708
|
bottom: 0;
|
|
1709
|
-
width: 40px;
|
|
1709
|
+
width: var(--select-arrow-width, 40px);
|
|
1710
1710
|
display: flex;
|
|
1711
1711
|
align-items: center;
|
|
1712
1712
|
justify-content: center;
|
|
1713
1713
|
cursor: pointer;
|
|
1714
1714
|
transition: background-color 0.2s ease;
|
|
1715
|
-
border-radius: 0 4px 4px 0;
|
|
1715
|
+
border-radius: var(--select-arrow-border-radius, 0 4px 4px 0);
|
|
1716
1716
|
z-index: 2;
|
|
1717
1717
|
}
|
|
1718
1718
|
|
|
1719
1719
|
.dropdown-arrow-container:hover {
|
|
1720
|
-
background-color: rgba(102, 126, 234, 0.08);
|
|
1720
|
+
background-color: var(--select-arrow-hover-bg, rgba(102, 126, 234, 0.08));
|
|
1721
1721
|
}
|
|
1722
1722
|
|
|
1723
1723
|
.dropdown-arrow {
|
|
1724
|
-
width: 16px;
|
|
1725
|
-
height: 16px;
|
|
1726
|
-
color: #667eea;
|
|
1724
|
+
width: var(--select-arrow-size, 16px);
|
|
1725
|
+
height: var(--select-arrow-size, 16px);
|
|
1726
|
+
color: var(--select-arrow-color, #667eea);
|
|
1727
1727
|
transition: transform 0.2s ease, color 0.2s ease;
|
|
1728
1728
|
transform: translateY(0);
|
|
1729
1729
|
}
|
|
1730
1730
|
|
|
1731
1731
|
.dropdown-arrow-container:hover .dropdown-arrow {
|
|
1732
|
-
color: #667eea;
|
|
1732
|
+
color: var(--select-arrow-hover-color, #667eea);
|
|
1733
1733
|
}
|
|
1734
1734
|
|
|
1735
1735
|
.dropdown-arrow.open {
|
|
@@ -1738,31 +1738,32 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1738
1738
|
|
|
1739
1739
|
.select-input {
|
|
1740
1740
|
flex: 1;
|
|
1741
|
-
min-width: 120px;
|
|
1742
|
-
padding: 4px;
|
|
1741
|
+
min-width: var(--select-input-min-width, 120px);
|
|
1742
|
+
padding: var(--select-input-field-padding, 4px);
|
|
1743
1743
|
border: none;
|
|
1744
|
-
font-size: 14px;
|
|
1745
|
-
line-height: 1.5;
|
|
1746
|
-
color: #1f2937;
|
|
1744
|
+
font-size: var(--select-input-font-size, 14px);
|
|
1745
|
+
line-height: var(--select-input-line-height, 1.5);
|
|
1746
|
+
color: var(--select-input-color, #1f2937);
|
|
1747
1747
|
background: transparent;
|
|
1748
1748
|
box-sizing: border-box;
|
|
1749
1749
|
outline: none;
|
|
1750
|
+
font-family: var(--select-font-family, inherit);
|
|
1750
1751
|
}
|
|
1751
1752
|
|
|
1752
1753
|
.select-input::placeholder {
|
|
1753
|
-
color: #9ca3af;
|
|
1754
|
+
color: var(--select-input-placeholder-color, #9ca3af);
|
|
1754
1755
|
}
|
|
1755
1756
|
|
|
1756
1757
|
.selection-badge {
|
|
1757
1758
|
display: inline-flex;
|
|
1758
1759
|
align-items: center;
|
|
1759
|
-
gap: 4px;
|
|
1760
|
-
padding: 4px 8px;
|
|
1761
|
-
margin: 2px;
|
|
1762
|
-
background: #667eea;
|
|
1763
|
-
color: white;
|
|
1764
|
-
border-radius: 4px;
|
|
1765
|
-
font-size: 13px;
|
|
1760
|
+
gap: var(--select-badge-gap, 4px);
|
|
1761
|
+
padding: var(--select-badge-padding, 4px 8px);
|
|
1762
|
+
margin: var(--select-badge-margin, 2px);
|
|
1763
|
+
background: var(--select-badge-bg, #667eea);
|
|
1764
|
+
color: var(--select-badge-color, white);
|
|
1765
|
+
border-radius: var(--select-badge-border-radius, 4px);
|
|
1766
|
+
font-size: var(--select-badge-font-size, 13px);
|
|
1766
1767
|
line-height: 1;
|
|
1767
1768
|
}
|
|
1768
1769
|
|
|
@@ -1770,22 +1771,22 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1770
1771
|
display: inline-flex;
|
|
1771
1772
|
align-items: center;
|
|
1772
1773
|
justify-content: center;
|
|
1773
|
-
width: 16px;
|
|
1774
|
-
height: 16px;
|
|
1774
|
+
width: var(--select-badge-remove-size, 16px);
|
|
1775
|
+
height: var(--select-badge-remove-size, 16px);
|
|
1775
1776
|
padding: 0;
|
|
1776
1777
|
margin-left: 4px;
|
|
1777
|
-
background: rgba(255, 255, 255, 0.3);
|
|
1778
|
+
background: var(--select-badge-remove-bg, rgba(255, 255, 255, 0.3));
|
|
1778
1779
|
border: none;
|
|
1779
1780
|
border-radius: 50%;
|
|
1780
|
-
color: white;
|
|
1781
|
-
font-size: 16px;
|
|
1781
|
+
color: var(--select-badge-remove-color, white);
|
|
1782
|
+
font-size: var(--select-badge-remove-font-size, 16px);
|
|
1782
1783
|
line-height: 1;
|
|
1783
1784
|
cursor: pointer;
|
|
1784
1785
|
transition: background 0.2s;
|
|
1785
1786
|
}
|
|
1786
1787
|
|
|
1787
1788
|
.badge-remove:hover {
|
|
1788
|
-
background: rgba(255, 255, 255, 0.5);
|
|
1789
|
+
background: var(--select-badge-remove-hover-bg, rgba(255, 255, 255, 0.5));
|
|
1789
1790
|
}
|
|
1790
1791
|
|
|
1791
1792
|
.select-input:disabled {
|
|
@@ -1799,59 +1800,68 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1799
1800
|
top: 100%;
|
|
1800
1801
|
left: 0;
|
|
1801
1802
|
right: 0;
|
|
1802
|
-
margin-top: 4px;
|
|
1803
|
-
max-height: 300px;
|
|
1803
|
+
margin-top: var(--select-dropdown-margin-top, 4px);
|
|
1804
|
+
max-height: var(--select-dropdown-max-height, 300px);
|
|
1804
1805
|
overflow: hidden;
|
|
1805
1806
|
background: var(--select-dropdown-bg, white);
|
|
1806
|
-
border:
|
|
1807
|
-
border-radius: var(--select-border-radius, 4px);
|
|
1807
|
+
border: var(--select-dropdown-border, 1px solid #ccc);
|
|
1808
|
+
border-radius: var(--select-dropdown-border-radius, 4px);
|
|
1808
1809
|
box-shadow: var(--select-dropdown-shadow, 0 4px 6px rgba(0,0,0,0.1));
|
|
1809
1810
|
z-index: var(--select-dropdown-z-index, 1000);
|
|
1810
1811
|
}
|
|
1811
1812
|
|
|
1812
1813
|
.options-container {
|
|
1813
1814
|
position: relative;
|
|
1814
|
-
max-height: 300px;
|
|
1815
|
+
max-height: var(--select-options-max-height, 300px);
|
|
1815
1816
|
overflow: auto;
|
|
1816
1817
|
transition: opacity 0.2s ease-in-out;
|
|
1818
|
+
background: var(--select-options-bg, white);
|
|
1817
1819
|
}
|
|
1818
1820
|
|
|
1819
1821
|
.option {
|
|
1820
|
-
padding: 8px 12px;
|
|
1822
|
+
padding: var(--select-option-padding, 8px 12px);
|
|
1821
1823
|
cursor: pointer;
|
|
1822
|
-
color:
|
|
1823
|
-
|
|
1824
|
+
color: var(--select-option-color, #1f2937);
|
|
1825
|
+
background: var(--select-option-bg, white);
|
|
1826
|
+
transition: var(--select-option-transition, background-color 0.15s ease);
|
|
1824
1827
|
user-select: none;
|
|
1828
|
+
font-size: var(--select-option-font-size, 14px);
|
|
1829
|
+
line-height: var(--select-option-line-height, 1.5);
|
|
1830
|
+
border-bottom: var(--select-option-border-bottom, none);
|
|
1825
1831
|
}
|
|
1826
1832
|
|
|
1827
1833
|
.option:hover {
|
|
1828
|
-
background-color: #f3f4f6;
|
|
1834
|
+
background-color: var(--select-option-hover-bg, #f3f4f6);
|
|
1835
|
+
color: var(--select-option-hover-color, #1f2937);
|
|
1829
1836
|
}
|
|
1830
1837
|
|
|
1831
1838
|
.option.selected {
|
|
1832
|
-
background-color: #e0e7ff;
|
|
1833
|
-
color: #4338ca;
|
|
1834
|
-
font-weight: 500;
|
|
1839
|
+
background-color: var(--select-option-selected-bg, #e0e7ff);
|
|
1840
|
+
color: var(--select-option-selected-color, #4338ca);
|
|
1841
|
+
font-weight: var(--select-option-selected-weight, 500);
|
|
1835
1842
|
}
|
|
1836
1843
|
|
|
1837
1844
|
.option.active {
|
|
1838
|
-
background-color: #f3f4f6;
|
|
1845
|
+
background-color: var(--select-option-active-bg, #f3f4f6);
|
|
1846
|
+
color: var(--select-option-active-color, #1f2937);
|
|
1839
1847
|
}
|
|
1840
1848
|
|
|
1841
1849
|
.load-more-container {
|
|
1842
|
-
padding: 12px;
|
|
1850
|
+
padding: var(--select-load-more-padding, 12px);
|
|
1843
1851
|
text-align: center;
|
|
1844
|
-
border-top:
|
|
1852
|
+
border-top: var(--select-divider-border, 1px solid #e0e0e0);
|
|
1853
|
+
background: var(--select-load-more-bg, white);
|
|
1845
1854
|
}
|
|
1846
1855
|
|
|
1847
1856
|
.load-more-button {
|
|
1848
|
-
padding: 8px 16px;
|
|
1849
|
-
border:
|
|
1857
|
+
padding: var(--select-button-padding, 8px 16px);
|
|
1858
|
+
border: var(--select-button-border, 1px solid #1976d2);
|
|
1850
1859
|
background: var(--select-button-bg, white);
|
|
1851
1860
|
color: var(--select-button-color, #1976d2);
|
|
1852
|
-
border-radius: 4px;
|
|
1861
|
+
border-radius: var(--select-button-border-radius, 4px);
|
|
1853
1862
|
cursor: pointer;
|
|
1854
|
-
font-size: 14px;
|
|
1863
|
+
font-size: var(--select-button-font-size, 14px);
|
|
1864
|
+
font-family: var(--select-font-family, inherit);
|
|
1855
1865
|
transition: all 0.2s ease;
|
|
1856
1866
|
}
|
|
1857
1867
|
|
|
@@ -1861,21 +1871,23 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1861
1871
|
}
|
|
1862
1872
|
|
|
1863
1873
|
.load-more-button:disabled {
|
|
1864
|
-
opacity: 0.5;
|
|
1874
|
+
opacity: var(--select-button-disabled-opacity, 0.5);
|
|
1865
1875
|
cursor: not-allowed;
|
|
1866
1876
|
}
|
|
1867
1877
|
|
|
1868
1878
|
.busy-bucket {
|
|
1869
|
-
padding: 16px;
|
|
1879
|
+
padding: var(--select-busy-padding, 16px);
|
|
1870
1880
|
text-align: center;
|
|
1871
1881
|
color: var(--select-busy-color, #666);
|
|
1882
|
+
background: var(--select-busy-bg, white);
|
|
1883
|
+
font-size: var(--select-busy-font-size, 14px);
|
|
1872
1884
|
}
|
|
1873
1885
|
|
|
1874
1886
|
.spinner {
|
|
1875
1887
|
display: inline-block;
|
|
1876
|
-
width: 20px;
|
|
1877
|
-
height: 20px;
|
|
1878
|
-
border:
|
|
1888
|
+
width: var(--select-spinner-size, 20px);
|
|
1889
|
+
height: var(--select-spinner-size, 20px);
|
|
1890
|
+
border: var(--select-spinner-border, 2px solid #ccc);
|
|
1879
1891
|
border-top-color: var(--select-spinner-active-color, #1976d2);
|
|
1880
1892
|
border-radius: 50%;
|
|
1881
1893
|
animation: spin 0.6s linear infinite;
|
|
@@ -1886,16 +1898,20 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1886
1898
|
}
|
|
1887
1899
|
|
|
1888
1900
|
.empty-state {
|
|
1889
|
-
padding: 24px;
|
|
1901
|
+
padding: var(--select-empty-padding, 24px);
|
|
1890
1902
|
text-align: center;
|
|
1891
1903
|
color: var(--select-empty-color, #999);
|
|
1904
|
+
font-size: var(--select-empty-font-size, 14px);
|
|
1905
|
+
background: var(--select-empty-bg, white);
|
|
1892
1906
|
}
|
|
1893
1907
|
|
|
1894
1908
|
.searching-state {
|
|
1895
|
-
padding: 24px;
|
|
1909
|
+
padding: var(--select-searching-padding, 24px);
|
|
1896
1910
|
text-align: center;
|
|
1897
|
-
color: #667eea;
|
|
1911
|
+
color: var(--select-searching-color, #667eea);
|
|
1912
|
+
font-size: var(--select-searching-font-size, 14px);
|
|
1898
1913
|
font-style: italic;
|
|
1914
|
+
background: var(--select-searching-bg, white);
|
|
1899
1915
|
animation: pulse 1.5s ease-in-out infinite;
|
|
1900
1916
|
}
|
|
1901
1917
|
|
|
@@ -1924,22 +1940,39 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1924
1940
|
}
|
|
1925
1941
|
}
|
|
1926
1942
|
|
|
1927
|
-
/*
|
|
1928
|
-
|
|
1929
|
-
|
|
1943
|
+
/* Dark mode - Opt-in via class or data attribute */
|
|
1944
|
+
:host(.dark-mode),
|
|
1945
|
+
:host([data-theme="dark"]) {
|
|
1946
|
+
.input-container {
|
|
1930
1947
|
background: var(--select-dark-bg, #1f2937);
|
|
1931
|
-
color: var(--select-dark-text, #f9fafb);
|
|
1932
1948
|
border-color: var(--select-dark-border, #4b5563);
|
|
1933
1949
|
}
|
|
1934
1950
|
|
|
1951
|
+
.select-input {
|
|
1952
|
+
color: var(--select-dark-text, #f9fafb);
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
.select-input::placeholder {
|
|
1956
|
+
color: var(--select-dark-placeholder, #6b7280);
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1935
1959
|
.select-dropdown {
|
|
1936
1960
|
background: var(--select-dark-dropdown-bg, #1f2937);
|
|
1937
1961
|
border-color: var(--select-dark-dropdown-border, #4b5563);
|
|
1938
|
-
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
.options-container {
|
|
1965
|
+
background: var(--select-dark-options-bg, #1f2937);
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
.option {
|
|
1969
|
+
color: var(--select-dark-option-color, #f9fafb);
|
|
1970
|
+
background: var(--select-dark-option-bg, #1f2937);
|
|
1939
1971
|
}
|
|
1940
1972
|
|
|
1941
1973
|
.option:hover {
|
|
1942
1974
|
background-color: var(--select-dark-option-hover-bg, #374151);
|
|
1975
|
+
color: var(--select-dark-option-hover-color, #f9fafb);
|
|
1943
1976
|
}
|
|
1944
1977
|
|
|
1945
1978
|
.option.selected {
|
|
@@ -1949,11 +1982,23 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1949
1982
|
|
|
1950
1983
|
.option.active {
|
|
1951
1984
|
background-color: var(--select-dark-option-active-bg, #374151);
|
|
1985
|
+
color: var(--select-dark-option-active-color, #f9fafb);
|
|
1952
1986
|
}
|
|
1953
1987
|
|
|
1954
|
-
.busy-bucket
|
|
1988
|
+
.busy-bucket,
|
|
1989
|
+
.empty-state {
|
|
1955
1990
|
color: var(--select-dark-busy-color, #9ca3af);
|
|
1956
1991
|
}
|
|
1992
|
+
|
|
1993
|
+
.input-container::after {
|
|
1994
|
+
background: linear-gradient(
|
|
1995
|
+
to bottom,
|
|
1996
|
+
transparent 0%,
|
|
1997
|
+
rgba(255, 255, 255, 0.1) 20%,
|
|
1998
|
+
rgba(255, 255, 255, 0.1) 80%,
|
|
1999
|
+
transparent 100%
|
|
2000
|
+
);
|
|
2001
|
+
}
|
|
1957
2002
|
}
|
|
1958
2003
|
|
|
1959
2004
|
/* Accessibility: High contrast mode */
|