sccoreui 4.4.7 → 4.5.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/dist/App.scss +28 -12
- package/dist/components/custom-color-picker/color-picker.js +14 -0
- package/dist/components/froala-editor/FroalaEditor.js +4 -3
- package/dist/types/components/custom-color-picker/color-picker.d.ts +3 -0
- package/dist/types/components/froala-editor/FroalaEditor.d.ts +2 -1
- package/dist/types/components/types/type.d.ts +8 -0
- package/package.json +2 -1
package/dist/App.scss
CHANGED
|
@@ -507,8 +507,24 @@ div:has(ul.date_filter) .p-datepicker-footer {
|
|
|
507
507
|
width: 18.063rem;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
|
|
511
|
-
border: 1px solid var(--gray-300);
|
|
510
|
+
button[data-cmd='fontFamily']{
|
|
511
|
+
border: 1px solid var(--gray-300) !important;
|
|
512
|
+
&::before {
|
|
513
|
+
content: '';
|
|
514
|
+
border: 2px solid gray;
|
|
515
|
+
border-left: 0;
|
|
516
|
+
border-top: 0;
|
|
517
|
+
width: 6px;
|
|
518
|
+
height: 6px;
|
|
519
|
+
position: absolute;
|
|
520
|
+
right: 8px;
|
|
521
|
+
top: 39%;
|
|
522
|
+
transform: rotate(45deg);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
button[data-cmd='fontFamily'] {
|
|
527
|
+
// border: 1px solid var(--gray-300);
|
|
512
528
|
}
|
|
513
529
|
|
|
514
530
|
.fr-toolbar .fr-btn-grp {
|
|
@@ -624,16 +640,16 @@ button#formatOLOptions-1.fr-active::before {
|
|
|
624
640
|
}
|
|
625
641
|
|
|
626
642
|
#fontFamily-1:before {
|
|
627
|
-
content: '';
|
|
628
|
-
border: 2px solid gray;
|
|
629
|
-
border-left: 0;
|
|
630
|
-
border-top: 0;
|
|
631
|
-
width: 6px;
|
|
632
|
-
height: 6px;
|
|
633
|
-
position: absolute;
|
|
634
|
-
right: 8px;
|
|
635
|
-
top: 39%;
|
|
636
|
-
transform: rotate(45deg);
|
|
643
|
+
// content: '';
|
|
644
|
+
// border: 2px solid gray;
|
|
645
|
+
// border-left: 0;
|
|
646
|
+
// border-top: 0;
|
|
647
|
+
// width: 6px;
|
|
648
|
+
// height: 6px;
|
|
649
|
+
// position: absolute;
|
|
650
|
+
// right: 8px;
|
|
651
|
+
// top: 39%;
|
|
652
|
+
// transform: rotate(45deg);
|
|
637
653
|
}
|
|
638
654
|
|
|
639
655
|
.fr-toolbar .fr-btn-grp {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const react_color_1 = require("react-color");
|
|
6
|
+
const CustomColorPicker = ({ onChange, defaultValue }) => {
|
|
7
|
+
const [color, setColor] = (0, react_1.useState)(defaultValue);
|
|
8
|
+
const handleColorChange = (newColor) => {
|
|
9
|
+
setColor(newColor.hex);
|
|
10
|
+
onChange(newColor);
|
|
11
|
+
};
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_color_1.ChromePicker, { color: color, onChange: handleColorChange }) }));
|
|
13
|
+
};
|
|
14
|
+
exports.default = CustomColorPicker;
|
|
@@ -10,13 +10,14 @@ require("froala-editor/js/plugins.pkgd.min.js");
|
|
|
10
10
|
// import { SvgComponent } from 'sccoreui';
|
|
11
11
|
// import SvgComponent from '../../directives/svg-component';
|
|
12
12
|
// import { Bold, Italic } from '../../assets/svg/svg';
|
|
13
|
-
const FroalaTextEditor = () => {
|
|
13
|
+
const FroalaTextEditor = ({ onChange, value }) => {
|
|
14
14
|
const editorRef = (0, react_1.useRef)(null);
|
|
15
|
-
const html = ``;
|
|
16
|
-
const [editorContent, setEditorContent] = (0, react_1.useState)(
|
|
15
|
+
// const html = ``;
|
|
16
|
+
const [editorContent, setEditorContent] = (0, react_1.useState)(value);
|
|
17
17
|
// Callback function to handle content changes
|
|
18
18
|
const handleModelChange = (content) => {
|
|
19
19
|
setEditorContent(content);
|
|
20
|
+
onChange(content);
|
|
20
21
|
};
|
|
21
22
|
// const handleKeyUp = () => {
|
|
22
23
|
// // Access the current content of the editor
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import 'froala-editor/css/froala_editor.pkgd.min.css';
|
|
2
2
|
import 'froala-editor/css/froala_style.min.css';
|
|
3
3
|
import 'froala-editor/js/plugins.pkgd.min.js';
|
|
4
|
-
|
|
4
|
+
import { FroalaTextEditorTypes } from '../types/type';
|
|
5
|
+
declare const FroalaTextEditor: ({ onChange, value }: FroalaTextEditorTypes) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default FroalaTextEditor;
|
|
@@ -155,3 +155,11 @@ export interface TreeDropdownSelectTypes {
|
|
|
155
155
|
expandedKeys: any;
|
|
156
156
|
classNames?: any;
|
|
157
157
|
}
|
|
158
|
+
export interface CustomColorPickerTypes {
|
|
159
|
+
onChange?: any;
|
|
160
|
+
defaultValue: string;
|
|
161
|
+
}
|
|
162
|
+
export interface FroalaTextEditorTypes {
|
|
163
|
+
onChange?: any;
|
|
164
|
+
value: string;
|
|
165
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sccoreui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "ui-sccore",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"primereact": "^9.5.0",
|
|
40
40
|
"quill": "^1.3.7",
|
|
41
41
|
"react": "^18.2.0",
|
|
42
|
+
"react-color": "^2.19.3",
|
|
42
43
|
"react-dom": "^18.2.0",
|
|
43
44
|
"react-froala-wysiwyg": "^4.1.2",
|
|
44
45
|
"react-phone-number-input": "^3.3.6",
|