phx-react 1.3.1146 → 1.3.1150
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/cjs/components/Combobox/Combobox.js +6 -6
- package/dist/cjs/components/Combobox/Combobox.js.map +1 -1
- package/dist/cjs/components/HeaderBar/HeaderBar.js +10 -5
- package/dist/cjs/components/HeaderBar/HeaderBar.js.map +1 -1
- package/dist/cjs/components/TextEditor/TextEditor.d.ts +3 -1
- package/dist/cjs/components/TextEditor/TextEditor.js +81 -33
- package/dist/cjs/components/TextEditor/TextEditor.js.map +1 -1
- package/dist/cjs/components/TextEditor/editor.constant.d.ts +1 -0
- package/dist/cjs/components/TextEditor/editor.constant.js +2 -1
- package/dist/cjs/components/TextEditor/editor.constant.js.map +1 -1
- package/dist/cjs/components/TextEditor/styles/EditorStyle.d.ts +3 -1
- package/dist/cjs/components/TextEditor/styles/EditorStyle.js +4 -1
- package/dist/cjs/components/TextEditor/styles/EditorStyle.js.map +1 -1
- package/dist/cjs/components/ToolTip/ToolTip.d.ts +1 -0
- package/dist/cjs/components/ToolTip/ToolTip.js +6 -4
- package/dist/cjs/components/ToolTip/ToolTip.js.map +1 -1
- package/dist/esm/components/Combobox/Combobox.js +6 -6
- package/dist/esm/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/components/HeaderBar/HeaderBar.js +10 -5
- package/dist/esm/components/HeaderBar/HeaderBar.js.map +1 -1
- package/dist/esm/components/TextEditor/TextEditor.d.ts +3 -1
- package/dist/esm/components/TextEditor/TextEditor.js +81 -33
- package/dist/esm/components/TextEditor/TextEditor.js.map +1 -1
- package/dist/esm/components/TextEditor/editor.constant.d.ts +1 -0
- package/dist/esm/components/TextEditor/editor.constant.js +2 -1
- package/dist/esm/components/TextEditor/editor.constant.js.map +1 -1
- package/dist/esm/components/TextEditor/styles/EditorStyle.d.ts +3 -1
- package/dist/esm/components/TextEditor/styles/EditorStyle.js +4 -1
- package/dist/esm/components/TextEditor/styles/EditorStyle.js.map +1 -1
- package/dist/esm/components/ToolTip/ToolTip.d.ts +1 -0
- package/dist/esm/components/ToolTip/ToolTip.js +6 -4
- package/dist/esm/components/ToolTip/ToolTip.js.map +1 -1
- package/package.json +2 -1
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
exports.__esModule = true;
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
var StyledEditorLayout = function () { return (react_1["default"].createElement("style", null, "\n.prose {\n\t max-width: 100%;\n}\n .prose strong, .prose b {\n\t color: inherit !important;\n}\n .prose [style*='color:'] * {\n\t color: inherit !important;\n}\n a {\n\t color: #193fe9 !important;\n\t cursor: pointer;\n}\n a:hover {\n\t opacity: 0.8;\n\t animation-duration: 0.3s;\n}\n\n.prose :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-lead);\n font-size: 1.25em;\n line-height: 1.6;\n margin-top: 1.2em;\n margin-bottom: 1.2em;\n}\n.prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.prose :where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-bold);\n font-weight: 600;\n}\n.prose :where(a strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(blockquote strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(thead th strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(ol):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: decimal;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.prose :where(ol[type='A']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: upper-alpha;\n}\n.prose :where(ol[type='a']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: lower-alpha;\n}\n.prose :where(ol[type='A' s]):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: upper-alpha;\n}\n.prose :where(ol[type='a' s]):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: lower-alpha;\n}\n.prose :where(ol[type='I']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: upper-roman;\n}\n.prose :where(ol[type='i']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: lower-roman;\n}\n.prose :where(ol[type='I' s]):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: upper-roman;\n}\n.prose :where(ol[type='i' s]):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: lower-roman;\n}\n.prose :where(ol[type='1']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: decimal;\n}\n.prose :where(ul):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: disc;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker {\n font-weight: 400;\n color: var(--tw-prose-counters);\n}\n.prose :where(ul > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker {\n color: var(--tw-prose-bullets);\n}\n.prose :where(dt):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.25em;\n}\n.prose :where(hr):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-color: var(--tw-prose-hr);\n border-top-width: 1px;\n margin-top: 3em;\n margin-bottom: 3em;\n}\n.prose :where(blockquote):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 500;\n font-style: italic;\n color: var(--tw-prose-quotes);\n border-inline-start-width: 0.25rem;\n border-inline-start-color: var(--tw-prose-quote-borders);\n margin-top: 1.6em;\n margin-bottom: 1.6em;\n padding-inline-start: 1em;\n}\n.prose :where(blockquote p:first-of-type):not(:where([class~='not-prose'], [class~='not-prose'] *))::before {\n content: open-quote;\n}\n.prose :where(blockquote p:last-of-type):not(:where([class~='not-prose'], [class~='not-prose'] *))::after {\n content: close-quote;\n}\n.prose :where(h1):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 800;\n font-size: 2.25em;\n margin-top: 0;\n margin-bottom: 0.8888889em;\n line-height: 1.1111111;\n}\n.prose :where(h1 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 900;\n color: inherit;\n}\n.prose :where(h2):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 700;\n font-size: 1.5em;\n margin-top: 2em;\n margin-bottom: 1em;\n line-height: 1.3333333;\n}\n.prose :where(h2 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 800;\n color: inherit;\n}\n.prose :where(h3):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n font-size: 1.25em;\n margin-top: 1.6em;\n margin-bottom: 0.6em;\n line-height: 1.6;\n}\n.prose :where(h3 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 700;\n color: inherit;\n}\n.prose :where(h4):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.prose :where(h4 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 700;\n color: inherit;\n}\n.prose :where(img):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(picture):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n display: block;\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(video):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(kbd):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 500;\n font-family: inherit;\n color: var(--tw-prose-kbd);\n box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);\n font-size: 0.875em;\n border-radius: 0.3125rem;\n padding-top: 0.1875em;\n padding-inline-end: 0.375em;\n padding-bottom: 0.1875em;\n padding-inline-start: 0.375em;\n}\n.prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-code);\n font-weight: 600;\n font-size: 0.875em;\n}\n.prose :where(a code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(h1 code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(h2 code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n font-size: 0.875em;\n}\n.prose :where(h3 code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n font-size: 0.9em;\n}\n.prose :where(h4 code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(blockquote code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(thead th code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(pre):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-pre-code);\n background-color: var(--tw-prose-pre-bg);\n overflow-x: auto;\n font-weight: 400;\n font-size: 0.875em;\n line-height: 1.7142857;\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n border-radius: 0.375rem;\n padding-top: 0.8571429em;\n padding-inline-end: 1.1428571em;\n padding-bottom: 0.8571429em;\n padding-inline-start: 1.1428571em;\n}\n.prose :where(pre code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n background-color: transparent;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-weight: inherit;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\n.prose :where(pre code):not(:where([class~='not-prose'], [class~='not-prose'] *))::before {\n content: none;\n}\n.prose :where(pre code):not(:where([class~='not-prose'], [class~='not-prose'] *))::after {\n content: none;\n}\n.prose :where(table):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n width: 100%;\n table-layout: auto;\n margin-top: 2em;\n margin-bottom: 2em;\n font-size: 0.875em;\n line-height: 1.7142857;\n}\n.prose :where(thead):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-th-borders);\n}\n.prose :where(thead th):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n vertical-align: bottom;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.prose :where(tbody tr):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-td-borders);\n}\n.prose :where(tbody tr:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-bottom-width: 0;\n}\n.prose :where(tbody td):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n vertical-align: baseline;\n}\n.prose :where(tfoot):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-top-width: 1px;\n border-top-color: var(--tw-prose-th-borders);\n}\n.prose :where(tfoot td):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n vertical-align: top;\n}\n.prose :where(th, td):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n text-align: start;\n}\n.prose :where(figure > *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose :where(figcaption):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-captions);\n font-size: 0.875em;\n line-height: 1.4285714;\n margin-top: 0.8571429em;\n}\n.react-colorful__saturation {\n border-radius: 4px !important;\n margin-bottom: 0.5rem;\n}\n.react-colorful__hue {\n border-radius: 4px !important;\n margin-bottom: 0.5rem;\n}\n.react-colorful__alpha-gradient {\n border-radius: 4px !important;\n}\n.prose {\n --tw-prose-body: #374151;\n --tw-prose-headings: #111827;\n --tw-prose-lead: #4b5563;\n --tw-prose-links: #111827;\n --tw-prose-bold: #111827;\n --tw-prose-bullets: #333;\n --tw-prose-counters: #333;\n --tw-prose-hr: #e5e7eb;\n --tw-prose-quotes: #111827;\n --tw-prose-quote-borders: #e5e7eb;\n --tw-prose-captions: #6b7280;\n --tw-prose-kbd: #111827;\n --tw-prose-kbd-shadows: 17 24 39;\n --tw-prose-code: #111827;\n --tw-prose-pre-code: #e5e7eb;\n --tw-prose-pre-bg: #1f2937;\n --tw-prose-th-borders: #d1d5db;\n --tw-prose-td-borders: #e5e7eb;\n --tw-prose-invert-body: #d1d5db;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #9ca3af;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #9ca3af;\n --tw-prose-invert-bullets: #4b5563;\n --tw-prose-invert-hr: #374151;\n --tw-prose-invert-quotes: #f3f4f6;\n --tw-prose-invert-quote-borders: #374151;\n --tw-prose-invert-captions: #9ca3af;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: 255 255 255;\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d1d5db;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #4b5563;\n --tw-prose-invert-td-borders: #374151;\n font-size: 1rem;\n line-height: 1.75;\n}\n.prose :where(picture > img):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose :where(li):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n.prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-start: 0.375em;\n}\n.prose :where(ul > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-start: 0.375em;\n}\n.prose :where(.prose > ul > li p):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose :where(.prose > ul > li > p:first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 1.25em;\n}\n.prose :where(.prose > ul > li > p:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-bottom: 1.25em;\n}\n.prose :where(.prose > ol > li > p:first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 1.25em;\n}\n.prose :where(.prose > ol > li > p:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-bottom: 1.25em;\n}\n.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose :where(dl):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.prose :where(dd):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0.5em;\n padding-inline-start: 1.625em;\n}\n.prose :where(hr + *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(h2 + *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(h3 + *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(h4 + *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(thead th:first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-start: 0;\n}\n.prose :where(thead th:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-end: 0;\n}\n.prose :where(tbody td, tfoot td):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-top: 0.5714286em;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-start: 0;\n}\n.prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-end: 0;\n}\n.prose :where(figure):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(.prose > :first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(.prose > :last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-bottom: 0;\n}\n\n.phx-editor .prose {\n font-size: 12px;\n}\n\n/* width */\n .phx-editor {\n\t/* Track */\n\t/* Handle */\n\t/* Handle on hover */\n\t/* Chrome, Safari, Edge, Opera */\n\t/* Firefox */\n}\n .phx-editor ::-webkit-scrollbar {\n\t width: 6px;\n}\n .phx-editor ::-webkit-scrollbar-track {\n\t background: transparent;\n}\n .phx-editor ::-webkit-scrollbar-thumb {\n\t background: #555 30;\n\t cursor: pointer;\n}\n .phx-editor ::-webkit-scrollbar-thumb:hover {\n\t background: #555 50;\n}\n .phx-editor input::-webkit-outer-spin-button, .phx-editor input::-webkit-inner-spin-button {\n\t -webkit-appearance: none;\n\t margin: 0;\n}\n .phx-editor input[type='number'] {\n\t -moz-appearance: textfield;\n}\n .phx-editor img[data-loading='true'] {\n\t opacity: 0.5;\n\t filter: blur(2px);\n\t transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;\n}\n .phx-editor img:not([data-loading]) {\n\t opacity: 1;\n\t filter: blur(0);\n\t transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;\n}\n .phx-editor img {\n\t -webkit-user-drag: none;\n\t -khtml-user-drag: none;\n\t -moz-user-drag: none;\n\t -o-user-drag: none;\n\t user-drag: none;\n}\n ")); };
|
|
5
|
+
var StyledEditorLayout = function (_a) {
|
|
6
|
+
var editorHeight = _a.editorHeight;
|
|
7
|
+
return (react_1["default"].createElement("style", null, "\n .editor-height {\n height: ".concat(editorHeight || 'calc(100vh - 220px)', ";\n }\n.prose {\n\t max-width: 100%;\n}\n .prose strong, .prose b {\n\t color: inherit !important;\n}\n .prose [style*='color:'] * {\n\t color: inherit !important;\n}\n a {\n\t color: #193fe9 !important;\n\t cursor: pointer;\n}\n a:hover {\n\t opacity: 0.8;\n\t animation-duration: 0.3s;\n}\n\n.prose :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-lead);\n font-size: 1.25em;\n line-height: 1.6;\n margin-top: 1.2em;\n margin-bottom: 1.2em;\n}\n.prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.prose :where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-bold);\n font-weight: 600;\n}\n.prose :where(a strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(blockquote strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(thead th strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(ol):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: decimal;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.prose :where(ol[type='A']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: upper-alpha;\n}\n.prose :where(ol[type='a']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: lower-alpha;\n}\n.prose :where(ol[type='A' s]):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: upper-alpha;\n}\n.prose :where(ol[type='a' s]):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: lower-alpha;\n}\n.prose :where(ol[type='I']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: upper-roman;\n}\n.prose :where(ol[type='i']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: lower-roman;\n}\n.prose :where(ol[type='I' s]):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: upper-roman;\n}\n.prose :where(ol[type='i' s]):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: lower-roman;\n}\n.prose :where(ol[type='1']):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: decimal;\n}\n.prose :where(ul):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n list-style-type: disc;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker {\n font-weight: 400;\n color: var(--tw-prose-counters);\n}\n.prose :where(ul > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker {\n color: var(--tw-prose-bullets);\n}\n.prose :where(dt):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.25em;\n}\n.prose :where(hr):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-color: var(--tw-prose-hr);\n border-top-width: 1px;\n margin-top: 3em;\n margin-bottom: 3em;\n}\n.prose :where(blockquote):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 500;\n font-style: italic;\n color: var(--tw-prose-quotes);\n border-inline-start-width: 0.25rem;\n border-inline-start-color: var(--tw-prose-quote-borders);\n margin-top: 1.6em;\n margin-bottom: 1.6em;\n padding-inline-start: 1em;\n}\n.prose :where(blockquote p:first-of-type):not(:where([class~='not-prose'], [class~='not-prose'] *))::before {\n content: open-quote;\n}\n.prose :where(blockquote p:last-of-type):not(:where([class~='not-prose'], [class~='not-prose'] *))::after {\n content: close-quote;\n}\n.prose :where(h1):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 800;\n font-size: 2.25em;\n margin-top: 0;\n margin-bottom: 0.8888889em;\n line-height: 1.1111111;\n}\n.prose :where(h1 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 900;\n color: inherit;\n}\n.prose :where(h2):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 700;\n font-size: 1.5em;\n margin-top: 2em;\n margin-bottom: 1em;\n line-height: 1.3333333;\n}\n.prose :where(h2 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 800;\n color: inherit;\n}\n.prose :where(h3):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n font-size: 1.25em;\n margin-top: 1.6em;\n margin-bottom: 0.6em;\n line-height: 1.6;\n}\n.prose :where(h3 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 700;\n color: inherit;\n}\n.prose :where(h4):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.prose :where(h4 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 700;\n color: inherit;\n}\n.prose :where(img):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(picture):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n display: block;\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(video):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(kbd):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n font-weight: 500;\n font-family: inherit;\n color: var(--tw-prose-kbd);\n box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);\n font-size: 0.875em;\n border-radius: 0.3125rem;\n padding-top: 0.1875em;\n padding-inline-end: 0.375em;\n padding-bottom: 0.1875em;\n padding-inline-start: 0.375em;\n}\n.prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-code);\n font-weight: 600;\n font-size: 0.875em;\n}\n.prose :where(a code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(h1 code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(h2 code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n font-size: 0.875em;\n}\n.prose :where(h3 code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n font-size: 0.9em;\n}\n.prose :where(h4 code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(blockquote code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(thead th code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: inherit;\n}\n.prose :where(pre):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-pre-code);\n background-color: var(--tw-prose-pre-bg);\n overflow-x: auto;\n font-weight: 400;\n font-size: 0.875em;\n line-height: 1.7142857;\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n border-radius: 0.375rem;\n padding-top: 0.8571429em;\n padding-inline-end: 1.1428571em;\n padding-bottom: 0.8571429em;\n padding-inline-start: 1.1428571em;\n}\n.prose :where(pre code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n background-color: transparent;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-weight: inherit;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\n.prose :where(pre code):not(:where([class~='not-prose'], [class~='not-prose'] *))::before {\n content: none;\n}\n.prose :where(pre code):not(:where([class~='not-prose'], [class~='not-prose'] *))::after {\n content: none;\n}\n.prose :where(table):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n width: 100%;\n table-layout: auto;\n margin-top: 2em;\n margin-bottom: 2em;\n font-size: 0.875em;\n line-height: 1.7142857;\n}\n.prose :where(thead):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-th-borders);\n}\n.prose :where(thead th):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n vertical-align: bottom;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.prose :where(tbody tr):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-td-borders);\n}\n.prose :where(tbody tr:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-bottom-width: 0;\n}\n.prose :where(tbody td):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n vertical-align: baseline;\n}\n.prose :where(tfoot):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n border-top-width: 1px;\n border-top-color: var(--tw-prose-th-borders);\n}\n.prose :where(tfoot td):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n vertical-align: top;\n}\n.prose :where(th, td):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n text-align: start;\n}\n.prose :where(figure > *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose :where(figcaption):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n color: var(--tw-prose-captions);\n font-size: 0.875em;\n line-height: 1.4285714;\n margin-top: 0.8571429em;\n}\n.react-colorful__saturation {\n border-radius: 4px !important;\n margin-bottom: 0.5rem;\n}\n.react-colorful__hue {\n border-radius: 4px !important;\n margin-bottom: 0.5rem;\n}\n.react-colorful__alpha-gradient {\n border-radius: 4px !important;\n}\n.prose {\n --tw-prose-body: #374151;\n --tw-prose-headings: #111827;\n --tw-prose-lead: #4b5563;\n --tw-prose-links: #111827;\n --tw-prose-bold: #111827;\n --tw-prose-bullets: #333;\n --tw-prose-counters: #333;\n --tw-prose-hr: #e5e7eb;\n --tw-prose-quotes: #111827;\n --tw-prose-quote-borders: #e5e7eb;\n --tw-prose-captions: #6b7280;\n --tw-prose-kbd: #111827;\n --tw-prose-kbd-shadows: 17 24 39;\n --tw-prose-code: #111827;\n --tw-prose-pre-code: #e5e7eb;\n --tw-prose-pre-bg: #1f2937;\n --tw-prose-th-borders: #d1d5db;\n --tw-prose-td-borders: #e5e7eb;\n --tw-prose-invert-body: #d1d5db;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #9ca3af;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #9ca3af;\n --tw-prose-invert-bullets: #4b5563;\n --tw-prose-invert-hr: #374151;\n --tw-prose-invert-quotes: #f3f4f6;\n --tw-prose-invert-quote-borders: #374151;\n --tw-prose-invert-captions: #9ca3af;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: 255 255 255;\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d1d5db;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #4b5563;\n --tw-prose-invert-td-borders: #374151;\n font-size: 1rem;\n line-height: 1.75;\n}\n.prose :where(picture > img):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose :where(li):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n.prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-start: 0.375em;\n}\n.prose :where(ul > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-start: 0.375em;\n}\n.prose :where(.prose > ul > li p):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose :where(.prose > ul > li > p:first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 1.25em;\n}\n.prose :where(.prose > ul > li > p:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-bottom: 1.25em;\n}\n.prose :where(.prose > ol > li > p:first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 1.25em;\n}\n.prose :where(.prose > ol > li > p:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-bottom: 1.25em;\n}\n.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose :where(dl):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.prose :where(dd):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0.5em;\n padding-inline-start: 1.625em;\n}\n.prose :where(hr + *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(h2 + *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(h3 + *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(h4 + *):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(thead th:first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-start: 0;\n}\n.prose :where(thead th:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-end: 0;\n}\n.prose :where(tbody td, tfoot td):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-top: 0.5714286em;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-start: 0;\n}\n.prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n padding-inline-end: 0;\n}\n.prose :where(figure):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(.prose > :first-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-top: 0;\n}\n.prose :where(.prose > :last-child):not(:where([class~='not-prose'], [class~='not-prose'] *)) {\n margin-bottom: 0;\n}\n\n.phx-editor .prose {\n font-size: 12px;\n}\n\n/* width */\n .phx-editor {\n\t/* Track */\n\t/* Handle */\n\t/* Handle on hover */\n\t/* Chrome, Safari, Edge, Opera */\n\t/* Firefox */\n}\n .phx-editor ::-webkit-scrollbar {\n\t width: 6px;\n}\n .phx-editor ::-webkit-scrollbar-track {\n\t background: transparent;\n}\n .phx-editor ::-webkit-scrollbar-thumb {\n\t background: #555 30;\n\t cursor: pointer;\n}\n .phx-editor ::-webkit-scrollbar-thumb:hover {\n\t background: #555 50;\n}\n .phx-editor input::-webkit-outer-spin-button, .phx-editor input::-webkit-inner-spin-button {\n\t -webkit-appearance: none;\n\t margin: 0;\n}\n .phx-editor input[type='number'] {\n\t -moz-appearance: textfield;\n}\n .phx-editor img[data-loading='true'] {\n\t opacity: 0.5;\n\t filter: blur(2px);\n\t transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;\n}\n .phx-editor img:not([data-loading]) {\n\t opacity: 1;\n\t filter: blur(0);\n\t transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;\n}\n .phx-editor img {\n\t -webkit-user-drag: none;\n\t -khtml-user-drag: none;\n\t -moz-user-drag: none;\n\t -o-user-drag: none;\n\t user-drag: none;\n}\n ")));
|
|
8
|
+
};
|
|
6
9
|
exports["default"] = StyledEditorLayout;
|
|
7
10
|
//# sourceMappingURL=EditorStyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorStyle.js","sourceRoot":"","sources":["../../../../../src/components/TextEditor/styles/EditorStyle.tsx"],"names":[],"mappings":";;;AAAA,wDAAyB;AAEzB,IAAM,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"EditorStyle.js","sourceRoot":"","sources":["../../../../../src/components/TextEditor/styles/EditorStyle.tsx"],"names":[],"mappings":";;;AAAA,wDAAyB;AAEzB,IAAM,kBAAkB,GAAG,UAAC,EAAuD;QAArD,YAAY,kBAAA;IAA8C,OAAA,CACtF,gDACG,gDAEW,YAAY,IAAI,qBAAqB,4mfAuehD,CACK,CACT;AA7euF,CA6evF,CAAA;AAED,qBAAe,kBAAkB,CAAA"}
|
|
@@ -4,10 +4,10 @@ var tslib_1 = require("tslib");
|
|
|
4
4
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
var react_dom_1 = require("react-dom");
|
|
6
6
|
var PHXTooltip = function (_a) {
|
|
7
|
-
var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, content = _a.content, _c = _a.contentClassName, contentClassName = _c === void 0 ? 'max-w-[18rem]' : _c, _d = _a.isDisableHover, isDisableHover = _d === void 0 ? false : _d, placement = _a.placement, _e = _a.underLine, underLine = _e === void 0 ? false : _e;
|
|
7
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, content = _a.content, _c = _a.contentClassName, contentClassName = _c === void 0 ? 'max-w-[18rem]' : _c, _d = _a.isDisableHover, isDisableHover = _d === void 0 ? false : _d, placement = _a.placement, _e = _a.underLine, underLine = _e === void 0 ? false : _e, _f = _a.timeout, timeout = _f === void 0 ? 0 : _f;
|
|
8
8
|
var contentRef = (0, react_1.useRef)(null);
|
|
9
9
|
var titleRef = (0, react_1.useRef)(null);
|
|
10
|
-
var
|
|
10
|
+
var _g = (0, react_1.useState)({
|
|
11
11
|
top: 0,
|
|
12
12
|
left: 0,
|
|
13
13
|
width: 0,
|
|
@@ -15,7 +15,7 @@ var PHXTooltip = function (_a) {
|
|
|
15
15
|
pos: 'top',
|
|
16
16
|
show: false,
|
|
17
17
|
arrowOffset: 0
|
|
18
|
-
}), contentProps =
|
|
18
|
+
}), contentProps = _g[0], setContentProps = _g[1];
|
|
19
19
|
var isMobile = function () { return window.innerWidth <= 768; };
|
|
20
20
|
var getOverflowDirections = function (_a) {
|
|
21
21
|
var height = _a.height, left = _a.left, top = _a.top, width = _a.width;
|
|
@@ -161,7 +161,9 @@ var PHXTooltip = function (_a) {
|
|
|
161
161
|
}, 10);
|
|
162
162
|
};
|
|
163
163
|
var handleMouseLeave = function () {
|
|
164
|
-
|
|
164
|
+
setTimeout(function () {
|
|
165
|
+
setContentProps(function (prev) { return (tslib_1.__assign(tslib_1.__assign({}, prev), { show: false })); });
|
|
166
|
+
}, timeout);
|
|
165
167
|
};
|
|
166
168
|
var handleMobileClick = function () {
|
|
167
169
|
if (isMobile()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolTip.js","sourceRoot":"","sources":["../../../../src/components/ToolTip/ToolTip.tsx"],"names":[],"mappings":";;;AAAA,qDAA2E;AAC3E,uCAAwC;AAYxC,IAAM,UAAU,GAAqB,UAAC,EAQrC;QAPC,QAAQ,cAAA,EACR,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,OAAO,aAAA,EACP,wBAAkC,EAAlC,gBAAgB,mBAAG,eAAe,KAA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,qBAAc,YAAY,CAAC,WAAW,QAAK;4BAChD,SAAS,EAAE,2BACT,YAAY,CAAC,GAAG,KAAK,MAAM;gCACzB,CAAC,CAAC,eAAe;gCACjB,CAAC,CAAC,YAAY,CAAC,GAAG,KAAK,OAAO;oCAC9B,CAAC,CAAC,gBAAgB;oCAClB,CAAC,CAAC,EAAE,CACN;yBACH,CAAC,GAER,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,IAAI,EACV,KAAK,EAAC,4BAA4B;oBAElC,2CACE,CAAC,EAAC,oMAAoM,EACtM,IAAI,EAAC,OAAO,EACZ,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,GAAG,GACf;oBACF,2CAAM,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,GAAG,EAAC,EAAE,EAAC,KAAK,EAAC,KAAK,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,GAAG,CAC7D;gBACL,CAAC,cAAc,IAAI,CAClB,0CACE,SAAS,EAAC,oCAAoC,EAC9C,KAAK,EAAE;wBACL,KAAK,EAAE,UAAG,YAAY,CAAC,KAAK,OAAI;qBACjC,GACD,CACH,CACG,EACN,QAAQ,CAAC,IAAI,CACd;QAEH,0CAAK,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,cAAM,OAAA,iBAAiB,EAAE,EAAnB,CAAmB,IAC/E,QAAQ,CACL,CACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,qBAAe,UAAU,CAAA"}
|
|
@@ -99,19 +99,19 @@ export var PHXCombobox = function (_a) {
|
|
|
99
99
|
}
|
|
100
100
|
}, [defaultValue]);
|
|
101
101
|
return (React.createElement("div", { className: className, id: id },
|
|
102
|
-
label && React.createElement("label", { className: 'mb-1
|
|
102
|
+
label && React.createElement("label", { className: 'block mb-1 text-xs font-normal text-gray-700' }, label),
|
|
103
103
|
React.createElement("div", { ref: wrapperRef, className: 'relative w-full bg-gray-100 rounded-lg' },
|
|
104
|
-
React.createElement("div", { className: "".concat(error ? 'border-red-800 bg-red-50 hover:bg-red-50 focus:border-red-800 focus:bg-red-50' : '', "
|
|
105
|
-
selectedItems.length > 0 && options.length > 0 && !checkedAll && listOptions.length > 0 && (React.createElement("div", { className: '
|
|
104
|
+
React.createElement("div", { className: "".concat(error ? 'border-red-800 bg-red-50 hover:bg-red-50 focus:border-red-800 focus:bg-red-50' : '', "\n ").concat(!disabled ? 'hover:bg-gray-50' : '', "\n block w-full space-y-1 rounded-lg border border-gray-500 bg-white text-sm shadow-sm focus:border-gray-500 focus:bg-gray-50 focus:outline-none focus:outline-offset-1 focus:outline-indigo-500 focus:ring-transparent ") },
|
|
105
|
+
selectedItems.length > 0 && options.length > 0 && !checkedAll && listOptions.length > 0 && (React.createElement("div", { className: 'flex flex-wrap items-center gap-2 mx-2 mt-2' }, selectedItems.map(function (item) { return (React.createElement("div", { key: item.name + item.id, className: 'flex items-center bg-gray-200 whitespace-nowrap rounded-xl' },
|
|
106
106
|
React.createElement("p", { style: {
|
|
107
107
|
wordBreak: 'break-word'
|
|
108
108
|
}, className: "pl-2 text-xs text-gray-700 text-wrap ".concat(disabled ? 'py-[2px] pr-2' : 'pr-[2px]') }, item.name),
|
|
109
109
|
!disabled && (React.createElement("button", { className: 'rounded-xl p-[3px] hover:cursor-pointer hover:bg-gray-300', onClick: function () { return handleRemoveItem(item); }, type: 'button' },
|
|
110
|
-
React.createElement(XMarkIcon, { className: '
|
|
110
|
+
React.createElement(XMarkIcon, { className: 'w-4 h-4' }))))); }))),
|
|
111
111
|
React.createElement("input", { ref: inputRef, className: 'w-full rounded-lg border-none border-transparent py-[0.4rem] pl-3 text-xs outline-none focus:border-none focus:border-transparent focus:ring-0', disabled: disabled, id: 'main', tabIndex: -1, onChange: function (e) { return handleChangeInput(e.target.value); }, onFocus: function () { return setIsFocused(true); }, placeholder: selectedItems.length === (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) && selectedItems.length > 0 ? 'Tất cả' : placeholder })),
|
|
112
112
|
options.length > 0 ? (React.createElement("div", {
|
|
113
113
|
// eslint-disable-next-line prettier/prettier
|
|
114
|
-
className: "absolute z-50 mt-2 w-full overflow-y-auto rounded-lg bg-white p-2 shadow-xl border ".concat(!isFocused ? 'hidden' : ''), style: __assign({
|
|
114
|
+
className: "absolute z-50 mt-2 w-full overflow-y-auto rounded-lg bg-white p-2 shadow-xl border ".concat(!isFocused ? 'hidden' : ''), style: __assign({ maxHeight: optionHeight }, (selectFieldPosition === 'top' && {
|
|
115
115
|
top: -optionHeight - 10
|
|
116
116
|
})) },
|
|
117
117
|
React.createElement("div", { key: 'selectAllCheckBox', className: 'relative mb-1 rounded-lg px-2 py-[1.5px] hover:bg-gray-200' },
|
|
@@ -131,7 +131,7 @@ export var PHXCombobox = function (_a) {
|
|
|
131
131
|
className: "absolute z-50 mt-2 w-full overflow-y-auto rounded-lg bg-white p-2 shadow-xl ".concat(!isFocused ? 'hidden' : ''), style: __assign({}, (selectFieldPosition === 'top' && { top: -90 })) },
|
|
132
132
|
React.createElement("div", { className: 'mt-3 h-[50px] text-center' },
|
|
133
133
|
React.createElement("div", null,
|
|
134
|
-
React.createElement("svg", { className: '
|
|
134
|
+
React.createElement("svg", { className: 'w-4 h-4 mx-auto text-gray-700', fill: 'none', stroke: 'currentColor', viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg' },
|
|
135
135
|
React.createElement("path", { d: 'M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z', strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: '2' })),
|
|
136
136
|
React.createElement("h3", { className: 'mt-[2px] text-sm text-gray-700' }, "Kh\u00F4ng c\u00F3 d\u1EEF li\u1EC7u")))))),
|
|
137
137
|
error && errorType ? React.createElement(ErrorMessage, { message: message(errorType) }) : null));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.js","sourceRoot":"","sources":["../../../../src/components/Combobox/Combobox.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B,CAAC,EAC/E,SAAS,EAAC,qDAAqD,EAC/D,EAAE,EAAE,mBAAY,SAAS,CAAE,EAC3B,OAAO,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAArB,CAAqB,EACpC,KAAK,EAAE,IAAI,CAAC,IAAI,GAChB;wBACF,gCACE,SAAS,EAAC,iCAAiC,EAC3C,OAAO,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAArB,CAAqB,EACpC,IAAI,EAAC,QAAQ,GACb,CACE,CACP,CAAA;gBACH,CAAC,CAAC,CACE,CACP,CAAC,CAAC,CAAC,CACF;gBACE,6CAA6C;gBAC7C,SAAS,EAAE,wFACT,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAC1B,EACF,KAAK,eACA,CAAC,mBAAmB,KAAK,KAAK,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;gBAGpD,6BAAK,SAAS,EAAC,2BAA2B;oBACxC;wBACE,6BACE,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B;4BAElC,8BACE,CAAC,EAAC,6CAA6C,EAC/C,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,GAAG,GACf,CACE;wBACN,4BAAI,SAAS,EAAC,gCAAgC,2CAAsB,CAChE,CACF,CACF,CACP,CACG;QACL,KAAK,IAAI,SAAS,CAAC,CAAC,CAAC,oBAAC,YAAY,IAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,CACtE,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -34,7 +34,7 @@ export var PHXHeaderBar = function (_a) {
|
|
|
34
34
|
? __spreadArray([], secondaryActions, true).sort(function (a, b) { return (a.deleted === b.deleted ? 0 : a.deleted ? 1 : -1); })
|
|
35
35
|
: [];
|
|
36
36
|
return (React.createElement("div", { className: "mb-5 min-h-[1.875rem] ".concat(className) },
|
|
37
|
-
React.createElement("div", { className: 'flex items-center justify-between sm:
|
|
37
|
+
React.createElement("div", { className: 'flex flex-col gap-y-2 sm:flex-row sm:items-center sm:justify-between sm:gap-y-0' },
|
|
38
38
|
React.createElement("div", { className: 'flex items-center' },
|
|
39
39
|
isCancel && (React.createElement("button", { className: 'mr-2 inline-flex items-center rounded-lg border-gray-300 bg-transparent px-2 py-1 text-xs font-medium text-gray-700 hover:bg-gray-200 active:bg-gray-300 active:pb-[0.2rem] active:pt-[0.3rem] active:shadow-[0rem_0.125rem_0.1rem_0rem_#0004_inset]', onClick: onCancel, type: 'button' },
|
|
40
40
|
React.createElement(ArrowLeftIcon, { className: 'h-5 w-5' }))),
|
|
@@ -42,7 +42,7 @@ export var PHXHeaderBar = function (_a) {
|
|
|
42
42
|
React.createElement("h1", { className: classNames("".concat(titleSize, " text-base font-semibold leading-6 text-gray-900"), type === 'default' ? '' : 'mr-2 flex-1') }, title),
|
|
43
43
|
type === 'title-with-badge' && (React.createElement("div", { className: 'flex items-center' },
|
|
44
44
|
React.createElement(PHXBadge, { className: classNames('mr-2', badge.badgeClassname), text: badge.badgeText, type: badge.badgeType }))))),
|
|
45
|
-
React.createElement("div", { className: 'flex flex-shrink-0 items-center
|
|
45
|
+
React.createElement("div", { className: 'flex flex-shrink-0 items-center gap-x-2 sm:justify-end' },
|
|
46
46
|
React.createElement("div", { className: importData || exportData ? 'hidden md:flex md:gap-x-2' : 'hidden' },
|
|
47
47
|
isDownLoadDropDown ? (React.createElement(PHXDropdown, { buttonContent: downloadText,
|
|
48
48
|
// @ts-ignore
|
|
@@ -51,12 +51,16 @@ export var PHXHeaderBar = function (_a) {
|
|
|
51
51
|
// @ts-ignore
|
|
52
52
|
options: upLoadDropDownOption })) : (React.createElement(PHXButton, { className: importData ? '' : 'hidden', danger: uploadButton.dangerSoftButton, deletedButton: false, disabled: disableImport, onClick: onUpload, secondary: uploadButton.secondaryButton, size: 'small', soft: uploadButton.softButton }, uploadText))),
|
|
53
53
|
isDropdown && (React.createElement(PHXDropdown, { buttonContent: dropdown === null || dropdown === void 0 ? void 0 : dropdown.buttonContent, defaultDate: dropdown === null || dropdown === void 0 ? void 0 : dropdown.defaultDate, disabledDate: dropdown === null || dropdown === void 0 ? void 0 : dropdown.disabledDate, endDisabled: dropdown === null || dropdown === void 0 ? void 0 : dropdown.defaultDate, max: dropdown === null || dropdown === void 0 ? void 0 : dropdown.max, min: dropdown === null || dropdown === void 0 ? void 0 : dropdown.min, onChangeDate: dropdown === null || dropdown === void 0 ? void 0 : dropdown.onChangeDate, options: dropdown === null || dropdown === void 0 ? void 0 : dropdown.options, optionTitle: dropdown === null || dropdown === void 0 ? void 0 : dropdown.optionTitle, origin: dropdown === null || dropdown === void 0 ? void 0 : dropdown.origin, soft: true, startDisabled: dropdown === null || dropdown === void 0 ? void 0 : dropdown.startDisabled, type: dropdown === null || dropdown === void 0 ? void 0 : dropdown.type })),
|
|
54
|
-
React.createElement(Menu, { as: 'div', className: importData || exportData ? 'relative md:hidden' : 'hidden' },
|
|
54
|
+
React.createElement(Menu, { as: 'div', className: importData || exportData || addNew ? 'relative md:hidden' : 'hidden' },
|
|
55
55
|
React.createElement(Menu.Button, { className: 'flex items-center rounded-lg bg-gray-200 p-1.5 px-2 py-1 text-sm hover:bg-gray-300' },
|
|
56
56
|
React.createElement("span", { className: 'sr-only' }, "Open menu"),
|
|
57
57
|
React.createElement(EllipsisHorizontalIcon, { "aria-hidden": 'true', className: 'h-5 w-5 rounded text-gray-400' })),
|
|
58
58
|
React.createElement(Transition, { as: Fragment, enter: 'transition ease-out duration-100', enterFrom: 'transform opacity-0 scale-95', enterTo: 'transform opacity-100 scale-100', leave: 'transition ease-in duration-75', leaveFrom: 'transform opacity-100 scale-100', leaveTo: 'transform opacity-0 scale-95' },
|
|
59
59
|
React.createElement(Menu.Items, { className: 'absolute right-0 z-10 mt-2.5 w-32 origin-top-right rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none' },
|
|
60
|
+
addNew && (React.createElement(Menu.Item, null, function (_a) {
|
|
61
|
+
var active = _a.active;
|
|
62
|
+
return (React.createElement("p", { className: classNames(active ? 'bg-gray-50' : '', 'block px-3 py-1 text-xs leading-6 text-gray-900'), onClick: onAdd }, addNewText));
|
|
63
|
+
})),
|
|
60
64
|
exportData && (React.createElement(Menu.Item, null, function (_a) {
|
|
61
65
|
var active = _a.active;
|
|
62
66
|
return (React.createElement("p", { className: classNames(active ? 'bg-gray-50' : '', 'block px-3 py-1 text-xs leading-6 text-gray-900'), onClick: handleDownload }, downloadText));
|
|
@@ -79,12 +83,13 @@ export var PHXHeaderBar = function (_a) {
|
|
|
79
83
|
React.createElement("span", { className: 'sr-only' }, "H\u00E0nh \u0111\u1ED9ng kh\u00E1c"),
|
|
80
84
|
React.createElement(EllipsisHorizontalIcon, { "aria-hidden": 'true', className: 'h-5 w-5 rounded text-gray-400' })),
|
|
81
85
|
React.createElement(Transition, { as: Fragment, enter: 'transition ease-out duration-100', enterFrom: 'transform opacity-0 scale-95', enterTo: 'transform opacity-100 scale-100', leave: 'transition ease-in duration-75', leaveFrom: 'transform opacity-100 scale-100', leaveTo: 'transform opacity-0 scale-95' },
|
|
82
|
-
React.createElement(Menu.Items, { className: 'absolute z-10 mt-1.5
|
|
86
|
+
React.createElement(Menu.Items, { className: 'absolute right-0 z-10 mt-1.5 max-h-96 min-w-[7.2rem] origin-top-right overflow-y-auto overscroll-contain whitespace-nowrap rounded-lg bg-white px-1 py-1 shadow-[0rem_0.25rem_0.375rem_-0.125rem_rgba(26,26,26,.2)] focus:outline-none' }, secondaryActions &&
|
|
83
87
|
sortedSecondaryActions.map(function (action) { return (React.createElement(Menu.Item, { key: action.id }, function (_a) {
|
|
84
88
|
var active = _a.active;
|
|
85
89
|
return (React.createElement("p", { className: classNames(active ? 'cursor-pointer rounded-lg bg-gray-100 text-gray-900' : 'text-gray-700', 'block px-2.5 py-2 text-xs', action.active && !action.deleted && 'rounded-lg bg-gray-200 font-semibold text-gray-900', action.deleted && !action.active && 'text-red-800 hover:bg-red-100', action.deleted && action.active && 'rounded-lg bg-red-200 font-semibold text-red-800'), onClick: action.onClick }, action.content));
|
|
86
90
|
})); })))),
|
|
87
|
-
React.createElement(
|
|
91
|
+
React.createElement("div", { className: 'hidden sm:block' },
|
|
92
|
+
React.createElement(PHXButton, { className: addNew ? '' : 'hidden', disabled: addNewLoading || disableAddNew, loading: addNewLoading, onClick: onAdd, primary: true, size: 'small' }, addNewText)))),
|
|
88
93
|
subTitle && React.createElement("p", { className: "".concat(isCancel && 'ml-11', " mt-[2px] text-[12px] text-gray-600") }, subTitle)));
|
|
89
94
|
};
|
|
90
95
|
//# sourceMappingURL=HeaderBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderBar.js","sourceRoot":"","sources":["../../../../src/components/HeaderBar/HeaderBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,SAAS,EAAe,MAAM,WAAW,CAAA;AAClD,OAAO,EAAY,WAAW,EAAE,MAAM,aAAa,CAAA;AA2EnD,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,EAyChB;QAxCX,cAAa,EAAb,MAAM,mBAAG,IAAI,KAAA,EACb,qBAAqB,EAArB,aAAa,mBAAG,KAAK,KAAA,EACrB,UAAU,gBAAA,EAC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C,CAiBtC,CAAC,CACO,CACF,CACR;gBAEP,6BAAK,SAAS,EAAC,iBAAiB;oBAC9B,oBAAC,SAAS,IACR,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EACjC,QAAQ,EAAE,aAAa,IAAI,aAAa,EACxC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,KAAK,EACd,OAAO,QACP,IAAI,EAAC,OAAO,IAEX,UAAU,CACD,CACR,CACF,CACF;QACL,QAAQ,IAAI,2BAAG,SAAS,EAAE,UAAG,QAAQ,IAAI,OAAO,wCAAqC,IAAG,QAAQ,CAAK,CAClG,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import 'katex/dist/katex.min.css';
|
|
3
|
-
export default function TextEditor({ initialData, onChange, apiCdnUpload, }: {
|
|
3
|
+
export default function TextEditor({ initialData, onChange, apiCdnUpload, height, label, }: {
|
|
4
4
|
initialData?: string;
|
|
5
5
|
onChange?: (data: string) => void;
|
|
6
6
|
apiCdnUpload: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
label?: string;
|
|
7
9
|
}): JSX.Element;
|
|
@@ -18,6 +18,7 @@ import { useForm } from 'react-hook-form';
|
|
|
18
18
|
import { PHXModal } from '../Modal/Modal';
|
|
19
19
|
import { PHXInput } from '../Input/Input';
|
|
20
20
|
import StyledEditorLayout from './styles/EditorStyle';
|
|
21
|
+
import EmojiPicker, { EmojiStyle } from 'emoji-picker-react';
|
|
21
22
|
var Image = ImageExt.extend({
|
|
22
23
|
addAttributes: function () {
|
|
23
24
|
var _a;
|
|
@@ -43,26 +44,32 @@ var Image = ImageExt.extend({
|
|
|
43
44
|
export default function TextEditor(_a) {
|
|
44
45
|
var _this = this;
|
|
45
46
|
var _b;
|
|
46
|
-
var initialData = _a.initialData, onChange = _a.onChange, apiCdnUpload = _a.apiCdnUpload;
|
|
47
|
+
var initialData = _a.initialData, onChange = _a.onChange, apiCdnUpload = _a.apiCdnUpload, height = _a.height, label = _a.label;
|
|
47
48
|
var _c = useState(null), editor = _c[0], setEditor = _c[1];
|
|
48
49
|
var _d = useState(0), forceUpdate = _d[1];
|
|
49
50
|
var _e = useState(false), showColorPicker = _e[0], setShowColorPicker = _e[1];
|
|
50
51
|
var _f = useState('#333333'), fontColor = _f[0], setFontColor = _f[1];
|
|
51
52
|
var pickerRef = useRef(null);
|
|
52
53
|
var toolbarRef = useRef(null);
|
|
54
|
+
var emojiPickerRef = useRef(null);
|
|
53
55
|
var _g = useState(''), fontSizeInput = _g[0], setFontSizeInput = _g[1];
|
|
54
56
|
var _h = useState(false), isEditingFontSize = _h[0], setIsEditingFontSize = _h[1];
|
|
55
57
|
var _j = useState({
|
|
56
58
|
left: 0,
|
|
57
59
|
top: 0
|
|
58
60
|
}), pickerPos = _j[0], setPickerPos = _j[1];
|
|
59
|
-
var _k = useState(
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
var _k = useState({
|
|
62
|
+
left: 0,
|
|
63
|
+
top: 0
|
|
64
|
+
}), emojiPickerPos = _k[0], setEmojiPickerPos = _k[1];
|
|
65
|
+
var _l = useState(false), showLinkInput = _l[0], setShowLinkInput = _l[1];
|
|
66
|
+
var _m = useState(new Set()), disabledItems = _m[0], setDisabledItems = _m[1];
|
|
67
|
+
var _o = useState(false), showEmojiPicker = _o[0], setShowEmojiPicker = _o[1];
|
|
68
|
+
var _p = useForm({
|
|
62
69
|
defaultValues: {
|
|
63
70
|
link: ''
|
|
64
71
|
}
|
|
65
|
-
}), errors =
|
|
72
|
+
}), errors = _p.formState.errors, register = _p.register, handleSubmit = _p.handleSubmit, reset = _p.reset;
|
|
66
73
|
// eslint-disable-next-line no-useless-escape
|
|
67
74
|
var regexUrl = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
|
|
68
75
|
var normalizeColor = function (val) {
|
|
@@ -185,7 +192,7 @@ export default function TextEditor(_a) {
|
|
|
185
192
|
],
|
|
186
193
|
editorProps: {
|
|
187
194
|
attributes: {
|
|
188
|
-
"class":
|
|
195
|
+
"class": "prose editor-height px-3 py-1.5 focus:outline-none border border-t-0 border-gray-300 rounded-b-md bg-white overflow-y-auto"
|
|
189
196
|
}
|
|
190
197
|
}
|
|
191
198
|
});
|
|
@@ -333,6 +340,22 @@ export default function TextEditor(_a) {
|
|
|
333
340
|
document.removeEventListener('mousedown', onDocMouseDown);
|
|
334
341
|
};
|
|
335
342
|
}, [showColorPicker]);
|
|
343
|
+
useEffect(function () {
|
|
344
|
+
if (!showEmojiPicker)
|
|
345
|
+
return;
|
|
346
|
+
var onDocMouseDown = function (e) {
|
|
347
|
+
var node = emojiPickerRef.current;
|
|
348
|
+
var target = e.target;
|
|
349
|
+
var isEmojiPicker = node === null || node === void 0 ? void 0 : node.contains(target);
|
|
350
|
+
if (node && !isEmojiPicker) {
|
|
351
|
+
setShowEmojiPicker(false);
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
document.addEventListener('mousedown', onDocMouseDown);
|
|
355
|
+
return function () {
|
|
356
|
+
document.removeEventListener('mousedown', onDocMouseDown);
|
|
357
|
+
};
|
|
358
|
+
}, [showEmojiPicker]);
|
|
336
359
|
useEffect(function () {
|
|
337
360
|
if (!editor || !showColorPicker)
|
|
338
361
|
return;
|
|
@@ -381,6 +404,40 @@ export default function TextEditor(_a) {
|
|
|
381
404
|
setShowLinkInput(false);
|
|
382
405
|
reset();
|
|
383
406
|
});
|
|
407
|
+
var onMouseDownToolbar = function (e, item) {
|
|
408
|
+
var _a;
|
|
409
|
+
e.preventDefault();
|
|
410
|
+
var container = toolbarRef.current;
|
|
411
|
+
var btnRect = e.currentTarget.getBoundingClientRect();
|
|
412
|
+
var contRect = container === null || container === void 0 ? void 0 : container.getBoundingClientRect();
|
|
413
|
+
if (item.name === 'Màu chữ') {
|
|
414
|
+
if (contRect) {
|
|
415
|
+
setPickerPos({
|
|
416
|
+
left: btnRect.left - contRect.left - 90,
|
|
417
|
+
top: btnRect.bottom - contRect.top + 8
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
var current = getCurrentSelectionColor();
|
|
421
|
+
if (current)
|
|
422
|
+
setFontColor(current);
|
|
423
|
+
setShowColorPicker(!showColorPicker);
|
|
424
|
+
forceUpdate(function (x) { return x + 1; });
|
|
425
|
+
}
|
|
426
|
+
else if (item.name === 'Biểu tượng cảm xúc') {
|
|
427
|
+
if (contRect) {
|
|
428
|
+
setEmojiPickerPos({
|
|
429
|
+
left: btnRect.left - contRect.left - 170,
|
|
430
|
+
top: btnRect.bottom - contRect.top + 8
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
setShowEmojiPicker(!showEmojiPicker);
|
|
434
|
+
e.stopPropagation();
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
(_a = item.action) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
438
|
+
forceUpdate(function (x) { return x + 1; });
|
|
439
|
+
}
|
|
440
|
+
};
|
|
384
441
|
var fontSizeOptions = [
|
|
385
442
|
{ label: '12', value: '12px' },
|
|
386
443
|
{ label: '14', value: '14px' },
|
|
@@ -653,7 +710,13 @@ export default function TextEditor(_a) {
|
|
|
653
710
|
name: 'Đường dẫn',
|
|
654
711
|
icon: toolbar_svg.link,
|
|
655
712
|
isActive: function () { return editor.isActive('link'); },
|
|
656
|
-
action: addLink
|
|
713
|
+
action: addLink,
|
|
714
|
+
borderRight: true
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: 'Biểu tượng cảm xúc',
|
|
718
|
+
icon: toolbar_svg.emoji,
|
|
719
|
+
action: function () { return setShowEmojiPicker(!showEmojiPicker); }
|
|
657
720
|
},
|
|
658
721
|
];
|
|
659
722
|
var uploadImage = function (file) { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -682,8 +745,9 @@ export default function TextEditor(_a) {
|
|
|
682
745
|
});
|
|
683
746
|
}); };
|
|
684
747
|
return (React.createElement("div", { className: 'phx-editor' },
|
|
685
|
-
React.createElement(StyledEditorLayout,
|
|
686
|
-
React.createElement("
|
|
748
|
+
React.createElement(StyledEditorLayout, { editorHeight: height }),
|
|
749
|
+
label && React.createElement("label", { className: 'block mb-1 text-xs font-normal text-gray-700' }, label),
|
|
750
|
+
React.createElement("div", { className: 'sticky top-0 z-30' },
|
|
687
751
|
React.createElement("div", { ref: toolbarRef, className: 'flex flex-wrap gap-1 p-2 bg-gray-100 border border-gray-300 rounded-t-md' },
|
|
688
752
|
toolbarItems.map(function (item) {
|
|
689
753
|
var _a, _b, _c, _d;
|
|
@@ -691,32 +755,16 @@ export default function TextEditor(_a) {
|
|
|
691
755
|
return item.component ? (React.createElement("div", { className: 'flex items-center gap-x-2' },
|
|
692
756
|
item.component(),
|
|
693
757
|
item.borderRight && React.createElement("div", { className: 'w-[1px] h-5 bg-gray-300' }))) : (React.createElement("div", { className: 'flex items-center gap-x-2' },
|
|
694
|
-
React.createElement("button", { key: item.name, type: 'button', "data-color-button": 'true', onMouseDown: function (e) {
|
|
695
|
-
var _a;
|
|
696
|
-
e.preventDefault();
|
|
697
|
-
if (item.name === 'Màu chữ') {
|
|
698
|
-
var container = toolbarRef.current;
|
|
699
|
-
var btnRect = e.currentTarget.getBoundingClientRect();
|
|
700
|
-
var contRect = container === null || container === void 0 ? void 0 : container.getBoundingClientRect();
|
|
701
|
-
if (contRect) {
|
|
702
|
-
setPickerPos({
|
|
703
|
-
left: btnRect.left - contRect.left - 90,
|
|
704
|
-
top: btnRect.bottom - contRect.top + 8
|
|
705
|
-
});
|
|
706
|
-
}
|
|
707
|
-
var current = getCurrentSelectionColor();
|
|
708
|
-
if (current)
|
|
709
|
-
setFontColor(current);
|
|
710
|
-
setShowColorPicker(!showColorPicker);
|
|
711
|
-
forceUpdate(function (x) { return x + 1; });
|
|
712
|
-
}
|
|
713
|
-
else {
|
|
714
|
-
(_a = item.action) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
715
|
-
forceUpdate(function (x) { return x + 1; });
|
|
716
|
-
}
|
|
717
|
-
}, className: "p-1 rounded-md duration-200 ".concat(((_b = item.isActive) === null || _b === void 0 ? void 0 : _b.call(item)) ? 'bg-gray-200' : '', " ").concat(((_c = item.isDisabled) === null || _c === void 0 ? void 0 : _c.call(item)) ? 'opacity-50 cursor-not-allowed' : 'hover:bg-gray-200 cursor-pointer'), disabled: (_d = item.isDisabled) === null || _d === void 0 ? void 0 : _d.call(item) }, (item === null || item === void 0 ? void 0 : item.icon) && React.createElement("span", { dangerouslySetInnerHTML: { __html: item.icon } })),
|
|
758
|
+
React.createElement("button", { key: item.name, type: 'button', "data-color-button": 'true', onMouseDown: function (e) { return onMouseDownToolbar(e, item); }, className: "p-1 rounded-md duration-200 ".concat(((_b = item.isActive) === null || _b === void 0 ? void 0 : _b.call(item)) ? 'bg-gray-200' : '', " ").concat(((_c = item.isDisabled) === null || _c === void 0 ? void 0 : _c.call(item)) ? 'opacity-50 cursor-not-allowed' : 'hover:bg-gray-200 cursor-pointer'), disabled: (_d = item.isDisabled) === null || _d === void 0 ? void 0 : _d.call(item) }, (item === null || item === void 0 ? void 0 : item.icon) && React.createElement("span", { dangerouslySetInnerHTML: { __html: item.icon } })),
|
|
718
759
|
item.borderRight && React.createElement("div", { className: 'w-[1px] h-5 bg-gray-300' })));
|
|
719
760
|
}),
|
|
761
|
+
showEmojiPicker && (React.createElement("div", { ref: emojiPickerRef, className: 'fixed z-50 p-5 bg-white border shadow sm:absolute rounded-xl', style: __assign({ left: '50%', top: emojiPickerPos.top, transform: 'translateX(-50%)' }, (window.innerWidth >= 640 && {
|
|
762
|
+
left: emojiPickerPos.left,
|
|
763
|
+
transform: 'none'
|
|
764
|
+
})) },
|
|
765
|
+
React.createElement(EmojiPicker, { emojiStyle: EmojiStyle.APPLE, searchPlaceHolder: 'T\u00ECm ki\u1EBFm', onEmojiClick: function (emojiData) { return editor === null || editor === void 0 ? void 0 : editor.chain().focus().insertContent(emojiData.emoji).run(); }, previewConfig: {
|
|
766
|
+
showPreview: false
|
|
767
|
+
}, skinTonesDisabled: true }))),
|
|
720
768
|
showColorPicker && (React.createElement("div", { ref: pickerRef, className: 'fixed z-50 p-5 bg-white border shadow sm:absolute rounded-xl', style: __assign({ left: '50%', top: pickerPos.top, transform: 'translateX(-50%)' }, (window.innerWidth >= 640 && {
|
|
721
769
|
left: pickerPos.left,
|
|
722
770
|
transform: 'none'
|