@payloadcms/richtext-lexical 0.1.0-beta.0 → 0.1.0-beta.1

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 (39) hide show
  1. package/dist/field/features/Blocks/component/index.scss +125 -0
  2. package/dist/field/features/Blocks/drawer/index.scss +1 -0
  3. package/dist/field/features/Blocks/index.scss +1 -0
  4. package/dist/field/features/Link/drawer/index.scss +50 -0
  5. package/dist/field/features/Link/index.scss +1 -0
  6. package/dist/field/features/Link/plugins/floatingLinkEditor/index.scss +79 -0
  7. package/dist/field/features/Relationship/drawer/index.scss +1 -0
  8. package/dist/field/features/Relationship/index.scss +1 -0
  9. package/dist/field/features/Relationship/nodes/components/index.scss +89 -0
  10. package/dist/field/features/Upload/component/index.scss +151 -0
  11. package/dist/field/features/Upload/drawer/index.scss +1 -0
  12. package/dist/field/features/Upload/index.scss +1 -0
  13. package/dist/field/features/Upload/nodes/UploadNode.scss +4 -0
  14. package/dist/field/features/align/index.scss +4 -0
  15. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.scss +4 -0
  16. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.scss +4 -0
  17. package/dist/field/features/debug/TreeView/index.scss +78 -0
  18. package/dist/field/features/format/common/index.scss +4 -0
  19. package/dist/field/features/indent/index.scss +4 -0
  20. package/dist/field/index.scss +1 -0
  21. package/dist/field/lexical/LexicalEditor.scss +34 -0
  22. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.scss +39 -0
  23. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.scss +100 -0
  24. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.scss +57 -0
  25. package/dist/field/lexical/plugins/SlashMenu/index.scss +49 -0
  26. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +35 -0
  27. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +50 -0
  28. package/dist/field/lexical/theme/EditorTheme.scss +508 -0
  29. package/dist/field/lexical/ui/ContentEditable.scss +21 -0
  30. package/dist/field/lexical/ui/icons/Add/index.svg +4 -0
  31. package/dist/field/lexical/ui/icons/Caret/index.svg +3 -0
  32. package/dist/field/lexical/ui/icons/DraggableBlock/index.svg +9 -0
  33. package/dist/field/lexical/ui/icons/Edit/index.svg +10 -0
  34. package/dist/field/lexical/ui/icons/Remove/index.svg +4 -0
  35. package/dist/index.d.ts +18 -4
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +35 -20
  38. package/package.json +6 -4
  39. package/src/index.ts +20 -4
@@ -0,0 +1,100 @@
1
+ @import 'payload/scss';
2
+
3
+ .floating-select-toolbar-popup__dropdown {
4
+ display: flex;
5
+ align-items: center;
6
+ vertical-align: middle;
7
+ justify-content: center;
8
+ height: 30px;
9
+ width: 40px;
10
+ border: 0;
11
+ background: none;
12
+ border-radius: 4px;
13
+ cursor: pointer;
14
+ position: relative;
15
+ padding: 0;
16
+
17
+ &:disabled {
18
+ cursor: not-allowed;
19
+
20
+ .icon {
21
+ opacity: 0.2;
22
+ }
23
+ }
24
+
25
+ &:hover:not([disabled]) {
26
+ background-color: var(--color-base-100);
27
+ }
28
+
29
+ &.active {
30
+ background-color: var(--color-base-100);
31
+
32
+ .floating-select-toolbar-popup__dropdown--caret {
33
+ &:after {
34
+ transform: rotate(0deg);
35
+ }
36
+ }
37
+ }
38
+
39
+ &--caret {
40
+ &:after {
41
+ transform: rotate(180deg);
42
+
43
+ content: ' ';
44
+ position: absolute;
45
+ top: 13px;
46
+
47
+ /* Vector 3 */
48
+
49
+ width: 7px;
50
+ height: 4px;
51
+
52
+ opacity: 0.3;
53
+ background-image: url(../../../ui/icons/Caret/index.svg);
54
+ background-position-y: 0px;
55
+ background-position-x: 0px;
56
+ }
57
+ }
58
+
59
+ &--items {
60
+ position: absolute;
61
+ background: var(--color-base-0);
62
+ border-radius: 4px;
63
+ width: 132.5px;
64
+ z-index: 100;
65
+
66
+ .item {
67
+ all: unset; // reset all default button styles
68
+ cursor: pointer;
69
+ color: var(--color-base-900);
70
+
71
+ &:hover:not([disabled]) {
72
+ background-color: var(--color-base-100);
73
+ }
74
+ padding-left: 6.25px;
75
+ padding-right: 6.25px;
76
+ width: 100%;
77
+ height: 30px;
78
+ border-radius: 4px;
79
+ box-sizing: border-box;
80
+ display: flex;
81
+ align-items: center;
82
+ gap: 6.25px;
83
+
84
+ .icon {
85
+ min-width: 20px;
86
+ height: 20px;
87
+ color: var(--color-base-600);
88
+ }
89
+ }
90
+ }
91
+ }
92
+
93
+ html[data-theme='light'] {
94
+ .floating-select-toolbar-popup__dropdown {
95
+ &--items {
96
+ position: absolute;
97
+ box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.2);
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,57 @@
1
+ @import 'payload/scss';
2
+
3
+ html[data-theme='light'] {
4
+ .floating-select-toolbar-popup {
5
+ box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.2);
6
+ }
7
+ }
8
+
9
+ .floating-select-toolbar-popup {
10
+ display: flex;
11
+ align-items: center;
12
+ background: var(--color-base-0);
13
+ padding: 0px 3.72px 0px 6.25px;
14
+ vertical-align: middle;
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ z-index: 10;
19
+ opacity: 0;
20
+ border-radius: 6.25px;
21
+ transition: opacity 0.2s;
22
+ height: 37.5px;
23
+ will-change: transform;
24
+
25
+ .caret {
26
+ z-index: 93;
27
+ position: absolute;
28
+ top: calc(100% - 16px);
29
+ border: 12px solid transparent;
30
+ pointer-events: none;
31
+ border-top-color: var(--color-base-0);
32
+ }
33
+
34
+ &__section {
35
+ display: flex;
36
+ align-items: center;
37
+
38
+ .icon {
39
+ min-width: 20px;
40
+ height: 20px;
41
+ color: var(--color-base-600);
42
+ }
43
+
44
+ .divider {
45
+ width: 1px;
46
+ height: 15px;
47
+ background-color: var(--color-base-100);
48
+ margin: 0 6.25px;
49
+ }
50
+ }
51
+
52
+ @media (max-width: 1024px) {
53
+ button.insert-comment {
54
+ display: none;
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,49 @@
1
+ @import 'payload/scss';
2
+
3
+ html[data-theme='light'] {
4
+ .slash-menu {
5
+ box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.2);
6
+ }
7
+ }
8
+
9
+ .slash-menu {
10
+ background: var(--color-base-0);
11
+ width: 200px;
12
+ color: var(--color-base-800);
13
+ border-radius: 4px;
14
+ list-style: none;
15
+
16
+ .group {
17
+ padding-bottom: 8px;
18
+ }
19
+
20
+ .group-title {
21
+ padding-left: 10px;
22
+ color: var(--color-base-600);
23
+ font-size: 10px;
24
+ }
25
+
26
+ .item {
27
+ padding-left: 8px;
28
+ background: none;
29
+ border: none;
30
+ color: var(--color-base-900);
31
+ display: flex;
32
+ align-items: center;
33
+ height: 30px;
34
+ width: 100%;
35
+ cursor: pointer;
36
+
37
+ &.selected {
38
+ background: var(--color-base-100);
39
+ }
40
+
41
+ .text {
42
+ margin-left: 6px;
43
+ }
44
+
45
+ .icon {
46
+ color: var(--color-base-500);
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,35 @@
1
+ @import 'payload/scss';
2
+
3
+ .add-block-menu {
4
+ all: unset; // reset all default button styles
5
+ border-radius: 4px;
6
+ padding: 0px;
7
+ cursor: pointer;
8
+ opacity: 0;
9
+ position: absolute;
10
+ left: 0;
11
+ top: 0;
12
+ will-change: transform;
13
+
14
+ &:hover {
15
+ background: rgba(255, 255, 255, 0.1);
16
+ .icon {
17
+ opacity: 1;
18
+ }
19
+ }
20
+
21
+ .icon {
22
+ width: 18px;
23
+ height: 24px;
24
+ opacity: 0.3;
25
+ background-image: url(../../../ui/icons/Add/index.svg);
26
+ background-position-y: 2.5px;
27
+ background-position-x: 0px;
28
+ }
29
+
30
+ html[data-theme='dark'] & {
31
+ .icon {
32
+ filter: invert(1);
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,50 @@
1
+ @import 'payload/scss';
2
+
3
+ .draggable-block-menu {
4
+ border-radius: 4px;
5
+ padding: 0px;
6
+ cursor: grab;
7
+ opacity: 0;
8
+ position: absolute;
9
+ left: 0;
10
+ top: 0;
11
+ will-change: transform;
12
+
13
+ &:active {
14
+ cursor: grabbing;
15
+ }
16
+
17
+ &:hover {
18
+ background: rgba(255, 255, 255, 0.1);
19
+ .icon {
20
+ opacity: 1;
21
+ }
22
+ }
23
+
24
+ .icon {
25
+ width: 18px;
26
+ height: 24px;
27
+ opacity: 0.3;
28
+ background-image: url(../../../ui/icons/DraggableBlock/index.svg);
29
+ }
30
+
31
+ html[data-theme='dark'] & {
32
+ .icon {
33
+ filter: invert(1);
34
+ }
35
+ }
36
+ }
37
+
38
+ .draggable-block-target-line {
39
+ pointer-events: none;
40
+ background: var(--theme-elevation-200);
41
+ border: 1px solid var(--theme-elevation-650);
42
+ border-radius: 4px;
43
+ height: 50px;
44
+ position: absolute;
45
+ left: 0;
46
+ top: 0;
47
+ opacity: 0;
48
+ will-change: transform;
49
+ transition: transform 0.05s;
50
+ }