@pitvox/partner-react 0.4.0 → 0.5.0

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/styles.css CHANGED
@@ -1573,6 +1573,24 @@
1573
1573
  gap: 1.5rem;
1574
1574
  }
1575
1575
 
1576
+ .pvx-dash-row {
1577
+ display: flex;
1578
+ flex-direction: column;
1579
+ gap: 1.5rem;
1580
+ }
1581
+
1582
+ .pvx-dash-row--2col {
1583
+ display: grid;
1584
+ grid-template-columns: 1fr 1fr;
1585
+ gap: 1.5rem;
1586
+ }
1587
+
1588
+ @media (max-width: 768px) {
1589
+ .pvx-dash-row--2col {
1590
+ grid-template-columns: 1fr;
1591
+ }
1592
+ }
1593
+
1576
1594
  /* ─── Driver profile card ──────────────────────────────────────── */
1577
1595
 
1578
1596
  .pvx-dash-profile {
@@ -1625,7 +1643,7 @@
1625
1643
  .pvx-dash-stats {
1626
1644
  display: grid;
1627
1645
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
1628
- gap: 0.75rem;
1646
+ gap: 1.5rem;
1629
1647
  }
1630
1648
 
1631
1649
  .pvx-dash-stat-card {
@@ -1760,6 +1778,8 @@
1760
1778
  .pvx-dash-records-list {
1761
1779
  display: flex;
1762
1780
  flex-direction: column;
1781
+ max-height: 24rem;
1782
+ overflow-y: auto;
1763
1783
  }
1764
1784
 
1765
1785
  .pvx-dash-record-row {
@@ -1813,23 +1833,6 @@
1813
1833
  color: var(--pvx-text-primary);
1814
1834
  }
1815
1835
 
1816
- .pvx-dash-records-toggle {
1817
- display: block;
1818
- width: 100%;
1819
- padding: 0.625rem 1rem;
1820
- border: none;
1821
- border-top: 1px solid var(--pvx-border);
1822
- background: transparent;
1823
- color: var(--pvx-accent);
1824
- font-size: 0.8125rem;
1825
- font-weight: 500;
1826
- cursor: pointer;
1827
- transition: color 150ms;
1828
- }
1829
-
1830
- .pvx-dash-records-toggle:hover {
1831
- color: var(--pvx-accent-hover);
1832
- }
1833
1836
 
1834
1837
  /* ─── Game badge ───────────────────────────────────────────────── */
1835
1838
 
@@ -1851,3 +1854,217 @@
1851
1854
  background: rgba(245, 158, 11, 0.2);
1852
1855
  color: #fbbf24;
1853
1856
  }
1857
+
1858
+ /* ═══════════════════════════════════════════════════════════════════
1859
+ Upcoming Events
1860
+ ═══════════════════════════════════════════════════════════════════ */
1861
+
1862
+ .pvx-upcoming-list {
1863
+ display: flex;
1864
+ flex-direction: column;
1865
+ }
1866
+
1867
+ .pvx-upcoming-item {
1868
+ display: flex;
1869
+ justify-content: space-between;
1870
+ align-items: center;
1871
+ padding: 0.75rem 1rem;
1872
+ gap: 1rem;
1873
+ }
1874
+
1875
+ .pvx-upcoming-item + .pvx-upcoming-item {
1876
+ border-top: 1px solid rgba(31, 41, 55, 0.5);
1877
+ }
1878
+
1879
+ .pvx-upcoming-item--next {
1880
+ background: rgba(99, 102, 241, 0.06);
1881
+ }
1882
+
1883
+ .pvx-upcoming-info {
1884
+ display: flex;
1885
+ flex-direction: column;
1886
+ gap: 0.125rem;
1887
+ min-width: 0;
1888
+ }
1889
+
1890
+ .pvx-upcoming-comp {
1891
+ font-size: 0.75rem;
1892
+ color: var(--pvx-text-muted);
1893
+ overflow: hidden;
1894
+ text-overflow: ellipsis;
1895
+ white-space: nowrap;
1896
+ }
1897
+
1898
+ .pvx-upcoming-round {
1899
+ font-weight: 600;
1900
+ font-size: 0.9375rem;
1901
+ color: var(--pvx-text);
1902
+ }
1903
+
1904
+ .pvx-upcoming-time {
1905
+ display: flex;
1906
+ flex-direction: column;
1907
+ align-items: flex-end;
1908
+ gap: 0.125rem;
1909
+ flex-shrink: 0;
1910
+ }
1911
+
1912
+ .pvx-upcoming-date {
1913
+ font-size: 0.8125rem;
1914
+ color: var(--pvx-text-muted);
1915
+ white-space: nowrap;
1916
+ }
1917
+
1918
+ .pvx-upcoming-relative {
1919
+ font-size: 0.75rem;
1920
+ color: var(--pvx-accent);
1921
+ font-weight: 500;
1922
+ }
1923
+
1924
+ .pvx-upcoming-badge {
1925
+ display: inline-block;
1926
+ padding: 0.0625rem 0.375rem;
1927
+ border-radius: 999px;
1928
+ font-size: 0.625rem;
1929
+ font-weight: 700;
1930
+ text-transform: uppercase;
1931
+ letter-spacing: 0.05em;
1932
+ background: var(--pvx-accent);
1933
+ color: #fff;
1934
+ }
1935
+
1936
+ /* ═══════════════════════════════════════════════════════════════════
1937
+ Notifications
1938
+ ═══════════════════════════════════════════════════════════════════ */
1939
+
1940
+ .pvx-notif-badge {
1941
+ display: inline-flex;
1942
+ align-items: center;
1943
+ justify-content: center;
1944
+ min-width: 1.25rem;
1945
+ height: 1.25rem;
1946
+ padding: 0 0.375rem;
1947
+ border-radius: 999px;
1948
+ font-size: 0.6875rem;
1949
+ font-weight: 700;
1950
+ background: var(--pvx-accent);
1951
+ color: #fff;
1952
+ margin-left: 0.375rem;
1953
+ }
1954
+
1955
+ .pvx-notif-mark-all {
1956
+ font-size: 0.75rem;
1957
+ color: var(--pvx-accent);
1958
+ background: none;
1959
+ border: none;
1960
+ cursor: pointer;
1961
+ padding: 0.25rem 0.5rem;
1962
+ border-radius: 0.25rem;
1963
+ transition: background 0.15s;
1964
+ }
1965
+
1966
+ .pvx-notif-mark-all:hover {
1967
+ background: rgba(99, 102, 241, 0.1);
1968
+ }
1969
+
1970
+ .pvx-notif-empty {
1971
+ padding: 1.5rem 1rem;
1972
+ text-align: center;
1973
+ color: var(--pvx-text-dimmed);
1974
+ font-size: 0.875rem;
1975
+ }
1976
+
1977
+ .pvx-notif-list {
1978
+ display: flex;
1979
+ flex-direction: column;
1980
+ max-height: 24rem;
1981
+ overflow-y: auto;
1982
+ }
1983
+
1984
+ .pvx-notif-item {
1985
+ display: flex;
1986
+ align-items: flex-start;
1987
+ gap: 0.75rem;
1988
+ padding: 0.75rem 1rem;
1989
+ border: none;
1990
+ background: none;
1991
+ cursor: pointer;
1992
+ text-align: left;
1993
+ width: 100%;
1994
+ transition: background 0.15s;
1995
+ }
1996
+
1997
+ .pvx-notif-item + .pvx-notif-item {
1998
+ border-top: 1px solid rgba(31, 41, 55, 0.5);
1999
+ }
2000
+
2001
+ .pvx-notif-item:hover {
2002
+ background: rgba(255, 255, 255, 0.03);
2003
+ }
2004
+
2005
+ .pvx-notif-item--unread {
2006
+ background: rgba(99, 102, 241, 0.06);
2007
+ }
2008
+
2009
+ .pvx-notif-item--unread:hover {
2010
+ background: rgba(99, 102, 241, 0.1);
2011
+ }
2012
+
2013
+ .pvx-notif-icon {
2014
+ display: flex;
2015
+ align-items: center;
2016
+ justify-content: center;
2017
+ width: 2rem;
2018
+ height: 2rem;
2019
+ border-radius: 50%;
2020
+ flex-shrink: 0;
2021
+ margin-top: 0.125rem;
2022
+ }
2023
+
2024
+ .pvx-notif-icon svg {
2025
+ width: 1rem;
2026
+ height: 1rem;
2027
+ }
2028
+
2029
+ .pvx-notif-icon--record {
2030
+ background: rgba(34, 197, 94, 0.15);
2031
+ color: #22c55e;
2032
+ }
2033
+
2034
+ .pvx-notif-icon--beaten {
2035
+ background: rgba(239, 68, 68, 0.15);
2036
+ color: #ef4444;
2037
+ }
2038
+
2039
+ .pvx-notif-icon--admin {
2040
+ background: rgba(59, 130, 246, 0.15);
2041
+ color: #3b82f6;
2042
+ }
2043
+
2044
+ .pvx-notif-content {
2045
+ display: flex;
2046
+ flex-direction: column;
2047
+ gap: 0.125rem;
2048
+ min-width: 0;
2049
+ flex: 1;
2050
+ }
2051
+
2052
+ .pvx-notif-message {
2053
+ font-size: 0.875rem;
2054
+ color: var(--pvx-text);
2055
+ line-height: 1.4;
2056
+ }
2057
+
2058
+ .pvx-notif-time {
2059
+ font-size: 0.75rem;
2060
+ color: var(--pvx-text-dimmed);
2061
+ }
2062
+
2063
+ .pvx-notif-dot {
2064
+ width: 0.5rem;
2065
+ height: 0.5rem;
2066
+ border-radius: 50%;
2067
+ background: var(--pvx-accent);
2068
+ flex-shrink: 0;
2069
+ margin-top: 0.375rem;
2070
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitvox/partner-react",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "React hooks and styled components for PitVox partner websites — leaderboards, competitions, driver dashboards",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",