@docusaurus/theme-classic 0.0.0-4575 → 0.0.0-4592

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.
@@ -24,7 +24,7 @@
24
24
  box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%);
25
25
  }
26
26
 
27
- html[data-theme='dark'] .cardContainer.cardContainerLink:hover {
27
+ [data-theme='dark'] .cardContainer.cardContainerLink:hover {
28
28
  --ifm-card-background-color: #2d2d2d; /* original, non-hovered color is #242526 */
29
29
  }
30
30
 
@@ -69,12 +69,12 @@
69
69
  transform: rotate(0);
70
70
  }
71
71
 
72
- html[dir='rtl'] .expandSidebarButtonIcon {
72
+ [dir='rtl'] .expandSidebarButtonIcon {
73
73
  transform: rotate(180deg);
74
74
  }
75
75
 
76
- html[data-theme='dark'] .collapsedDocSidebar:hover,
77
- html[data-theme='dark'] .collapsedDocSidebar:focus {
76
+ [data-theme='dark'] .collapsedDocSidebar:hover,
77
+ [data-theme='dark'] .collapsedDocSidebar:focus {
78
78
  background-color: var(--collapse-button-bg-color-dark);
79
79
  }
80
80
 
@@ -72,16 +72,16 @@
72
72
  margin-top: 4px;
73
73
  }
74
74
 
75
- html[dir='rtl'] .collapseSidebarButtonIcon {
75
+ [dir='rtl'] .collapseSidebarButtonIcon {
76
76
  transform: rotate(0);
77
77
  }
78
78
 
79
- html[data-theme='dark'] .collapseSidebarButton {
79
+ [data-theme='dark'] .collapseSidebarButton {
80
80
  background-color: var(--collapse-button-bg-color-dark);
81
81
  }
82
82
 
83
- html[data-theme='dark'] .collapseSidebarButton:hover,
84
- html[data-theme='dark'] .collapseSidebarButton:focus {
83
+ [data-theme='dark'] .collapseSidebarButton:hover,
84
+ [data-theme='dark'] .collapseSidebarButton:focus {
85
85
  background-color: var(--ifm-color-emphasis-200);
86
86
  }
87
87
  }
@@ -9,10 +9,10 @@
9
9
  display: none;
10
10
  }
11
11
 
12
- html[data-theme='light'] .themedImage--light {
12
+ [data-theme='light'] .themedImage--light {
13
13
  display: initial;
14
14
  }
15
15
 
16
- html[data-theme='dark'] .themedImage--dark {
16
+ [data-theme='dark'] .themedImage--dark {
17
17
  display: initial;
18
18
  }
@@ -48,11 +48,26 @@ const ToggleComponent = memo(
48
48
  checked={checked}
49
49
  type="checkbox"
50
50
  className={styles.toggleScreenReader}
51
- aria-label={translate({
52
- message: 'Switch between dark and light mode',
53
- id: 'theme.colorToggle.ariaLabel',
54
- description: 'The ARIA label for the navbar color mode toggle',
55
- })}
51
+ aria-label={translate(
52
+ {
53
+ message: 'Switch between dark and light mode (currently {mode})',
54
+ id: 'theme.colorToggle.ariaLabel',
55
+ description: 'The ARIA label for the navbar color mode toggle',
56
+ },
57
+ {
58
+ mode: checked
59
+ ? translate({
60
+ message: 'dark mode',
61
+ id: 'theme.colorToggle.ariaLabel.mode.dark',
62
+ description: 'The name for the dark color mode',
63
+ })
64
+ : translate({
65
+ message: 'light mode',
66
+ id: 'theme.colorToggle.ariaLabel.mode.light',
67
+ description: 'The name for the light color mode',
68
+ }),
69
+ },
70
+ )}
56
71
  onChange={onChange}
57
72
  onClick={() => setChecked(!checked)}
58
73
  onFocus={() => setFocused(true)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-4575",
3
+ "version": "0.0.0-4592",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -21,33 +21,32 @@
21
21
  "format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
22
22
  },
23
23
  "dependencies": {
24
- "@docusaurus/core": "0.0.0-4575",
25
- "@docusaurus/plugin-content-blog": "0.0.0-4575",
26
- "@docusaurus/plugin-content-docs": "0.0.0-4575",
27
- "@docusaurus/plugin-content-pages": "0.0.0-4575",
28
- "@docusaurus/theme-common": "0.0.0-4575",
29
- "@docusaurus/theme-translations": "0.0.0-4575",
30
- "@docusaurus/utils": "0.0.0-4575",
31
- "@docusaurus/utils-common": "0.0.0-4575",
32
- "@docusaurus/utils-validation": "0.0.0-4575",
24
+ "@docusaurus/core": "0.0.0-4592",
25
+ "@docusaurus/plugin-content-blog": "0.0.0-4592",
26
+ "@docusaurus/plugin-content-docs": "0.0.0-4592",
27
+ "@docusaurus/plugin-content-pages": "0.0.0-4592",
28
+ "@docusaurus/theme-common": "0.0.0-4592",
29
+ "@docusaurus/theme-translations": "0.0.0-4592",
30
+ "@docusaurus/utils": "0.0.0-4592",
31
+ "@docusaurus/utils-common": "0.0.0-4592",
32
+ "@docusaurus/utils-validation": "0.0.0-4592",
33
33
  "@mdx-js/react": "^1.6.22",
34
34
  "clsx": "^1.1.1",
35
35
  "copy-text-to-clipboard": "^3.0.1",
36
36
  "infima": "0.2.0-alpha.37",
37
- "lodash": "^4.17.20",
38
- "postcss": "^8.3.7",
37
+ "lodash": "^4.17.21",
38
+ "postcss": "^8.4.6",
39
39
  "prism-react-renderer": "^1.2.1",
40
40
  "prismjs": "^1.26.0",
41
41
  "react-router-dom": "^5.2.0",
42
42
  "rtlcss": "^3.3.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@docusaurus/module-type-aliases": "0.0.0-4575",
46
- "@docusaurus/types": "0.0.0-4575",
47
- "@types/mdx-js__react": "^1.5.4",
48
- "@types/parse-numeric-range": "^0.0.1",
45
+ "@docusaurus/module-type-aliases": "0.0.0-4592",
46
+ "@docusaurus/types": "0.0.0-4592",
47
+ "@types/mdx-js__react": "^1.5.5",
49
48
  "@types/prismjs": "^1.26.0",
50
- "@types/rtlcss": "^3.1.1",
49
+ "@types/rtlcss": "^3.1.2",
51
50
  "cross-env": "^7.0.3",
52
51
  "fs-extra": "^10.0.0",
53
52
  "react-test-renderer": "^17.0.2",
@@ -60,5 +59,5 @@
60
59
  "engines": {
61
60
  "node": ">=14"
62
61
  },
63
- "gitHead": "6f6bea788fa928f20f1c54d60f2e1bdd47369b3f"
62
+ "gitHead": "c91e72ce9e1b7a5e5bd30752ddebca6535de13fb"
64
63
  }
@@ -24,7 +24,7 @@
24
24
  box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%);
25
25
  }
26
26
 
27
- html[data-theme='dark'] .cardContainer.cardContainerLink:hover {
27
+ [data-theme='dark'] .cardContainer.cardContainerLink:hover {
28
28
  --ifm-card-background-color: #2d2d2d; /* original, non-hovered color is #242526 */
29
29
  }
30
30
 
@@ -69,12 +69,12 @@
69
69
  transform: rotate(0);
70
70
  }
71
71
 
72
- html[dir='rtl'] .expandSidebarButtonIcon {
72
+ [dir='rtl'] .expandSidebarButtonIcon {
73
73
  transform: rotate(180deg);
74
74
  }
75
75
 
76
- html[data-theme='dark'] .collapsedDocSidebar:hover,
77
- html[data-theme='dark'] .collapsedDocSidebar:focus {
76
+ [data-theme='dark'] .collapsedDocSidebar:hover,
77
+ [data-theme='dark'] .collapsedDocSidebar:focus {
78
78
  background-color: var(--collapse-button-bg-color-dark);
79
79
  }
80
80
 
@@ -72,16 +72,16 @@
72
72
  margin-top: 4px;
73
73
  }
74
74
 
75
- html[dir='rtl'] .collapseSidebarButtonIcon {
75
+ [dir='rtl'] .collapseSidebarButtonIcon {
76
76
  transform: rotate(0);
77
77
  }
78
78
 
79
- html[data-theme='dark'] .collapseSidebarButton {
79
+ [data-theme='dark'] .collapseSidebarButton {
80
80
  background-color: var(--collapse-button-bg-color-dark);
81
81
  }
82
82
 
83
- html[data-theme='dark'] .collapseSidebarButton:hover,
84
- html[data-theme='dark'] .collapseSidebarButton:focus {
83
+ [data-theme='dark'] .collapseSidebarButton:hover,
84
+ [data-theme='dark'] .collapseSidebarButton:focus {
85
85
  background-color: var(--ifm-color-emphasis-200);
86
86
  }
87
87
  }
@@ -9,10 +9,10 @@
9
9
  display: none;
10
10
  }
11
11
 
12
- html[data-theme='light'] .themedImage--light {
12
+ [data-theme='light'] .themedImage--light {
13
13
  display: initial;
14
14
  }
15
15
 
16
- html[data-theme='dark'] .themedImage--dark {
16
+ [data-theme='dark'] .themedImage--dark {
17
17
  display: initial;
18
18
  }
@@ -62,11 +62,26 @@ const ToggleComponent = memo(
62
62
  checked={checked}
63
63
  type="checkbox"
64
64
  className={styles.toggleScreenReader}
65
- aria-label={translate({
66
- message: 'Switch between dark and light mode',
67
- id: 'theme.colorToggle.ariaLabel',
68
- description: 'The ARIA label for the navbar color mode toggle',
69
- })}
65
+ aria-label={translate(
66
+ {
67
+ message: 'Switch between dark and light mode (currently {mode})',
68
+ id: 'theme.colorToggle.ariaLabel',
69
+ description: 'The ARIA label for the navbar color mode toggle',
70
+ },
71
+ {
72
+ mode: checked
73
+ ? translate({
74
+ message: 'dark mode',
75
+ id: 'theme.colorToggle.ariaLabel.mode.dark',
76
+ description: 'The name for the dark color mode',
77
+ })
78
+ : translate({
79
+ message: 'light mode',
80
+ id: 'theme.colorToggle.ariaLabel.mode.light',
81
+ description: 'The name for the light color mode',
82
+ }),
83
+ },
84
+ )}
70
85
  onChange={onChange}
71
86
  onClick={() => setChecked(!checked)}
72
87
  onFocus={() => setFocused(true)}