@skeletonlabs/skeleton 0.124.2 → 0.132.4

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.
Files changed (73) hide show
  1. package/README.md +1 -1
  2. package/components/Accordion/Accordion.svelte +4 -0
  3. package/components/Accordion/Accordion.svelte.d.ts +4 -0
  4. package/components/Accordion/AccordionItem.svelte +14 -5
  5. package/components/Accordion/AccordionItem.svelte.d.ts +4 -1
  6. package/components/ConicGradient/settings.d.ts +0 -2
  7. package/components/ConicGradient/settings.js +0 -1
  8. package/components/FileButton/FileButton.svelte +1 -1
  9. package/components/FileDropzone/FileDropzone.svelte +1 -1
  10. package/components/InputChip/InputChip.svelte +3 -3
  11. package/components/ListBox/ListBoxItem.svelte +3 -3
  12. package/components/ListBox/ListBoxItem.svelte.d.ts +2 -1
  13. package/components/Paginator/Paginator.svelte +3 -3
  14. package/components/Radio/RadioItem.svelte +2 -2
  15. package/components/Radio/RadioItem.svelte.d.ts +2 -1
  16. package/components/RangeSlider/RangeSlider.svelte.d.ts +4 -4
  17. package/components/Stepper/Step.svelte +3 -3
  18. package/components/Tab/Tab.svelte +2 -2
  19. package/components/Tab/Tab.svelte.d.ts +2 -1
  20. package/index.d.ts +3 -3
  21. package/index.js +9 -3
  22. package/package.json +10 -11
  23. package/styles/elements/forms.css +5 -9
  24. package/styles/elements/modals.css +15 -0
  25. package/styles/elements/popups.css +16 -0
  26. package/styles/elements.css +2 -2
  27. package/styles/typography.css +3 -3
  28. package/tailwind/core.cjs +1 -1
  29. package/tailwind/generated/intellisense-classes.cjs +1 -1
  30. package/tailwind/generated/intellisense-classes.d.cts +65 -208
  31. package/tailwind/intellisense.cjs +2 -2
  32. package/tailwind/skeleton.cjs +1 -1
  33. package/types/index.d.ts +1 -0
  34. package/types/index.js +1 -0
  35. package/types/tailwind.d.ts +4 -0
  36. package/types/tailwind.js +2 -0
  37. package/utilities/CodeBlock/CodeBlock.svelte +12 -8
  38. package/utilities/CodeBlock/CodeBlock.svelte.d.ts +9 -1
  39. package/utilities/Drawer/Drawer.svelte +50 -37
  40. package/utilities/Drawer/Drawer.svelte.d.ts +8 -2
  41. package/utilities/Drawer/types.d.ts +8 -2
  42. package/utilities/LightSwitch/LightSwitch.svelte +43 -53
  43. package/utilities/LightSwitch/LightSwitch.svelte.d.ts +18 -4
  44. package/utilities/LightSwitch/lightswitch.d.ts +20 -0
  45. package/utilities/LightSwitch/lightswitch.js +71 -0
  46. package/utilities/LocalStorageStore/LocalStorageStore.js +1 -1
  47. package/utilities/Modal/Modal.svelte +96 -64
  48. package/utilities/Modal/Modal.svelte.d.ts +11 -0
  49. package/utilities/Modal/types.d.ts +9 -5
  50. package/utilities/Popup/popup.d.ts +7 -0
  51. package/utilities/Popup/popup.js +218 -0
  52. package/utilities/Popup/types.d.ts +32 -0
  53. package/utilities/Popup/types.js +3 -0
  54. package/utilities/Toast/Toast.svelte +17 -13
  55. package/utilities/Toast/Toast.svelte.d.ts +5 -3
  56. package/utilities/Toast/stores.js +9 -26
  57. package/utilities/Toast/types.d.ts +6 -1
  58. package/styles/elements/menus.css +0 -29
  59. package/styles/elements/tooltips.css +0 -83
  60. package/utilities/LightSwitch/stores.d.ts +0 -2
  61. package/utilities/LightSwitch/stores.js +0 -5
  62. package/utilities/Menu/menu.d.ts +0 -18
  63. package/utilities/Menu/menu.js +0 -151
  64. package/utilities/Modal/examples/ModalExampleEmbed.svelte +0 -17
  65. package/utilities/Modal/examples/ModalExampleEmbed.svelte.d.ts +0 -17
  66. package/utilities/Modal/examples/ModalExampleForm.svelte +0 -41
  67. package/utilities/Modal/examples/ModalExampleForm.svelte.d.ts +0 -17
  68. package/utilities/Modal/examples/ModalExampleImage.svelte +0 -19
  69. package/utilities/Modal/examples/ModalExampleImage.svelte.d.ts +0 -16
  70. package/utilities/Modal/examples/ModalExampleList.svelte +0 -26
  71. package/utilities/Modal/examples/ModalExampleList.svelte.d.ts +0 -17
  72. package/utilities/Tooltip/tooltip.d.ts +0 -35
  73. package/utilities/Tooltip/tooltip.js +0 -94
@@ -56,6 +56,8 @@ declare const _exports: {
56
56
  ".input:focus,\n\t.textarea:focus,\n\t.select:focus,\n\t.input-group:focus": {
57
57
  "--tw-brightness": string;
58
58
  filter: string;
59
+ };
60
+ ".input:focus-within,\n\t.textarea:focus-within,\n\t.select:focus-within,\n\t.input-group:focus-within": {
59
61
  "--tw-border-opacity": string;
60
62
  borderColor: string;
61
63
  };
@@ -72,6 +74,7 @@ declare const _exports: {
72
74
  };
73
75
  ".select": {
74
76
  padding: string;
77
+ paddingRight: string;
75
78
  };
76
79
  ".select[size]": {
77
80
  backgroundImage: string;
@@ -95,6 +98,7 @@ declare const _exports: {
95
98
  marginBottom: string;
96
99
  };
97
100
  ".select option": {
101
+ cursor: string;
98
102
  paddingLeft: string;
99
103
  paddingRight: string;
100
104
  paddingTop: string;
@@ -105,10 +109,6 @@ declare const _exports: {
105
109
  background: string;
106
110
  color: string;
107
111
  };
108
- ".dark .select option:checked": {
109
- color: string;
110
- background: string;
111
- };
112
112
  ".checkbox,\n\t.radio": {
113
113
  height: string;
114
114
  width: string;
@@ -535,12 +535,6 @@ declare const _exports: {
535
535
  fontSize: string;
536
536
  lineHeight: string;
537
537
  };
538
- ".btn-icon-lg": {
539
- aspectRatio: string;
540
- width: string;
541
- fontSize: string;
542
- lineHeight: string;
543
- };
544
538
  ".btn-group": {
545
539
  display: string;
546
540
  flexDirection: string;
@@ -901,30 +895,6 @@ declare const _exports: {
901
895
  width: string;
902
896
  whiteSpace: string;
903
897
  };
904
- ".menu-tl": {
905
- left: string;
906
- marginTop: string;
907
- transformOrigin: string;
908
- };
909
- ".menu-tr": {
910
- right: string;
911
- marginTop: string;
912
- transformOrigin: string;
913
- };
914
- ".menu-bl": {
915
- top: string;
916
- left: string;
917
- transformOrigin: string;
918
- "--tw-translate-y": string;
919
- transform: string;
920
- };
921
- ".menu-br": {
922
- top: string;
923
- right: string;
924
- transformOrigin: string;
925
- "--tw-translate-y": string;
926
- transform: string;
927
- };
928
898
  ".variant-filled": {
929
899
  backgroundColor: string;
930
900
  color: string;
@@ -1381,13 +1351,13 @@ declare const _exports: {
1381
1351
  ".h-\\[48px\\]": {
1382
1352
  height: string;
1383
1353
  };
1384
- ".h-\\[40\\%\\]": {
1354
+ ".h-\\[50\\%\\]": {
1385
1355
  height: string;
1386
1356
  };
1387
1357
  ".h-\\[480px\\]": {
1388
1358
  height: string;
1389
1359
  };
1390
- ".max-h-\\[60vh\\]": {
1360
+ ".max-h-\\[90\\%\\]": {
1391
1361
  maxHeight: string;
1392
1362
  };
1393
1363
  ".max-h-\\[200px\\]": {
@@ -1399,6 +1369,9 @@ declare const _exports: {
1399
1369
  ".w-\\[38px\\]": {
1400
1370
  width: string;
1401
1371
  };
1372
+ ".w-\\[375px\\]": {
1373
+ width: string;
1374
+ };
1402
1375
  ".w-\\[70px\\]": {
1403
1376
  width: string;
1404
1377
  };
@@ -1411,13 +1384,13 @@ declare const _exports: {
1411
1384
  ".w-\\[90\\%\\]": {
1412
1385
  width: string;
1413
1386
  };
1414
- ".w-\\[40px\\]": {
1387
+ ".w-\\[70\\%\\]": {
1415
1388
  width: string;
1416
1389
  };
1417
- ".\\!w-\\[480px\\]": {
1390
+ ".w-\\[40px\\]": {
1418
1391
  width: string;
1419
1392
  };
1420
- ".\\!w-56": {
1393
+ ".w-\\[280px\\]": {
1421
1394
  width: string;
1422
1395
  };
1423
1396
  ".min-w-\\[150px\\]": {
@@ -1432,16 +1405,19 @@ declare const _exports: {
1432
1405
  ".max-w-\\[800px\\]": {
1433
1406
  maxWidth: string;
1434
1407
  };
1408
+ ".max-w-\\[90\\%\\]": {
1409
+ maxWidth: string;
1410
+ };
1435
1411
  ".max-w-\\[640px\\]": {
1436
1412
  maxWidth: string;
1437
1413
  };
1438
1414
  ".max-w-\\[320px\\]": {
1439
1415
  maxWidth: string;
1440
1416
  };
1441
- ".max-w-\\[500px\\]": {
1417
+ ".max-w-\\[1024px\\]": {
1442
1418
  maxWidth: string;
1443
1419
  };
1444
- ".\\!max-w-\\[75\\%\\]": {
1420
+ ".max-w-\\[500px\\]": {
1445
1421
  maxWidth: string;
1446
1422
  };
1447
1423
  ".max-w-\\[700px\\]": {
@@ -1450,6 +1426,14 @@ declare const _exports: {
1450
1426
  ".origin-\\[50\\%_50\\%\\]": {
1451
1427
  transformOrigin: string;
1452
1428
  };
1429
+ ".translate-x-\\[100\\%\\]": {
1430
+ "--tw-translate-x": string;
1431
+ transform: string;
1432
+ };
1433
+ ".translate-x-\\[50\\%\\]": {
1434
+ "--tw-translate-x": string;
1435
+ transform: string;
1436
+ };
1453
1437
  ".scale-\\[0\\.8\\]": {
1454
1438
  "--tw-scale-x": string;
1455
1439
  "--tw-scale-y": string;
@@ -1483,17 +1467,16 @@ declare const _exports: {
1483
1467
  ".grid-rows-\\[1fr_auto\\]": {
1484
1468
  gridTemplateRows: string;
1485
1469
  };
1486
- ".\\!items-start": {
1487
- alignItems: string;
1470
+ ".space-y-\\[1px\\] > :not([hidden]) ~ :not([hidden])": {
1471
+ "--tw-space-y-reverse": string;
1472
+ marginTop: string;
1473
+ marginBottom: string;
1488
1474
  };
1489
1475
  ".\\!space-x-6 > :not([hidden]) ~ :not([hidden])": {
1490
1476
  "--tw-space-x-reverse": string;
1491
1477
  marginRight: string;
1492
1478
  marginLeft: string;
1493
1479
  };
1494
- ".\\!overflow-visible": {
1495
- overflow: string;
1496
- };
1497
1480
  ".rounded-\\[corner\\]": {
1498
1481
  borderRadius: string;
1499
1482
  };
@@ -1515,17 +1498,13 @@ declare const _exports: {
1515
1498
  ".\\!border-double": {
1516
1499
  borderStyle: string;
1517
1500
  };
1518
- ".border-surface-500\\/50": {
1519
- borderColor: string;
1520
- };
1521
1501
  ".border-surface-500\\/30": {
1522
1502
  borderColor: string;
1523
1503
  };
1524
- ".border-primary-500": {
1525
- "--tw-border-opacity": string;
1504
+ ".\\!border-surface-500\\/30": {
1526
1505
  borderColor: string;
1527
1506
  };
1528
- ".border-secondary-500": {
1507
+ ".border-primary-500": {
1529
1508
  "--tw-border-opacity": string;
1530
1509
  borderColor: string;
1531
1510
  };
@@ -1533,7 +1512,7 @@ declare const _exports: {
1533
1512
  "--tw-border-opacity": string;
1534
1513
  borderColor: string;
1535
1514
  };
1536
- ".border-surface-200": {
1515
+ ".border-secondary-500": {
1537
1516
  "--tw-border-opacity": string;
1538
1517
  borderColor: string;
1539
1518
  };
@@ -1555,6 +1534,12 @@ declare const _exports: {
1555
1534
  ".fill-primary-500": {
1556
1535
  fill: string;
1557
1536
  };
1537
+ ".fill-surface-50": {
1538
+ fill: string;
1539
+ };
1540
+ ".fill-surface-900": {
1541
+ fill: string;
1542
+ };
1558
1543
  ".stroke-surface-900": {
1559
1544
  stroke: string;
1560
1545
  };
@@ -1600,7 +1585,7 @@ declare const _exports: {
1600
1585
  ".stroke-error-500\\/30": {
1601
1586
  stroke: string;
1602
1587
  };
1603
- ".\\!p-0": {
1588
+ ".\\!p-4": {
1604
1589
  padding: string;
1605
1590
  };
1606
1591
  ".\\!py-10": {
@@ -1637,36 +1622,37 @@ declare const _exports: {
1637
1622
  "--tw-text-opacity": string;
1638
1623
  color: string;
1639
1624
  };
1640
- ".text-surface-700": {
1625
+ ".\\!text-stone-900": {
1641
1626
  "--tw-text-opacity": string;
1642
1627
  color: string;
1643
1628
  };
1644
- ".text-surface-50": {
1629
+ ".\\!text-zinc-900": {
1645
1630
  "--tw-text-opacity": string;
1646
1631
  color: string;
1647
1632
  };
1648
- ".\\!text-white": {
1633
+ ".\\!text-slate-900": {
1649
1634
  "--tw-text-opacity": string;
1650
1635
  color: string;
1651
1636
  };
1652
- ".text-secondary-500": {
1637
+ ".text-surface-700": {
1653
1638
  "--tw-text-opacity": string;
1654
1639
  color: string;
1655
1640
  };
1656
- ".text-surface-900": {
1641
+ ".text-surface-50": {
1657
1642
  "--tw-text-opacity": string;
1658
1643
  color: string;
1659
1644
  };
1660
- ".text-warning-500": {
1645
+ ".\\!text-white": {
1661
1646
  "--tw-text-opacity": string;
1662
1647
  color: string;
1663
1648
  };
1664
- ".\\!text-yellow-500": {
1649
+ ".text-secondary-500": {
1665
1650
  "--tw-text-opacity": string;
1666
1651
  color: string;
1667
1652
  };
1668
- ".\\!no-underline": {
1669
- textDecorationLine: string;
1653
+ ".text-warning-500": {
1654
+ "--tw-text-opacity": string;
1655
+ color: string;
1670
1656
  };
1671
1657
  ".accent-secondary-500": {
1672
1658
  accentColor: string;
@@ -1713,9 +1699,6 @@ declare const _exports: {
1713
1699
  ".accent-\\[color\\]": {
1714
1700
  accentColor: string;
1715
1701
  };
1716
- ".\\!opacity-100": {
1717
- opacity: string;
1718
- };
1719
1702
  ".-outline-offset-\\[3px\\]": {
1720
1703
  outlineOffset: string;
1721
1704
  };
@@ -1729,6 +1712,9 @@ declare const _exports: {
1729
1712
  "--tw-ring-shadow": string;
1730
1713
  boxShadow: string;
1731
1714
  };
1715
+ ".ring-surface-500\\/30": {
1716
+ "--tw-ring-color": string;
1717
+ };
1732
1718
  ".blur-\\[50px\\]": {
1733
1719
  "--tw-blur": string;
1734
1720
  filter: string;
@@ -1741,8 +1727,10 @@ declare const _exports: {
1741
1727
  ".duration-\\[200ms\\]": {
1742
1728
  transitionDuration: string;
1743
1729
  };
1744
- ".duration-\\[100ms\\]": {
1745
- transitionDuration: string;
1730
+ ".hover\\:scale-125:hover": {
1731
+ "--tw-scale-x": string;
1732
+ "--tw-scale-y": string;
1733
+ transform: string;
1746
1734
  };
1747
1735
  ".hover\\:card:hover": {
1748
1736
  backgroundColor: string;
@@ -1809,20 +1797,9 @@ declare const _exports: {
1809
1797
  ".dark .dark\\:border-white\\/5": {
1810
1798
  borderColor: string;
1811
1799
  };
1812
- ".dark .dark\\:border-gray-700": {
1813
- "--tw-border-opacity": string;
1814
- borderColor: string;
1815
- };
1816
- ".dark .dark\\:border-surface-700": {
1817
- "--tw-border-opacity": string;
1818
- borderColor: string;
1819
- };
1820
1800
  ".dark .dark\\:fill-white": {
1821
1801
  fill: string;
1822
1802
  };
1823
- ".dark .dark\\:fill-black": {
1824
- fill: string;
1825
- };
1826
1803
  ".dark .dark\\:stroke-surface-50": {
1827
1804
  stroke: string;
1828
1805
  };
@@ -1840,18 +1817,6 @@ declare const _exports: {
1840
1817
  "--tw-text-opacity": string;
1841
1818
  color: string;
1842
1819
  };
1843
- ".dark .dark\\:text-white": {
1844
- "--tw-text-opacity": string;
1845
- color: string;
1846
- };
1847
- ".dark .dark\\:text-gray-400": {
1848
- "--tw-text-opacity": string;
1849
- color: string;
1850
- };
1851
- ".dark .dark\\:text-surface-400": {
1852
- "--tw-text-opacity": string;
1853
- color: string;
1854
- };
1855
1820
  ".dark .dark\\:invert-0": {
1856
1821
  "--tw-invert": string;
1857
1822
  filter: string;
@@ -1864,6 +1829,9 @@ declare const _exports: {
1864
1829
  "--tw-brightness": string;
1865
1830
  filter: string;
1866
1831
  };
1832
+ ".\\[\\&\\>\\.foo-label\\]\\:p-4>.foo-label": {
1833
+ padding: string;
1834
+ };
1867
1835
  ".\\[\\&\\>\\*\\+\\*\\]\\:border-primary-900>*+*": {
1868
1836
  "--tw-border-opacity": string;
1869
1837
  borderColor: string;
@@ -1886,128 +1854,17 @@ declare const _exports: {
1886
1854
  backgroundColor: string;
1887
1855
  color: string;
1888
1856
  };
1889
- ".\\[\\&\\>\\.foo-label\\]\\:p-4>.foo-label": {
1890
- padding: string;
1891
- };
1892
- ".tooltip": {
1893
- position: string;
1894
- zIndex: number;
1895
- transformOrigin: string;
1896
- textAlign: string;
1897
- opacity: number;
1898
- transitionProperty: string;
1899
- transitionTimingFunction: string;
1900
- transitionDuration: string;
1901
- width: string;
1902
- "--tw-bg-opacity": string;
1903
- backgroundColor: string;
1904
- padding: string;
1905
- "--tw-shadow": string;
1906
- "--tw-shadow-colored": string;
1907
- boxShadow: string;
1908
- borderRadius: string;
1909
- };
1910
- ".tooltip-top": {
1911
- top: string;
1912
- left: string;
1913
- "--tw-translate-x": string;
1914
- "--tw-translate-y": string;
1915
- transform: string;
1916
- };
1917
- ".tooltip-bottom": {
1918
- bottom: string;
1919
- left: string;
1920
- "--tw-translate-x": string;
1921
- "--tw-translate-y": string;
1922
- transform: string;
1923
- };
1924
- ".tooltip-left": {
1925
- left: string;
1926
- top: string;
1927
- "--tw-translate-y": string;
1928
- "--tw-translate-x": string;
1929
- transform: string;
1930
- };
1931
- ".tooltip-right": {
1932
- right: string;
1933
- top: string;
1934
- "--tw-translate-y": string;
1935
- "--tw-translate-x": string;
1936
- transform: string;
1937
- };
1938
- ".tooltip-arrow": {
1939
- position: string;
1940
- height: string;
1857
+ ".w-modal-slim": {
1941
1858
  width: string;
1942
- transformOrigin: string;
1943
- "--tw-rotate": string;
1944
- transform: string;
1945
- "--tw-bg-opacity": string;
1946
- backgroundColor: string;
1947
- };
1948
- ".tooltip-arrow-top": {
1949
- position: string;
1950
- height: string;
1951
- width: string;
1952
- transformOrigin: string;
1953
- "--tw-rotate": string;
1954
- "--tw-bg-opacity": string;
1955
- backgroundColor: string;
1956
- bottom: string;
1957
- left: string;
1958
- right: string;
1959
- marginLeft: string;
1960
- marginRight: string;
1961
- "--tw-translate-y": string;
1962
- transform: string;
1963
- };
1964
- ".tooltip-arrow-bottom": {
1965
- position: string;
1966
- height: string;
1967
- width: string;
1968
- transformOrigin: string;
1969
- "--tw-rotate": string;
1970
- "--tw-bg-opacity": string;
1971
- backgroundColor: string;
1972
- top: string;
1973
- left: string;
1974
- right: string;
1975
- marginLeft: string;
1976
- marginRight: string;
1977
- "--tw-translate-y": string;
1978
- transform: string;
1859
+ maxWidth: string;
1979
1860
  };
1980
- ".tooltip-arrow-left": {
1981
- position: string;
1982
- height: string;
1861
+ ".w-modal": {
1983
1862
  width: string;
1984
- transformOrigin: string;
1985
- "--tw-rotate": string;
1986
- "--tw-bg-opacity": string;
1987
- backgroundColor: string;
1988
- top: string;
1989
- bottom: string;
1990
- right: string;
1991
- marginTop: string;
1992
- marginBottom: string;
1993
- "--tw-translate-x": string;
1994
- transform: string;
1863
+ maxWidth: string;
1995
1864
  };
1996
- ".tooltip-arrow-right": {
1997
- position: string;
1998
- height: string;
1865
+ ".w-modal-wide": {
1999
1866
  width: string;
2000
- transformOrigin: string;
2001
- "--tw-rotate": string;
2002
- "--tw-bg-opacity": string;
2003
- backgroundColor: string;
2004
- top: string;
2005
- bottom: string;
2006
- left: string;
2007
- marginTop: string;
2008
- marginBottom: string;
2009
- "--tw-translate-x": string;
2010
- transform: string;
1867
+ maxWidth: string;
2011
1868
  };
2012
1869
  };
2013
1870
  export = _exports;
@@ -1,6 +1,6 @@
1
1
  // The Skeleton Intellisense Tailwind Plugin
2
2
  // Tailwind Docs: https://tailwindcss.com/docs/plugins
3
- // Skeleton Docs: https://www.skeleton.dev/guides/tailwind
3
+ // Skeleton Docs: https://www.skeleton.dev/docs/get-started
4
4
 
5
5
  const plugin = require('tailwindcss/plugin');
6
6
 
@@ -16,6 +16,6 @@ module.exports = plugin(({ addComponents }) => {
16
16
  respectImportant: true,
17
17
  respectPrefix: true
18
18
  });
19
- } catch {}
19
+ } catch { }
20
20
  }
21
21
  });
@@ -1,6 +1,6 @@
1
1
  // The Skeleton Tailwind Plugin
2
2
  // Tailwind Docs: https://tailwindcss.com/docs/plugins
3
- // Skeleton Docs: https://www.skeleton.dev/guides/tailwind
3
+ // Skeleton Docs: https://www.skeleton.dev/docs/get-started
4
4
 
5
5
  const intellisensePlugin = require('./intellisense.cjs');
6
6
  const corePlugin = require('./core.cjs');
@@ -0,0 +1 @@
1
+ export * from './tailwind';
package/types/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './tailwind';
@@ -0,0 +1,4 @@
1
+ export declare const tailwindNumbers: readonly ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
2
+ export type TailwindNumbers = (typeof tailwindNumbers)[number];
3
+ export declare const semanticNames: readonly ["primary", "secondary", "tertiary", "success", "warning"];
4
+ export type SemanticNames = (typeof semanticNames)[number];
@@ -0,0 +1,2 @@
1
+ export const tailwindNumbers = ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'];
2
+ export const semanticNames = ['primary', 'secondary', 'tertiary', 'success', 'warning'];
@@ -4,13 +4,17 @@ import { storeHighlightJs } from "./stores";
4
4
  import { clipboard } from "../../actions/Clipboard/clipboard";
5
5
  export let language = "plaintext";
6
6
  export let code = "";
7
- export let background = "bg-[#141517]";
7
+ export let background = "bg-neutral-900/90";
8
+ export let blur = "";
8
9
  export let text = "text-sm";
9
10
  export let color = "text-white";
10
11
  export let rounded = "rounded-container-token";
11
- export let buttonCopy = "bg-white/5 hover:bg-white/10";
12
+ export let shadow = "shadow";
13
+ export let button = "btn btn-sm variant-soft !text-white";
14
+ export let buttonLabel = "Copy";
15
+ export let buttonCopied = "\u{1F44D}";
12
16
  const cBase = "overflow-hidden shadow";
13
- const cHeader = "text-xs uppercase flex justify-between items-center p-2 pl-4";
17
+ const cHeader = "text-xs text-white/50 uppercase flex justify-between items-center p-2 pl-4";
14
18
  const cPre = "whitespace-pre-wrap break-all p-4 pt-1";
15
19
  let formatted = false;
16
20
  let displayCode = code;
@@ -35,19 +39,19 @@ $:
35
39
  formatted = true;
36
40
  }
37
41
  $:
38
- classesBase = `${cBase} ${background} ${text} ${color} ${rounded} ${$$props.class ?? ""}`;
42
+ classesBase = `${cBase} ${background} ${blur} ${text} ${color} ${rounded} ${shadow} ${$$props.class ?? ""}`;
39
43
  </script>
40
44
 
41
45
  <!-- prettier-ignore -->
42
46
  {#if language && code}
43
47
  <div class="code-block {classesBase}" data-testid="code-block">
44
48
  <!-- Header -->
45
- <header class="code-block-header {cHeader} {background} sticky top-0">
49
+ <header class="code-block-header {cHeader}">
46
50
  <!-- Language -->
47
- <span class="code-block-language text-white/60">{languageFormatter(language)}</span>
51
+ <span class="code-block-language">{languageFormatter(language)}</span>
48
52
  <!-- Copy Button -->
49
- <button class="code-block-btn btn btn-sm {buttonCopy}" on:click={onCopyClick} use:clipboard={code}>
50
- {!copyState ? 'Copy' : 'Copied ✓'}
53
+ <button class="code-block-btn {button}" on:click={onCopyClick} use:clipboard={code}>
54
+ {!copyState ? buttonLabel : buttonCopied}
51
55
  </button>
52
56
  </header>
53
57
  <!-- Pre/Code -->
@@ -8,14 +8,22 @@ declare const __propDef: {
8
8
  code?: string | undefined;
9
9
  /** Provided classes to set the background color.*/
10
10
  background?: string | undefined;
11
+ /** Provided classes to set the backdrop blur.*/
12
+ blur?: string | undefined;
11
13
  /** Provided classes to set the text size.*/
12
14
  text?: string | undefined;
13
15
  /** Provided classes to set the text color.*/
14
16
  color?: string | undefined;
15
17
  /** Provided classes to set the border radius.*/
16
18
  rounded?: string | undefined;
19
+ /** Provided classes to set the box shadow.*/
20
+ shadow?: string | undefined;
17
21
  /** Provided classes to set the button styles.*/
18
- buttonCopy?: string | undefined;
22
+ button?: string | undefined;
23
+ /** Provided the button label text.*/
24
+ buttonLabel?: string | undefined;
25
+ /** Provided the button label text when copied.*/
26
+ buttonCopied?: string | undefined;
19
27
  };
20
28
  events: {
21
29
  /** {{}} copy - Fires when the Copy button is pressed.*/