sccoreui 4.5.0 → 4.5.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.
package/dist/App.scss CHANGED
@@ -507,31 +507,6 @@ div:has(ul.date_filter) .p-datepicker-footer {
507
507
  width: 18.063rem;
508
508
  }
509
509
 
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);
528
- }
529
-
530
- .fr-toolbar .fr-btn-grp {
531
- margin-right: 0px;
532
- margin-left: 8px;
533
- }
534
-
535
510
  .PhoneInput {
536
511
  background: #ffffff;
537
512
  border: 1px solid var(--gray-300);
@@ -639,19 +614,6 @@ button#formatOLOptions-1.fr-active::before {
639
614
  transform: rotate(45deg);
640
615
  }
641
616
 
642
- #fontFamily-1:before {
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);
653
- }
654
-
655
617
  .fr-toolbar .fr-btn-grp {
656
618
  display: inline-block;
657
619
  margin: 0 0px 0 12px !important;
@@ -662,6 +624,51 @@ button#formatOLOptions-1.fr-active::before {
662
624
  display: none;
663
625
  }
664
626
 
627
+ .fr-element {
628
+ padding: 12px !important;
629
+ }
630
+
631
+ .fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a.fr-active {
632
+ background: #f9fafb !important;
633
+ }
634
+
635
+ button[data-cmd="fontFamily"]:focus{
636
+ box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px var(--primary-100);
637
+ border: 1px solid var(--primary-300) !important;
638
+ background: none !important;
639
+ }
640
+
641
+
642
+ button[data-cmd='fontFamily']{
643
+ border: 1px solid var(--gray-300) !important;
644
+ &::before {
645
+ content: '';
646
+ border: 1.8px solid #0b0c12;
647
+ border-left: 0;
648
+ border-top: 0;
649
+ width: 7px;
650
+ height: 7px;
651
+ position: absolute;
652
+ right: 8px;
653
+ top: 39%;
654
+ transform: rotate(45deg);
655
+ }
656
+ }
657
+
658
+ .fr-toolbar .fr-btn-grp {
659
+ margin-right: 0px;
660
+ margin-left: 8px;
661
+ }
662
+
663
+ button[aria-expanded="true"] {
664
+ &::before {
665
+ top: 48%;
666
+ transform: rotate(-136deg);
667
+ }
668
+ }
669
+
670
+
671
+
665
672
 
666
673
  /// Custon treeDropdownSelect style
667
674
  .treeNoCollaps {
@@ -10,7 +10,7 @@ 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 = ({ onChange, value }) => {
13
+ const FroalaTextEditor = ({ onChange, value, placeholderText }) => {
14
14
  const editorRef = (0, react_1.useRef)(null);
15
15
  // const html = ``;
16
16
  const [editorContent, setEditorContent] = (0, react_1.useState)(value);
@@ -30,14 +30,17 @@ const FroalaTextEditor = ({ onChange, value }) => {
30
30
  // console.log('Special word detected!');
31
31
  // }
32
32
  // };
33
- // useEffect(() => {
34
- // if (editorRef.current) {
35
- // // editorRef.current.editor.doc.getElementById('bold-1').innerHTML = `${Bold}`
36
- // // editorRef.current.editor.doc.getElementById('italic-1').innerHTML = `${Italic}`;
37
- // editorRef.current.editor.events.on('keyup', handleKeyUp);
38
- // }
39
- // }, []);
40
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'text-editor' }, { children: (0, jsx_runtime_1.jsx)(react_froala_wysiwyg_1.default, { tag: "textarea", config: {
33
+ (0, react_1.useEffect)(() => {
34
+ if (editorRef.current) {
35
+ editorRef.current.editor.$el.on('focus', () => {
36
+ document.getElementById('fr-text-editor').classList.add('focus-text-editor');
37
+ });
38
+ editorRef.current.editor.$el.on('focusout', () => {
39
+ document.getElementById('fr-text-editor').classList.remove('focus-text-editor');
40
+ });
41
+ }
42
+ }, []);
43
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'text-editor', id: "fr-text-editor" }, { children: (0, jsx_runtime_1.jsx)(react_froala_wysiwyg_1.default, { tag: "textarea", config: {
41
44
  fontFamilySelection: true,
42
45
  fontFamily: {
43
46
  'Arial,Helvetica,sans-serif': 'sans-serif',
@@ -46,7 +49,7 @@ const FroalaTextEditor = ({ onChange, value }) => {
46
49
  // 'Tahoma,Geneva,sans-serif': 'Font 3'
47
50
  },
48
51
  fontFamilyDefaultSelection: 'sans-serif',
49
- placeholderText: 'placeholder',
52
+ placeholderText: placeholderText,
50
53
  key: "5OA4gB3A3B3E3B5D3E3F-11SLJCKHXOSLMc1YGSGb1ZXHSe1CgB5A4D4G4E3C2A12A19A6B4==",
51
54
  charCounterCount: false,
52
55
  toolbarSticky: false,
@@ -2,5 +2,5 @@ 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
+ declare const FroalaTextEditor: ({ onChange, value, placeholderText }: FroalaTextEditorTypes) => import("react/jsx-runtime").JSX.Element;
6
6
  export default FroalaTextEditor;
@@ -162,4 +162,5 @@ export interface CustomColorPickerTypes {
162
162
  export interface FroalaTextEditorTypes {
163
163
  onChange?: any;
164
164
  value: string;
165
+ placeholderText: string;
165
166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",