cozy-ui 111.11.0 → 111.12.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [111.12.0](https://github.com/cozy/cozy-ui/compare/v111.11.0...v111.12.0) (2024-09-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * Remove `ui.darkmode.enabled` flag condition ([67e67cd](https://github.com/cozy/cozy-ui/commit/67e67cd))
7
+
1
8
  # [111.11.0](https://github.com/cozy/cozy-ui/compare/v111.10.0...v111.11.0) (2024-09-18)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "111.11.0",
3
+ "version": "111.12.0",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -2,8 +2,6 @@ import cx from 'classnames'
2
2
  import PropTypes from 'prop-types'
3
3
  import React from 'react'
4
4
 
5
- import flag from 'cozy-flags'
6
-
7
5
  import { CozyThemeContext } from './index'
8
6
  import MuiCozyTheme from '../../MuiCozyTheme'
9
7
  import useMediaQuery from '../../hooks/useMediaQuery'
@@ -18,11 +16,8 @@ const DumbCozyTheme = ({
18
16
  const uiThemeType = localStorage.getItem('ui-theme-type') // use only for cozy-ui documentation and argos screenshots
19
17
  const uiThemeVariant = localStorage.getItem('ui-theme-variant') // use only for cozy-ui documentation and argos screenshots
20
18
 
21
- const isOnlyLight = !!flag('ui.darkmode.enabled') // should be remove when dark mode is validated on all apps
22
19
  const deviceThemeType = useMediaQuery('(prefers-color-scheme: dark)')
23
- ? isOnlyLight
24
- ? 'dark'
25
- : 'light'
20
+ ? 'dark'
26
21
  : 'light'
27
22
  const filteredSettingsThemeType = ['light', 'dark'].includes(
28
23
  settingsThemeType
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import cx from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
4
  import React from 'react';
5
- import flag from 'cozy-flags';
6
5
  import { CozyThemeContext } from "cozy-ui/transpiled/react/providers/CozyTheme/index";
7
6
  import MuiCozyTheme from "cozy-ui/transpiled/react/MuiCozyTheme";
8
7
  import useMediaQuery from "cozy-ui/transpiled/react/hooks/useMediaQuery";
@@ -19,9 +18,7 @@ var DumbCozyTheme = function DumbCozyTheme(_ref) {
19
18
 
20
19
  var uiThemeVariant = localStorage.getItem('ui-theme-variant'); // use only for cozy-ui documentation and argos screenshots
21
20
 
22
- var isOnlyLight = !!flag('ui.darkmode.enabled'); // should be remove when dark mode is validated on all apps
23
-
24
- var deviceThemeType = useMediaQuery('(prefers-color-scheme: dark)') ? isOnlyLight ? 'dark' : 'light' : 'light';
21
+ var deviceThemeType = useMediaQuery('(prefers-color-scheme: dark)') ? 'dark' : 'light';
25
22
  var filteredSettingsThemeType = ['light', 'dark'].includes(settingsThemeType) ? settingsThemeType : undefined;
26
23
  var selfThemeType = uiThemeType || filteredSettingsThemeType || deviceThemeType;
27
24
  var selfThemeVariant = uiThemeVariant || variant;