@movalib/movalib-commons 1.55.0 → 1.55.2

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.
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import './QRCode.css';
2
+ import './style/QRCode.css';
3
3
  interface QRCodeProps {
4
4
  size?: number;
5
5
  data?: string;
@@ -51,13 +51,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
51
51
  };
52
52
  Object.defineProperty(exports, "__esModule", { value: true });
53
53
  var jsx_runtime_1 = require("react/jsx-runtime");
54
- var react_1 = require("react");
55
- var leaf_yellow_small_png_1 = __importDefault(require("./assets/images/leaf_yellow_small.png"));
56
54
  var material_1 = require("@mui/material");
57
- var qr_code_styling_1 = __importDefault(require("qr-code-styling"));
58
- require("./QRCode.css");
59
55
  var html2canvas_1 = __importDefault(require("html2canvas"));
56
+ var qr_code_styling_1 = __importDefault(require("qr-code-styling"));
57
+ var react_1 = require("react");
60
58
  var DownloadedQRCode_1 = require("./DownloadedQRCode");
59
+ var leaf_yellow_small_png_1 = __importDefault(require("./assets/images/leaf_yellow_small.png"));
60
+ require("./style/QRCode.css");
61
61
  var QRCode = function (_a) {
62
62
  var _b = _a.size, size = _b === void 0 ? 300 : _b, data = _a.data, _c = _a.showDownload, showDownload = _c === void 0 ? false : _c, _d = _a.showCTAWhenDownloaded, showCTAWhenDownloaded = _d === void 0 ? false : _d;
63
63
  var theme = (0, material_1.useTheme)();
@@ -1,4 +1,4 @@
1
- import './QRCode.css';
1
+ import '../../style/QRCode.css';
2
2
  export declare const QrCodePLVContainer: ({ data }: {
3
3
  data: string;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -18,7 +18,7 @@ exports.QrCodePLVContainer = void 0;
18
18
  var jsx_runtime_1 = require("react/jsx-runtime");
19
19
  var icons_material_1 = require("@mui/icons-material");
20
20
  var material_1 = require("@mui/material");
21
- require("./QRCode.css");
21
+ require("../../style/QRCode.css");
22
22
  var html2canvas_1 = __importDefault(require("html2canvas"));
23
23
  var qr_code_styling_1 = __importDefault(require("qr-code-styling"));
24
24
  var react_1 = require("react");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.55.0",
3
+ "version": "1.55.2",
4
4
  "description": "Bibliothèque d'objets communs à l'ensemble des projets React de Movalib",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  "scripts": {
9
9
  "start": "webpack-dev-server --entry ./devIndex.tsx --open",
10
10
  "build": "rm -rf dist && tsc && npm run copy-assets",
11
- "copy-assets": "cp -r src/assets/ dist/src/assets/ && cp src/*.css dist/src",
11
+ "copy-assets": "cp -r src/assets/ dist/src/assets/ && cp -r src/style/*.css dist/src/style",
12
12
  "test": "echo \"Error: no test specified\" && exit 1",
13
13
  "clean": "rm -rf dist node_modules package-lock.json"
14
14
  },
package/src/QRCode.tsx CHANGED
@@ -1,10 +1,10 @@
1
- import { type FC, useRef, useEffect, useMemo } from 'react';
2
- import QRCodeImage from "./assets/images/leaf_yellow_small.png";
3
1
  import { Box, Button, darken, useTheme } from '@mui/material';
4
- import QRCodeStyling, { Options } from "qr-code-styling";
5
- import './QRCode.css';
6
- import html2canvas from "html2canvas";
7
- import {DownloadedQRCode} from "./DownloadedQRCode";
2
+ import html2canvas from 'html2canvas';
3
+ import QRCodeStyling, { type Options } from 'qr-code-styling';
4
+ import { type FC, useEffect, useMemo, useRef } from 'react';
5
+ import { DownloadedQRCode } from './DownloadedQRCode';
6
+ import QRCodeImage from './assets/images/leaf_yellow_small.png';
7
+ import './style/QRCode.css';
8
8
 
9
9
  interface QRCodeProps {
10
10
  size?: number;
@@ -11,7 +11,7 @@ import {
11
11
  darken,
12
12
  useTheme,
13
13
  } from '@mui/material';
14
- import './QRCode.css';
14
+ import '../../style/QRCode.css';
15
15
 
16
16
  import html2canvas from 'html2canvas';
17
17
  import QRCodeStyling, { type Options } from 'qr-code-styling';
@@ -0,0 +1,8 @@
1
+ .qr-code canvas {
2
+ /*max-width: 300px !important;*/
3
+ /* margin: 20px 0; */
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ width: 100%;
8
+ }