@serendie/ui 2.5.1 → 3.0.0-dev.202602191126

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 (67) hide show
  1. package/README.md +63 -8
  2. package/dist/client.js +135 -119
  3. package/dist/components/Avatar/Avatar.js +3 -3
  4. package/dist/components/Badge/Badge.d.ts +6 -6
  5. package/dist/components/Badge/Badge.js +21 -21
  6. package/dist/components/Banner/Banner.d.ts +1 -4
  7. package/dist/components/Banner/Banner.js +8 -11
  8. package/dist/components/Button/Button.d.ts +0 -2
  9. package/dist/components/Button/Button.js +10 -11
  10. package/dist/components/CheckBox/CheckBox.js +4 -4
  11. package/dist/components/DataTable/table/BodyCell.d.ts +4 -2
  12. package/dist/components/DataTable/table/BodyCell.js +30 -24
  13. package/dist/components/DataTable/table/HeaderCell.d.ts +5 -2
  14. package/dist/components/DataTable/table/HeaderCell.js +69 -59
  15. package/dist/components/DataTable/table/HeaderRow.d.ts +6 -3
  16. package/dist/components/DataTable/table/HeaderRow.js +38 -35
  17. package/dist/components/DataTable/table/Root.d.ts +3 -3
  18. package/dist/components/DataTable/table/Root.js +8 -11
  19. package/dist/components/DataTable/table/Row.d.ts +8 -3
  20. package/dist/components/DataTable/table/Row.js +44 -32
  21. package/dist/components/DataTable/table/Tbody.d.ts +2 -1
  22. package/dist/components/DataTable/table/Tbody.js +4 -5
  23. package/dist/components/DataTable/table/Thead.d.ts +2 -1
  24. package/dist/components/DataTable/table/Thead.js +4 -5
  25. package/dist/components/DataTable/table/Tr.d.ts +2 -1
  26. package/dist/components/DataTable/table/Tr.js +20 -24
  27. package/dist/components/DatePicker/styles.js +1 -1
  28. package/dist/components/Divider/Divider.d.ts +2 -2
  29. package/dist/components/Divider/Divider.js +11 -11
  30. package/dist/components/Drawer/Drawer.js +3 -3
  31. package/dist/components/DropdownMenu/DropdownMenu.js +5 -5
  32. package/dist/components/IconButton/IconButton.d.ts +0 -1
  33. package/dist/components/IconButton/IconButton.js +0 -1
  34. package/dist/components/ModalDialog/ModalDialog.js +1 -1
  35. package/dist/components/ProgressIndicator/ProgressIndicator.js +9 -9
  36. package/dist/components/Search/Search.js +5 -5
  37. package/dist/components/Select/Select.js +14 -14
  38. package/dist/components/Switch/Switch.js +5 -5
  39. package/dist/components/Toast/Toast.d.ts +3 -5
  40. package/dist/components/Toast/Toast.js +8 -10
  41. package/dist/i18n/index.d.ts +1 -1
  42. package/dist/i18n/provider.d.ts +29 -4
  43. package/dist/i18n/provider.js +31 -11
  44. package/dist/index.d.ts +2 -0
  45. package/dist/index.js +135 -119
  46. package/dist/node_modules/@serendie/design-token/dist/panda-tokens.js +310 -0
  47. package/dist/node_modules/@serendie/design-token/dist/tokens.js +126 -0
  48. package/dist/preset.d.ts +310 -0
  49. package/dist/styled-system/css/conditions.js +1 -1
  50. package/dist/styled-system/jsx/is-valid-prop.js +1 -1
  51. package/dist/styles.css +1 -1
  52. package/dist/theme/ThemeContext.d.ts +55 -0
  53. package/dist/theme/ThemeContext.js +15 -0
  54. package/dist/theme/index.d.ts +3 -0
  55. package/dist/theme/index.js +11 -0
  56. package/dist/theme/initColorScheme.d.ts +74 -0
  57. package/dist/theme/initColorScheme.js +32 -0
  58. package/dist/theme/useSystemColorScheme.d.ts +15 -0
  59. package/dist/theme/useSystemColorScheme.js +19 -0
  60. package/dist/tokens/getToken.d.ts +126 -0
  61. package/dist/tokens/index.d.ts +310 -0
  62. package/package.json +2 -2
  63. package/styled-system/css/conditions.js +1 -1
  64. package/styled-system/jsx/is-valid-prop.js +1 -1
  65. package/styled-system/themes/index.d.ts +6 -1
  66. package/styled-system/themes/theme-konjo-dark.json +5 -0
  67. package/styled-system/types/conditions.d.ts +2 -0
@@ -0,0 +1,74 @@
1
+ import { ColorTheme, ColorMode } from './ThemeContext';
2
+ export interface ColorSchemeScriptOptions {
3
+ /** カラーテーマを直接指定(localStorageより優先) */
4
+ colorTheme?: ColorTheme;
5
+ /** カラーモードを直接指定(localStorageより優先) */
6
+ colorMode?: ColorMode;
7
+ /** デフォルトのカラーテーマ(デフォルト: 'konjo')。colorTheme未指定かつlocalStorageに値がない場合に使用 */
8
+ defaultTheme?: ColorTheme;
9
+ /** デフォルトのカラーモード(デフォルト: 'light')。colorMode未指定かつlocalStorageに値がない場合に使用 */
10
+ defaultColorMode?: ColorMode;
11
+ /** localStorageのキー(テーマ)(デフォルト: 'serendie-color-theme') */
12
+ themeStorageKey?: string;
13
+ /** localStorageのキー(モード)(デフォルト: 'serendie-color-mode') */
14
+ modeStorageKey?: string;
15
+ }
16
+ /**
17
+ * FOUC(Flash of Unstyled Content)を防ぐためのインラインスクリプトを生成する
18
+ *
19
+ * このスクリプトはHTMLの<head>内にインラインで埋め込むことで、
20
+ * ページ読み込み時に正しいテーマが即座に適用されるようにします。
21
+ *
22
+ * @param options - スクリプト生成オプション
23
+ * @returns インラインスクリプトの文字列
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * // Next.js App Routerでの使用例
28
+ * // 推奨: ColorSchemeScriptコンポーネントを使用してください
29
+ * import { getColorSchemeScript } from '@serendie/ui';
30
+ *
31
+ * export default function RootLayout({ children }) {
32
+ * return (
33
+ * <html suppressHydrationWarning>
34
+ * <head>
35
+ * <script
36
+ * dangerouslySetInnerHTML={{
37
+ * __html: getColorSchemeScript({ colorTheme: 'konjo', colorMode: 'system' })
38
+ * }}
39
+ * />
40
+ * </head>
41
+ * <body>{children}</body>
42
+ * </html>
43
+ * );
44
+ * }
45
+ * ```
46
+ */
47
+ export declare function getColorSchemeScript(options?: ColorSchemeScriptOptions): string;
48
+ /**
49
+ * FOUC防止用のReactコンポーネント
50
+ * Next.jsのApp Routerで使用する場合のヘルパー
51
+ *
52
+ * SerendieProviderの内側で使用する場合、propsを省略するとContextから
53
+ * テーマ設定を自動的に取得します。
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * // layout.tsx(推奨: SerendieProviderの内側で使用)
58
+ * import { ColorSchemeScript, SerendieProvider } from '@serendie/ui';
59
+ *
60
+ * export default function RootLayout({ children }) {
61
+ * return (
62
+ * <SerendieProvider lang="ja" colorTheme="konjo" colorMode="system">
63
+ * <html suppressHydrationWarning>
64
+ * <head>
65
+ * <ColorSchemeScript />
66
+ * </head>
67
+ * <body>{children}</body>
68
+ * </html>
69
+ * </SerendieProvider>
70
+ * );
71
+ * }
72
+ * ```
73
+ */
74
+ export declare function ColorSchemeScript(props?: ColorSchemeScriptOptions): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { useThemeContext as n } from "./ThemeContext.js";
3
+ function l(o = {}) {
4
+ const {
5
+ colorTheme: e,
6
+ colorMode: t,
7
+ defaultTheme: r = "konjo",
8
+ defaultColorMode: m = "light",
9
+ themeStorageKey: a = "serendie-color-theme",
10
+ modeStorageKey: c = "serendie-color-mode"
11
+ } = o;
12
+ return e !== void 0 || t !== void 0 ? `(function(){try{var t='${e ?? r}';var m='${t ?? m}';var d=window.matchMedia('(prefers-color-scheme:dark)').matches;var k=m==='dark'||(m==='system'&&d);if(k){document.documentElement.dataset.pandaTheme='konjo-dark'}else if(t!=='konjo'){document.documentElement.dataset.pandaTheme=t}}catch(e){}})();` : `(function(){try{var t=localStorage.getItem('${a}')||'${r}';var m=localStorage.getItem('${c}')||'${m}';var d=window.matchMedia('(prefers-color-scheme:dark)').matches;var k=m==='dark'||(m==='system'&&d);if(k){document.documentElement.dataset.pandaTheme='konjo-dark'}else if(t!=='konjo'){document.documentElement.dataset.pandaTheme=t}}catch(e){}})();`;
13
+ }
14
+ function f(o = {}) {
15
+ const e = n(), t = o.colorTheme ?? (e == null ? void 0 : e.colorTheme), r = o.colorMode ?? (e == null ? void 0 : e.colorMode);
16
+ return /* @__PURE__ */ d(
17
+ "script",
18
+ {
19
+ dangerouslySetInnerHTML: {
20
+ __html: l({
21
+ ...o,
22
+ colorTheme: t,
23
+ colorMode: r
24
+ })
25
+ }
26
+ }
27
+ );
28
+ }
29
+ export {
30
+ f as ColorSchemeScript,
31
+ l as getColorSchemeScript
32
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * OSのカラースキーム設定を検出するフック
3
+ * prefers-color-schemeメディアクエリを監視し、変更を検知する
4
+ *
5
+ * @returns 'light' | 'dark' - 現在のシステムカラースキーム
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * function Component() {
10
+ * const systemScheme = useSystemColorScheme();
11
+ * // systemScheme は 'light' または 'dark'
12
+ * }
13
+ * ```
14
+ */
15
+ export declare function useSystemColorScheme(): "light" | "dark";
@@ -0,0 +1,19 @@
1
+ import { useSyncExternalStore as t } from "react";
2
+ function n() {
3
+ return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
4
+ }
5
+ function o(e) {
6
+ const r = window.matchMedia("(prefers-color-scheme: dark)");
7
+ return r.addEventListener("change", e), () => r.removeEventListener("change", e);
8
+ }
9
+ function c() {
10
+ return t(
11
+ o,
12
+ n,
13
+ () => "light"
14
+ // サーバー側のスナップショット
15
+ );
16
+ }
17
+ export {
18
+ c as useSystemColorScheme
19
+ };
@@ -774,6 +774,132 @@ export declare function getToken(): {
774
774
  };
775
775
  };
776
776
  };
777
+ "konjo-dark": {
778
+ tokens: {
779
+ colors: {
780
+ sd: {
781
+ system: {
782
+ color: {
783
+ impression: {
784
+ primary: string;
785
+ onPrimary: string;
786
+ primaryContainer: string;
787
+ onPrimaryContainer: string;
788
+ secondary: string;
789
+ onSecondary: string;
790
+ secondaryContainer: string;
791
+ onSecondaryContainer: string;
792
+ tertiary: string;
793
+ onTertiary: string;
794
+ tertiaryContainer: string;
795
+ onTertiaryContainer: string;
796
+ notice: string;
797
+ onNotice: string;
798
+ noticeContainer: string;
799
+ onNoticeContainer: string;
800
+ noticeContainerVariant: string;
801
+ onNoticeContainerVariant: string;
802
+ negative: string;
803
+ onNegative: string;
804
+ negativeContainer: string;
805
+ onNegativeContainer: string;
806
+ negativeContainerVariant: string;
807
+ onNegativeContainerVariant: string;
808
+ positive: string;
809
+ onPositive: string;
810
+ positiveContainer: string;
811
+ onPositiveContainer: string;
812
+ positiveContainerVariant: string;
813
+ onPositiveContainerVariant: string;
814
+ };
815
+ component: {
816
+ surface: string;
817
+ onSurface: string;
818
+ onSurfaceVariant: string;
819
+ inverseSurface: string;
820
+ inverseOnSurface: string;
821
+ inversePrimary: string;
822
+ outlineBright: string;
823
+ outline: string;
824
+ outlineDim: string;
825
+ scrim: string;
826
+ surfaceDim: string;
827
+ surfaceBright: string;
828
+ surfaceContainerBright: string;
829
+ surfaceContainer: string;
830
+ surfaceContainerDim: string;
831
+ };
832
+ interaction: {
833
+ disabled: string;
834
+ disabledOnSurface: string;
835
+ selected: string;
836
+ selectedSurface: string;
837
+ hovered: string;
838
+ hoveredVariant: string;
839
+ hoveredOnPrimary: string;
840
+ };
841
+ chart: {
842
+ mark: {
843
+ primary: {
844
+ "01": string;
845
+ "02": string;
846
+ "03": string;
847
+ "04": string;
848
+ "05": string;
849
+ "06": string;
850
+ };
851
+ positive: {
852
+ "01": string;
853
+ "02": string;
854
+ "03": string;
855
+ "04": string;
856
+ "05": string;
857
+ "06": string;
858
+ };
859
+ negative: {
860
+ "01": string;
861
+ "02": string;
862
+ "03": string;
863
+ "04": string;
864
+ "05": string;
865
+ "06": string;
866
+ };
867
+ notice: {
868
+ "01": string;
869
+ "02": string;
870
+ "03": string;
871
+ "04": string;
872
+ "05": string;
873
+ "06": string;
874
+ };
875
+ multi: {
876
+ 10: string;
877
+ "01": string;
878
+ "02": string;
879
+ "03": string;
880
+ "04": string;
881
+ "05": string;
882
+ "06": string;
883
+ "07": string;
884
+ "08": string;
885
+ "09": string;
886
+ };
887
+ };
888
+ component: {
889
+ onMarkLabel: string;
890
+ inverseOnMarkLabel: string;
891
+ scalemark: string;
892
+ threshold: string;
893
+ chartSurface: string;
894
+ onChartSurface: string;
895
+ };
896
+ };
897
+ };
898
+ };
899
+ };
900
+ };
901
+ };
902
+ };
777
903
  kurikawa: {
778
904
  tokens: {
779
905
  colors: {
@@ -1570,6 +1570,316 @@ export declare const SerendieTokens: {
1570
1570
  };
1571
1571
  };
1572
1572
  };
1573
+ "konjo-dark": {
1574
+ tokens: {
1575
+ colors: {
1576
+ sd: {
1577
+ system: {
1578
+ color: {
1579
+ impression: {
1580
+ primary: {
1581
+ value: string;
1582
+ };
1583
+ onPrimary: {
1584
+ value: string;
1585
+ };
1586
+ primaryContainer: {
1587
+ value: string;
1588
+ };
1589
+ onPrimaryContainer: {
1590
+ value: string;
1591
+ };
1592
+ secondary: {
1593
+ value: string;
1594
+ };
1595
+ onSecondary: {
1596
+ value: string;
1597
+ };
1598
+ secondaryContainer: {
1599
+ value: string;
1600
+ };
1601
+ onSecondaryContainer: {
1602
+ value: string;
1603
+ };
1604
+ tertiary: {
1605
+ value: string;
1606
+ };
1607
+ onTertiary: {
1608
+ value: string;
1609
+ };
1610
+ tertiaryContainer: {
1611
+ value: string;
1612
+ };
1613
+ onTertiaryContainer: {
1614
+ value: string;
1615
+ };
1616
+ notice: {
1617
+ value: string;
1618
+ };
1619
+ onNotice: {
1620
+ value: string;
1621
+ };
1622
+ noticeContainer: {
1623
+ value: string;
1624
+ };
1625
+ onNoticeContainer: {
1626
+ value: string;
1627
+ };
1628
+ noticeContainerVariant: {
1629
+ value: string;
1630
+ };
1631
+ onNoticeContainerVariant: {
1632
+ value: string;
1633
+ };
1634
+ negative: {
1635
+ value: string;
1636
+ };
1637
+ onNegative: {
1638
+ value: string;
1639
+ };
1640
+ negativeContainer: {
1641
+ value: string;
1642
+ };
1643
+ onNegativeContainer: {
1644
+ value: string;
1645
+ };
1646
+ negativeContainerVariant: {
1647
+ value: string;
1648
+ };
1649
+ onNegativeContainerVariant: {
1650
+ value: string;
1651
+ };
1652
+ positive: {
1653
+ value: string;
1654
+ };
1655
+ onPositive: {
1656
+ value: string;
1657
+ };
1658
+ positiveContainer: {
1659
+ value: string;
1660
+ };
1661
+ onPositiveContainer: {
1662
+ value: string;
1663
+ };
1664
+ positiveContainerVariant: {
1665
+ value: string;
1666
+ };
1667
+ onPositiveContainerVariant: {
1668
+ value: string;
1669
+ };
1670
+ };
1671
+ component: {
1672
+ surface: {
1673
+ value: string;
1674
+ };
1675
+ onSurface: {
1676
+ value: string;
1677
+ };
1678
+ onSurfaceVariant: {
1679
+ value: string;
1680
+ };
1681
+ inverseSurface: {
1682
+ value: string;
1683
+ };
1684
+ inverseOnSurface: {
1685
+ value: string;
1686
+ };
1687
+ inversePrimary: {
1688
+ value: string;
1689
+ };
1690
+ outlineBright: {
1691
+ value: string;
1692
+ };
1693
+ outline: {
1694
+ value: string;
1695
+ };
1696
+ outlineDim: {
1697
+ value: string;
1698
+ };
1699
+ scrim: {
1700
+ value: string;
1701
+ };
1702
+ surfaceDim: {
1703
+ value: string;
1704
+ };
1705
+ surfaceBright: {
1706
+ value: string;
1707
+ };
1708
+ surfaceContainerBright: {
1709
+ value: string;
1710
+ };
1711
+ surfaceContainer: {
1712
+ value: string;
1713
+ };
1714
+ surfaceContainerDim: {
1715
+ value: string;
1716
+ };
1717
+ };
1718
+ interaction: {
1719
+ disabled: {
1720
+ value: string;
1721
+ };
1722
+ disabledOnSurface: {
1723
+ value: string;
1724
+ };
1725
+ selected: {
1726
+ value: string;
1727
+ };
1728
+ selectedSurface: {
1729
+ value: string;
1730
+ };
1731
+ hovered: {
1732
+ value: string;
1733
+ };
1734
+ hoveredVariant: {
1735
+ value: string;
1736
+ };
1737
+ hoveredOnPrimary: {
1738
+ value: string;
1739
+ };
1740
+ };
1741
+ chart: {
1742
+ mark: {
1743
+ primary: {
1744
+ "01": {
1745
+ value: string;
1746
+ };
1747
+ "02": {
1748
+ value: string;
1749
+ };
1750
+ "03": {
1751
+ value: string;
1752
+ };
1753
+ "04": {
1754
+ value: string;
1755
+ };
1756
+ "05": {
1757
+ value: string;
1758
+ };
1759
+ "06": {
1760
+ value: string;
1761
+ };
1762
+ };
1763
+ positive: {
1764
+ "01": {
1765
+ value: string;
1766
+ };
1767
+ "02": {
1768
+ value: string;
1769
+ };
1770
+ "03": {
1771
+ value: string;
1772
+ };
1773
+ "04": {
1774
+ value: string;
1775
+ };
1776
+ "05": {
1777
+ value: string;
1778
+ };
1779
+ "06": {
1780
+ value: string;
1781
+ };
1782
+ };
1783
+ negative: {
1784
+ "01": {
1785
+ value: string;
1786
+ };
1787
+ "02": {
1788
+ value: string;
1789
+ };
1790
+ "03": {
1791
+ value: string;
1792
+ };
1793
+ "04": {
1794
+ value: string;
1795
+ };
1796
+ "05": {
1797
+ value: string;
1798
+ };
1799
+ "06": {
1800
+ value: string;
1801
+ };
1802
+ };
1803
+ notice: {
1804
+ "01": {
1805
+ value: string;
1806
+ };
1807
+ "02": {
1808
+ value: string;
1809
+ };
1810
+ "03": {
1811
+ value: string;
1812
+ };
1813
+ "04": {
1814
+ value: string;
1815
+ };
1816
+ "05": {
1817
+ value: string;
1818
+ };
1819
+ "06": {
1820
+ value: string;
1821
+ };
1822
+ };
1823
+ multi: {
1824
+ 10: {
1825
+ value: string;
1826
+ };
1827
+ "01": {
1828
+ value: string;
1829
+ };
1830
+ "02": {
1831
+ value: string;
1832
+ };
1833
+ "03": {
1834
+ value: string;
1835
+ };
1836
+ "04": {
1837
+ value: string;
1838
+ };
1839
+ "05": {
1840
+ value: string;
1841
+ };
1842
+ "06": {
1843
+ value: string;
1844
+ };
1845
+ "07": {
1846
+ value: string;
1847
+ };
1848
+ "08": {
1849
+ value: string;
1850
+ };
1851
+ "09": {
1852
+ value: string;
1853
+ };
1854
+ };
1855
+ };
1856
+ component: {
1857
+ onMarkLabel: {
1858
+ value: string;
1859
+ };
1860
+ inverseOnMarkLabel: {
1861
+ value: string;
1862
+ };
1863
+ scalemark: {
1864
+ value: string;
1865
+ };
1866
+ threshold: {
1867
+ value: string;
1868
+ };
1869
+ chartSurface: {
1870
+ value: string;
1871
+ };
1872
+ onChartSurface: {
1873
+ value: string;
1874
+ };
1875
+ };
1876
+ };
1877
+ };
1878
+ };
1879
+ };
1880
+ };
1881
+ };
1882
+ };
1573
1883
  kurikawa: {
1574
1884
  tokens: {
1575
1885
  colors: {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@serendie/ui",
3
3
  "description": "Adaptive UI component library as part of Serendie Design System by Mitsubishi Electric",
4
4
  "license": "MIT",
5
- "version": "2.5.1",
5
+ "version": "3.0.0-dev.202602191126",
6
6
  "type": "module",
7
7
  "types": "./dist/index.d.ts",
8
8
  "sideEffects": [
@@ -54,7 +54,7 @@
54
54
  "@eslint/js": "^9.8.0",
55
55
  "@figma/code-connect": "^1.3.4",
56
56
  "@pandacss/eslint-plugin": "^0.1.1",
57
- "@serendie/design-token": "^1.3.0",
57
+ "@serendie/design-token": "^1.4.2",
58
58
  "@storybook/addon-designs": "^8.0.3",
59
59
  "@storybook/addon-essentials": "^8.2.4",
60
60
  "@storybook/addon-interactions": "^8.2.4",
@@ -1,6 +1,6 @@
1
1
  import { withoutSpace } from '../helpers.js';
2
2
 
3
- const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,expanded,expandedOnly,expandedDown,_themeAsagi,_themeKurikawa,_themeSumire,_themeTsutsuji,base"
3
+ const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,expanded,expandedOnly,expandedDown,_themeAsagi,_themeKonjo-dark,_themeKurikawa,_themeSumire,_themeTsutsuji,base"
4
4
  const conditions = new Set(conditionsStr.split(','))
5
5
 
6
6
  const conditionRegex = /^@|&|&$/