@squiz/formatted-text-editor 1.12.0-alpha.39 → 1.12.0-alpha.8

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.
Files changed (79) hide show
  1. package/README.md +3 -0
  2. package/lib/Editor/Editor.js +2 -7
  3. package/lib/EditorToolbar/EditorToolbar.js +3 -10
  4. package/lib/EditorToolbar/Tools/TextAlign/TextAlignButtons.js +1 -4
  5. package/lib/index.css +93 -803
  6. package/package.json +8 -12
  7. package/.eslintrc.json +0 -34
  8. package/CHANGELOG.md +0 -48
  9. package/build.js +0 -21
  10. package/cypress/e2e/bold.spec.cy.ts +0 -18
  11. package/cypress/global.d.ts +0 -9
  12. package/cypress/support/commands.ts +0 -130
  13. package/cypress/support/e2e.ts +0 -20
  14. package/cypress/tsconfig.json +0 -8
  15. package/cypress.config.ts +0 -7
  16. package/demo/App.tsx +0 -12
  17. package/demo/index.html +0 -13
  18. package/demo/index.scss +0 -1
  19. package/demo/main.tsx +0 -10
  20. package/demo/public/favicon-dxp.svg +0 -3
  21. package/demo/vite-env.d.ts +0 -1
  22. package/file-transformer.js +0 -1
  23. package/jest.config.ts +0 -27
  24. package/lib/EditorToolbar/Tools/Redo/RedoButton.d.ts +0 -2
  25. package/lib/EditorToolbar/Tools/Redo/RedoButton.js +0 -16
  26. package/lib/EditorToolbar/Tools/TextType/Heading/HeadingButton.d.ts +0 -5
  27. package/lib/EditorToolbar/Tools/TextType/Heading/HeadingButton.js +0 -32
  28. package/lib/EditorToolbar/Tools/TextType/Paragraph/ParagraphButton.d.ts +0 -2
  29. package/lib/EditorToolbar/Tools/TextType/Paragraph/ParagraphButton.js +0 -17
  30. package/lib/EditorToolbar/Tools/TextType/Preformatted/PreformattedButton.d.ts +0 -2
  31. package/lib/EditorToolbar/Tools/TextType/Preformatted/PreformattedButton.js +0 -16
  32. package/lib/EditorToolbar/Tools/TextType/TextTypeDropdown.d.ts +0 -2
  33. package/lib/EditorToolbar/Tools/TextType/TextTypeDropdown.js +0 -35
  34. package/lib/EditorToolbar/Tools/Undo/UndoButton.d.ts +0 -2
  35. package/lib/EditorToolbar/Tools/Undo/UndoButton.js +0 -16
  36. package/lib/extensions/PreformattedExtension/PreformattedExtension.d.ts +0 -10
  37. package/lib/extensions/PreformattedExtension/PreformattedExtension.js +0 -46
  38. package/lib/ui/DropdownButton/DropdownButton.d.ts +0 -9
  39. package/lib/ui/DropdownButton/DropdownButton.js +0 -8
  40. package/lib/ui/ToolbarDropdown/ToolbarDropdown.d.ts +0 -7
  41. package/lib/ui/ToolbarDropdown/ToolbarDropdown.js +0 -12
  42. package/postcss.config.js +0 -3
  43. package/src/Editor/Editor.spec.tsx +0 -228
  44. package/src/Editor/Editor.tsx +0 -52
  45. package/src/Editor/_editor.scss +0 -75
  46. package/src/EditorToolbar/EditorToolbar.tsx +0 -51
  47. package/src/EditorToolbar/Tools/Bold/BoldButton.spec.tsx +0 -19
  48. package/src/EditorToolbar/Tools/Bold/BoldButton.tsx +0 -30
  49. package/src/EditorToolbar/Tools/Italic/ItalicButton.spec.tsx +0 -19
  50. package/src/EditorToolbar/Tools/Italic/ItalicButton.tsx +0 -30
  51. package/src/EditorToolbar/Tools/Redo/RedoButton.spec.tsx +0 -59
  52. package/src/EditorToolbar/Tools/Redo/RedoButton.tsx +0 -30
  53. package/src/EditorToolbar/Tools/TextAlign/CenterAlign/CenterAlignButton.tsx +0 -31
  54. package/src/EditorToolbar/Tools/TextAlign/JustifyAlign/JustifyAlignButton.tsx +0 -31
  55. package/src/EditorToolbar/Tools/TextAlign/LeftAlign/LeftAlignButton.tsx +0 -31
  56. package/src/EditorToolbar/Tools/TextAlign/RightAlign/RightAlignButton.tsx +0 -31
  57. package/src/EditorToolbar/Tools/TextAlign/TextAlignButtons.tsx +0 -21
  58. package/src/EditorToolbar/Tools/TextType/Heading/HeadingButton.tsx +0 -52
  59. package/src/EditorToolbar/Tools/TextType/Paragraph/ParagraphButton.tsx +0 -26
  60. package/src/EditorToolbar/Tools/TextType/Preformatted/PreformattedButton.tsx +0 -30
  61. package/src/EditorToolbar/Tools/TextType/TextTypeDropdown.tsx +0 -44
  62. package/src/EditorToolbar/Tools/Underline/Underline.spec.tsx +0 -19
  63. package/src/EditorToolbar/Tools/Underline/UnderlineButton.tsx +0 -30
  64. package/src/EditorToolbar/Tools/Undo/UndoButton.spec.tsx +0 -49
  65. package/src/EditorToolbar/Tools/Undo/UndoButton.tsx +0 -30
  66. package/src/EditorToolbar/_editor-toolbar.scss +0 -19
  67. package/src/FormattedTextEditor.tsx +0 -12
  68. package/src/extensions/PreformattedExtension/PreformattedExtension.tsx +0 -50
  69. package/src/index.scss +0 -15
  70. package/src/index.ts +0 -3
  71. package/src/ui/DropdownButton/DropdownButton.tsx +0 -28
  72. package/src/ui/DropdownButton/_dropdown-button.scss +0 -7
  73. package/src/ui/ToolbarButton/ToolbarButton.tsx +0 -26
  74. package/src/ui/ToolbarButton/_toolbar-button.scss +0 -37
  75. package/src/ui/ToolbarDropdown/ToolbarDropdown.tsx +0 -32
  76. package/src/ui/ToolbarDropdown/_toolbar-dropdown.scss +0 -27
  77. package/tailwind.config.cjs +0 -62
  78. package/tsconfig.json +0 -22
  79. package/vite.config.ts +0 -19
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
3
- import 'flowbite';
4
-
5
- type ToolbarDropdownProps = {
6
- children: JSX.Element | JSX.Element[];
7
- label: string;
8
- };
9
-
10
- const ToolbarDropdown = ({ children, label }: ToolbarDropdownProps) => {
11
- return (
12
- <>
13
- <button
14
- id="dropdownHoverButton"
15
- data-dropdown-toggle="dropdown"
16
- className="toolbar-dropdown__button"
17
- type="button"
18
- >
19
- <span className="toolbar-dropdown__label">{label}</span>
20
- <ExpandMoreIcon className="toolbar-dropdown__icon" aria-hidden="true" />
21
- </button>
22
- <div
23
- id="dropdown"
24
- className="toolbar-dropdown__menu z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-169 dark:bg-gray-700"
25
- >
26
- <ul aria-labelledby="dropdownHoverButton">{children}</ul>
27
- </div>
28
- </>
29
- );
30
- };
31
-
32
- export default ToolbarDropdown;
@@ -1,27 +0,0 @@
1
- .toolbar-dropdown__button {
2
- @apply font-base text-md font-semibold text-gray-600;
3
- align-self: center;
4
-
5
- height: 2rem;
6
- padding-left: 0.5rem;
7
-
8
- &:active,
9
- &:hover,
10
- &:focus {
11
- background-color: rgba(black, 0.04);
12
- }
13
-
14
- .toolbar-dropdown__label {
15
- display: inline-flex;
16
- width: 7rem;
17
- }
18
-
19
- .toolbar-dropdown__icon {
20
- width: 1rem;
21
- height: 1.5rem;
22
- }
23
- }
24
-
25
- .toolbar-dropdown__menu {
26
- inset: 0rem auto auto 1rem !important;
27
- }
@@ -1,62 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}', './node_modules/flowbite/**/*.js'],
4
- theme: {
5
- extend: {
6
- borderRadius: {
7
- DEFAULT: '4px',
8
- md: '6px',
9
- },
10
- fontFamily: {
11
- base: 'Open Sans, Arial, sans-serif',
12
- },
13
- fontWeight: {
14
- normal: '400',
15
- medium: '500',
16
- semibold: '600',
17
- bold: '700',
18
- },
19
- fontSize: {
20
- xlg: '1.125rem',
21
- lg: '1rem',
22
- md: '0.875rem',
23
- sm: '0.8125rem',
24
- },
25
- boxShadow: {
26
- outline: '0 0 0 1px rgba(0,0,0,0.10)',
27
- sm: '0 0 0 1px rgba(0,0,0,0.04), 0 1px 4px 2px rgba(0,0,0,0.08)',
28
- DEFAULT: '0 0 0 1px rgba(0,0,0,0.04), 0 1px 12px 4px rgba(0,0,0,0.12)',
29
- md: '0 0 0 1px rgba(0,0,0,0.04), 0 1px 12px 4px rgba(0,0,0,0.12)',
30
- lg: '0 0 0 1px rgba(0,0,0,0.04), 0 1px 24px 12px rgba(0,0,0,0.12)',
31
- inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
32
- none: 'none',
33
- },
34
- spacing: {
35
- 1: '0.25rem', // 4px
36
- 2: '0.5rem', // 8px
37
- 3: '0.75rem', // 12px
38
- 4: '1rem', // 16px
39
- 5: '1.25rem', // 20px
40
- 6: '1.5rem', // 24px
41
- 7: '1.75rem', // 28px
42
- 8: '2rem', // 32px
43
- 169: '169px', // 169px
44
- },
45
- colors: {
46
- gray: {
47
- 200: '#ededed',
48
- 300: '#e0e0e0',
49
- 600: '#707070',
50
- },
51
- blue: {
52
- 100: '#e6f1fa',
53
- 300: '#0774d2',
54
- },
55
- orange: {
56
- 100: '#dadbe9',
57
- },
58
- },
59
- },
60
- },
61
- plugins: [require('flowbite/plugin')],
62
- };
package/tsconfig.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "useDefineForClassFields": true,
5
- "experimentalDecorators": true,
6
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
7
- "allowJs": false,
8
- "skipLibCheck": true,
9
- "esModuleInterop": true,
10
- "allowSyntheticDefaultImports": true,
11
- "strict": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "module": "ESNext",
14
- "moduleResolution": "Node",
15
- "resolveJsonModule": true,
16
- "isolatedModules": true,
17
- "jsx": "react",
18
- "declaration": true,
19
- "outDir": "./lib"
20
- },
21
- "files": ["src/index.ts"]
22
- }
package/vite.config.ts DELETED
@@ -1,19 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import react from '@vitejs/plugin-react';
3
-
4
- // https://vitejs.dev/config/
5
- export default defineConfig({
6
- root: 'demo',
7
- build: {
8
- outDir: 'build/demo',
9
- },
10
- plugins: [
11
- react({
12
- babel: {
13
- parserOpts: {
14
- plugins: ['decorators-legacy'],
15
- },
16
- },
17
- }),
18
- ],
19
- });