@mesob/ui 0.3.4 → 0.4.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.
@@ -421,6 +421,34 @@
421
421
  @apply bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
422
422
  }
423
423
 
424
+ .cn-dropdown-button-shell {
425
+ @apply inline-flex w-fit items-stretch isolate overflow-hidden align-middle;
426
+ }
427
+
428
+ .cn-dropdown-button-main {
429
+ @apply rounded-r-none! border-r-0;
430
+ }
431
+
432
+ .cn-dropdown-button-trigger {
433
+ @apply relative -ml-px rounded-l-none! border-l-0;
434
+ }
435
+
436
+ .cn-dropdown-button-trigger::before {
437
+ @apply bg-border/80 absolute top-1.5 bottom-1.5 left-0 w-px content-[''];
438
+ }
439
+
440
+ .cn-dropdown-button-trigger[data-size='xs']::before {
441
+ @apply top-0.5 bottom-0.5;
442
+ }
443
+
444
+ .cn-dropdown-button-trigger[data-size='sm']::before {
445
+ @apply top-0.5 bottom-0.5;
446
+ }
447
+
448
+ .cn-dropdown-button-variant-danger {
449
+ @apply bg-destructive text-destructive-foreground hover:bg-destructive/90;
450
+ }
451
+
424
452
  .cn-button-size-xl {
425
453
  @apply h-12 gap-2 px-7 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5 text-lg;
426
454
  }
@@ -1746,28 +1774,41 @@
1746
1774
  @apply w-full space-y-2 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50;
1747
1775
  }
1748
1776
 
1749
- .cn-file-input-dropzone {
1750
- @apply border-input bg-input/20 dark:bg-input/30 hover:bg-input/30 dark:hover:bg-input/50 focus-within:border-ring focus-within:ring-ring/50 relative flex min-h-[9rem] w-full cursor-pointer flex-col items-center justify-center rounded-xl border-2 border-dashed px-4 py-6 text-sm transition-colors outline-none focus-within:ring-3 data-[dragging=true]:border-ring data-[dragging=true]:bg-input/30;
1777
+ .cn-file-input-hidden-input {
1778
+ @apply sr-only;
1751
1779
  }
1752
1780
 
1753
- .cn-file-input-hidden-input {
1754
- @apply absolute inset-0 cursor-pointer opacity-0;
1781
+ .cn-file-input-root {
1782
+ @apply border-input bg-background hover:bg-accent/40 focus-visible:border-ring focus-visible:ring-ring/50 flex min-h-10 w-full items-center gap-3 rounded-lg border px-3 py-2 text-left transition-colors outline-none focus-visible:ring-3;
1755
1783
  }
1756
1784
 
1757
- .cn-file-input-prompt {
1758
- @apply text-muted-foreground flex flex-col items-center gap-2 text-center;
1785
+ .cn-file-input-section {
1786
+ @apply text-muted-foreground flex size-8 shrink-0 items-center justify-center rounded-md border bg-muted/30;
1759
1787
  }
1760
1788
 
1761
- .cn-file-input-icon {
1762
- @apply size-8;
1789
+ .cn-file-input-preview {
1790
+ @apply border-input bg-input/10 size-11 shrink-0 overflow-hidden rounded-md border;
1763
1791
  }
1764
1792
 
1765
- .cn-file-input-title {
1766
- @apply text-sm;
1793
+ .cn-file-input-body {
1794
+ @apply flex min-w-0 flex-1 flex-col;
1795
+ }
1796
+
1797
+ .cn-file-input-placeholder,
1798
+ .cn-file-input-value {
1799
+ @apply truncate text-sm font-medium;
1800
+ }
1801
+
1802
+ .cn-file-input-meta {
1803
+ @apply text-muted-foreground text-xs;
1767
1804
  }
1768
1805
 
1769
- .cn-file-input-accept {
1770
- @apply text-xs opacity-70;
1806
+ .cn-file-input-actions {
1807
+ @apply flex items-center gap-1;
1808
+ }
1809
+
1810
+ .cn-file-input-trigger {
1811
+ @apply text-muted-foreground flex size-8 items-center justify-center rounded-md border bg-muted/30;
1771
1812
  }
1772
1813
 
1773
1814
  .cn-file-input-list {
@@ -1775,7 +1816,7 @@
1775
1816
  }
1776
1817
 
1777
1818
  .cn-file-input-item {
1778
- @apply border-input bg-input/20 dark:bg-input/30 flex items-center justify-between rounded-xl border px-4 py-2 text-sm;
1819
+ @apply border-input bg-input/20 dark:bg-input/30 flex items-center justify-between rounded-lg border px-3 py-2 text-sm;
1779
1820
  }
1780
1821
 
1781
1822
  .cn-file-input-item-left {
@@ -1794,8 +1835,127 @@
1794
1835
  @apply text-muted-foreground text-xs tabular-nums;
1795
1836
  }
1796
1837
 
1797
- .cn-file-input-item-remove {
1798
- @apply hover:bg-accent transition-colors;
1838
+ /* MARK: File Drop Input */
1839
+ .cn-file-drop-input-wrapper {
1840
+ @apply w-full space-y-2 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50;
1841
+ }
1842
+
1843
+ .cn-file-drop-input-dropzone {
1844
+ @apply border-input bg-input/10 hover:bg-input/20 focus-within:border-ring focus-within:ring-ring/50 relative flex min-h-[12rem] w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed p-4 transition-colors outline-none focus-within:ring-3 data-[dragging=true]:border-ring data-[dragging=true]:bg-input/30;
1845
+ }
1846
+
1847
+ .cn-file-drop-input-hidden-input {
1848
+ @apply sr-only;
1849
+ }
1850
+
1851
+ .cn-file-drop-input-prompt {
1852
+ @apply text-muted-foreground flex items-center gap-4 text-left;
1853
+ }
1854
+
1855
+ .cn-file-drop-input-icon {
1856
+ @apply size-10 shrink-0;
1857
+ }
1858
+
1859
+ .cn-file-drop-input-title {
1860
+ @apply text-foreground text-xl font-medium;
1861
+ }
1862
+
1863
+ .cn-file-drop-input-description {
1864
+ @apply text-muted-foreground mt-1 text-base;
1865
+ }
1866
+
1867
+ .cn-file-drop-input-single-preview {
1868
+ @apply relative size-full;
1869
+ }
1870
+
1871
+ .cn-file-drop-input-preview {
1872
+ @apply border-input bg-background size-full overflow-hidden rounded-md border;
1873
+ }
1874
+
1875
+ .cn-file-drop-input-preview-actions {
1876
+ @apply absolute top-3 right-3 flex gap-2;
1877
+ }
1878
+
1879
+ .cn-file-drop-input-list {
1880
+ @apply space-y-2;
1881
+ }
1882
+
1883
+ .cn-file-drop-input-item {
1884
+ @apply border-input bg-input/20 flex items-center justify-between rounded-lg border px-3 py-2 text-sm;
1885
+ }
1886
+
1887
+ .cn-file-drop-input-item-left {
1888
+ @apply flex min-w-0 items-center gap-2;
1889
+ }
1890
+
1891
+ .cn-file-drop-input-item-icon {
1892
+ @apply text-muted-foreground size-4 shrink-0;
1893
+ }
1894
+
1895
+ .cn-file-drop-input-item-name {
1896
+ @apply truncate;
1897
+ }
1898
+
1899
+ .cn-file-drop-input-item-size {
1900
+ @apply text-muted-foreground text-xs tabular-nums;
1901
+ }
1902
+
1903
+ /* MARK: File Upload */
1904
+ .cn-file-upload {
1905
+ @apply border-input bg-background rounded-lg border-2;
1906
+ }
1907
+
1908
+ .cn-file-upload-prompt {
1909
+ @apply items-start;
1910
+ }
1911
+
1912
+ .cn-file-upload-icon {
1913
+ @apply border-input bg-input/20 rounded-md border;
1914
+ }
1915
+
1916
+ .cn-file-upload-button {
1917
+ @apply shrink-0;
1918
+ }
1919
+
1920
+ .cn-file-upload-item {
1921
+ @apply border-input bg-input/20 rounded-lg;
1922
+ }
1923
+
1924
+ .cn-file-upload-preview {
1925
+ @apply border-input bg-input/10 rounded-md border;
1926
+ }
1927
+
1928
+ .cn-file-upload-item-icon {
1929
+ @apply border-input bg-background rounded-md border;
1930
+ }
1931
+
1932
+ .cn-file-upload-empty {
1933
+ @apply border-input bg-input/10 rounded-lg;
1934
+ }
1935
+
1936
+ /* MARK: Image Upload */
1937
+ .cn-image-upload {
1938
+ @apply rounded-lg;
1939
+ }
1940
+
1941
+ .cn-image-upload-dropzone {
1942
+ @apply border-input bg-background rounded-lg border-2;
1943
+ }
1944
+
1945
+ .cn-image-upload-preview {
1946
+ @apply border-input bg-input/20 rounded-md border;
1947
+ }
1948
+
1949
+ .cn-image-upload-sidebar {
1950
+ @apply text-sm;
1951
+ }
1952
+
1953
+ .cn-image-upload-placeholder {
1954
+ @apply border-input bg-input/10 rounded-md border border-dashed;
1955
+ }
1956
+
1957
+ .cn-image-upload-placeholder-icon {
1958
+ @apply border-input bg-background rounded-md border;
1799
1959
  }
1800
1960
 
1801
1961
  /* MARK: Animated Tabs */
@@ -417,6 +417,34 @@
417
417
  @apply bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
418
418
  }
419
419
 
420
+ .cn-dropdown-button-shell {
421
+ @apply inline-flex w-fit items-stretch isolate overflow-hidden align-middle;
422
+ }
423
+
424
+ .cn-dropdown-button-main {
425
+ @apply rounded-r-none! border-r-0;
426
+ }
427
+
428
+ .cn-dropdown-button-trigger {
429
+ @apply relative -ml-px rounded-l-none! border-l-0;
430
+ }
431
+
432
+ .cn-dropdown-button-trigger::before {
433
+ @apply bg-border/80 absolute top-1.5 bottom-1.5 left-0 w-px content-[''];
434
+ }
435
+
436
+ .cn-dropdown-button-trigger[data-size='xs']::before {
437
+ @apply top-0.5 bottom-0.5;
438
+ }
439
+
440
+ .cn-dropdown-button-trigger[data-size='sm']::before {
441
+ @apply top-0.5 bottom-0.5;
442
+ }
443
+
444
+ .cn-dropdown-button-variant-danger {
445
+ @apply bg-destructive text-destructive-foreground hover:bg-destructive/90;
446
+ }
447
+
420
448
  .cn-button-size-xl {
421
449
  @apply h-12 gap-2 px-7 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5 text-lg;
422
450
  }
@@ -1742,28 +1770,41 @@
1742
1770
  @apply w-full space-y-2 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50;
1743
1771
  }
1744
1772
 
1745
- .cn-file-input-dropzone {
1746
- @apply border-input bg-input/20 dark:bg-input/30 hover:bg-input/30 dark:hover:bg-input/50 focus-within:border-ring focus-within:ring-ring/50 relative flex min-h-[9rem] w-full cursor-pointer flex-col items-center justify-center rounded-xl border-2 border-dashed px-4 py-6 text-sm transition-colors outline-none focus-within:ring-3 data-[dragging=true]:border-ring data-[dragging=true]:bg-input/30;
1773
+ .cn-file-input-hidden-input {
1774
+ @apply sr-only;
1747
1775
  }
1748
1776
 
1749
- .cn-file-input-hidden-input {
1750
- @apply absolute inset-0 cursor-pointer opacity-0;
1777
+ .cn-file-input-root {
1778
+ @apply border-input bg-background hover:bg-accent/40 focus-visible:border-ring focus-visible:ring-ring/50 flex min-h-11 w-full items-center gap-3 rounded-xl border px-3 py-2 text-left transition-colors outline-none focus-visible:ring-3;
1751
1779
  }
1752
1780
 
1753
- .cn-file-input-prompt {
1754
- @apply text-muted-foreground flex flex-col items-center gap-2 text-center;
1781
+ .cn-file-input-section {
1782
+ @apply text-muted-foreground flex size-8 shrink-0 items-center justify-center rounded-lg border bg-muted/30;
1755
1783
  }
1756
1784
 
1757
- .cn-file-input-icon {
1758
- @apply size-8;
1785
+ .cn-file-input-preview {
1786
+ @apply border-input bg-input/10 size-12 shrink-0 overflow-hidden rounded-lg border;
1759
1787
  }
1760
1788
 
1761
- .cn-file-input-title {
1762
- @apply text-sm;
1789
+ .cn-file-input-body {
1790
+ @apply flex min-w-0 flex-1 flex-col;
1791
+ }
1792
+
1793
+ .cn-file-input-placeholder,
1794
+ .cn-file-input-value {
1795
+ @apply truncate text-sm font-medium;
1796
+ }
1797
+
1798
+ .cn-file-input-meta {
1799
+ @apply text-muted-foreground text-xs;
1800
+ }
1801
+
1802
+ .cn-file-input-actions {
1803
+ @apply flex items-center gap-1;
1763
1804
  }
1764
1805
 
1765
- .cn-file-input-accept {
1766
- @apply text-xs opacity-70;
1806
+ .cn-file-input-trigger {
1807
+ @apply text-muted-foreground flex size-8 items-center justify-center rounded-lg border bg-muted/30;
1767
1808
  }
1768
1809
 
1769
1810
  .cn-file-input-list {
@@ -1790,8 +1831,127 @@
1790
1831
  @apply text-muted-foreground text-xs tabular-nums;
1791
1832
  }
1792
1833
 
1793
- .cn-file-input-item-remove {
1794
- @apply hover:bg-accent transition-colors;
1834
+ /* MARK: File Drop Input */
1835
+ .cn-file-drop-input-wrapper {
1836
+ @apply w-full space-y-2 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50;
1837
+ }
1838
+
1839
+ .cn-file-drop-input-dropzone {
1840
+ @apply border-input bg-input/10 hover:bg-input/20 focus-within:border-ring focus-within:ring-ring/50 relative flex min-h-[13rem] w-full cursor-pointer flex-col items-center justify-center rounded-xl border-2 border-dashed p-4 transition-colors outline-none focus-within:ring-3 data-[dragging=true]:border-ring data-[dragging=true]:bg-input/30;
1841
+ }
1842
+
1843
+ .cn-file-drop-input-hidden-input {
1844
+ @apply sr-only;
1845
+ }
1846
+
1847
+ .cn-file-drop-input-prompt {
1848
+ @apply text-muted-foreground flex items-center gap-4 text-left;
1849
+ }
1850
+
1851
+ .cn-file-drop-input-icon {
1852
+ @apply size-12 shrink-0;
1853
+ }
1854
+
1855
+ .cn-file-drop-input-title {
1856
+ @apply text-foreground text-2xl font-medium;
1857
+ }
1858
+
1859
+ .cn-file-drop-input-description {
1860
+ @apply text-muted-foreground mt-1 text-lg;
1861
+ }
1862
+
1863
+ .cn-file-drop-input-single-preview {
1864
+ @apply relative size-full;
1865
+ }
1866
+
1867
+ .cn-file-drop-input-preview {
1868
+ @apply border-input bg-background size-full overflow-hidden rounded-lg border;
1869
+ }
1870
+
1871
+ .cn-file-drop-input-preview-actions {
1872
+ @apply absolute top-4 right-4 flex gap-2;
1873
+ }
1874
+
1875
+ .cn-file-drop-input-list {
1876
+ @apply space-y-2;
1877
+ }
1878
+
1879
+ .cn-file-drop-input-item {
1880
+ @apply border-input bg-input/20 flex items-center justify-between rounded-xl border px-4 py-2 text-sm;
1881
+ }
1882
+
1883
+ .cn-file-drop-input-item-left {
1884
+ @apply flex min-w-0 items-center gap-2;
1885
+ }
1886
+
1887
+ .cn-file-drop-input-item-icon {
1888
+ @apply text-muted-foreground size-4 shrink-0;
1889
+ }
1890
+
1891
+ .cn-file-drop-input-item-name {
1892
+ @apply truncate;
1893
+ }
1894
+
1895
+ .cn-file-drop-input-item-size {
1896
+ @apply text-muted-foreground text-xs tabular-nums;
1897
+ }
1898
+
1899
+ /* MARK: File Upload */
1900
+ .cn-file-upload {
1901
+ @apply border-input bg-background rounded-xl border-2;
1902
+ }
1903
+
1904
+ .cn-file-upload-prompt {
1905
+ @apply items-start;
1906
+ }
1907
+
1908
+ .cn-file-upload-icon {
1909
+ @apply border-input bg-input/20 rounded-lg border;
1910
+ }
1911
+
1912
+ .cn-file-upload-button {
1913
+ @apply shrink-0;
1914
+ }
1915
+
1916
+ .cn-file-upload-item {
1917
+ @apply border-input bg-input/20 rounded-xl;
1918
+ }
1919
+
1920
+ .cn-file-upload-preview {
1921
+ @apply border-input bg-input/10 rounded-lg border;
1922
+ }
1923
+
1924
+ .cn-file-upload-item-icon {
1925
+ @apply border-input bg-background rounded-md border;
1926
+ }
1927
+
1928
+ .cn-file-upload-empty {
1929
+ @apply border-input bg-input/10 rounded-xl;
1930
+ }
1931
+
1932
+ /* MARK: Image Upload */
1933
+ .cn-image-upload {
1934
+ @apply rounded-xl;
1935
+ }
1936
+
1937
+ .cn-image-upload-dropzone {
1938
+ @apply border-input bg-background rounded-xl border-2;
1939
+ }
1940
+
1941
+ .cn-image-upload-preview {
1942
+ @apply border-input bg-input/20 rounded-lg border;
1943
+ }
1944
+
1945
+ .cn-image-upload-sidebar {
1946
+ @apply text-sm;
1947
+ }
1948
+
1949
+ .cn-image-upload-placeholder {
1950
+ @apply border-input bg-input/10 rounded-lg border border-dashed;
1951
+ }
1952
+
1953
+ .cn-image-upload-placeholder-icon {
1954
+ @apply border-input bg-background rounded-lg border;
1795
1955
  }
1796
1956
 
1797
1957
  /* MARK: Animated Tabs */
@@ -3,3 +3,14 @@
3
3
  @import "./style-maia.css" layer(base);
4
4
  @import "./style-lyra.css" layer(base);
5
5
  @import "./style-mira.css" layer(base);
6
+
7
+ @media (prefers-reduced-motion: reduce) {
8
+ *,
9
+ ::before,
10
+ ::after {
11
+ animation-duration: 0.01ms;
12
+ animation-iteration-count: 1;
13
+ scroll-behavior: auto;
14
+ transition-duration: 0.01ms;
15
+ }
16
+ }