cozy-ui 111.10.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,17 @@
|
|
|
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
|
+
|
|
8
|
+
# [111.11.0](https://github.com/cozy/cozy-ui/compare/v111.10.0...v111.11.0) (2024-09-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Expose `fileToArrayBuffer` from ActionsMenu actions helpers ([72b6e21](https://github.com/cozy/cozy-ui/commit/72b6e21))
|
|
14
|
+
|
|
1
15
|
# [111.10.0](https://github.com/cozy/cozy-ui/compare/v111.9.0...v111.10.0) (2024-09-16)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -177,7 +177,7 @@ const addImageToPdf = async (pdfDoc, file) => {
|
|
|
177
177
|
* @param {File} file
|
|
178
178
|
* @returns {Promise<ArrayBuffer>}
|
|
179
179
|
*/
|
|
180
|
-
const fileToArrayBuffer = async file => {
|
|
180
|
+
export const fileToArrayBuffer = async file => {
|
|
181
181
|
if ('arrayBuffer' in file) return await file.arrayBuffer()
|
|
182
182
|
|
|
183
183
|
return new Promise((resolve, reject) => {
|
|
@@ -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
|
-
?
|
|
24
|
-
? 'dark'
|
|
25
|
-
: 'light'
|
|
20
|
+
? 'dark'
|
|
26
21
|
: 'light'
|
|
27
22
|
const filteredSettingsThemeType = ['light', 'dark'].includes(
|
|
28
23
|
settingsThemeType
|
|
@@ -256,7 +256,7 @@ var addImageToPdf = /*#__PURE__*/function () {
|
|
|
256
256
|
*/
|
|
257
257
|
|
|
258
258
|
|
|
259
|
-
var fileToArrayBuffer = /*#__PURE__*/function () {
|
|
259
|
+
export var fileToArrayBuffer = /*#__PURE__*/function () {
|
|
260
260
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(file) {
|
|
261
261
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
262
262
|
while (1) {
|
|
@@ -303,7 +303,6 @@ var fileToArrayBuffer = /*#__PURE__*/function () {
|
|
|
303
303
|
* @returns {Promise<void>}
|
|
304
304
|
*/
|
|
305
305
|
|
|
306
|
-
|
|
307
306
|
var addPdfToPdf = /*#__PURE__*/function () {
|
|
308
307
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(pdfDoc, file) {
|
|
309
308
|
var pdfToAdd, document, copiedPages;
|
|
@@ -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
|
|
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;
|