prosemirror-slash-menu-react 0.0.5 → 0.0.7
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/README.md +6 -1
- package/dist/assets/{index.es-d21c7ba0.css → index-435f7c53.css} +16 -0
- package/dist/assets/{index-cfd97ea4.css → index.es-9d7470f2.css} +16 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +342 -314
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +340 -312
- package/dist/index.js.map +1 -1
- package/dist/slashMenuReact/ListItem.d.ts +13 -10
- package/dist/slashMenuReact/defaults.d.ts +24 -24
- package/dist/slashMenuReact/display.d.ts +48 -44
- package/dist/slashMenuReact/utils.d.ts +2 -2
- package/dist/styles/menu-style.css +16 -0
- package/package.json +22 -12
- package/dist/assets/index-05ff7633.css +0 -73
- package/dist/assets/index-14e7dbea.css +0 -72
- package/dist/assets/index-6cb01e0d.css +0 -71
- package/dist/assets/index.es-5b89677e.css +0 -71
- package/dist/assets/index.es-d3088368.css +0 -72
- package/dist/assets/index.es-fa7f86de.css +0 -73
- package/dist/index.css +0 -60
- package/dist/index.es.css +0 -60
- package/dist/slashMenuReact/icons/defaultIcons.d.ts +0 -11
package/README.md
CHANGED
|
@@ -127,8 +127,10 @@ override the following classnames.
|
|
|
127
127
|
|
|
128
128
|
- `menu-display-root` root div for the menu
|
|
129
129
|
- `menu-element-wrapper` root of menu elements
|
|
130
|
+
- `menu-element-wrapper-clickable` root of menu elements when the menu items are set to be clickable
|
|
130
131
|
- `menu-element-selected` classname that is added alongside `menu-element-wrapper` when an element is selected
|
|
131
132
|
- `menu-element-icon` if icon is provided for the element it's rendered in this div
|
|
133
|
+
- `menu-element-right-icon` if right icon is provided its rendered in this div
|
|
132
134
|
- `menu-element-label` label of the menu element
|
|
133
135
|
- `menu-placeholder` when there is no matching items for the filter, this is displayed with the text "No matching items"
|
|
134
136
|
- `menu-filter-wrapper` root of the filter display, positioned above the menu by default
|
|
@@ -143,10 +145,13 @@ override the following classnames.
|
|
|
143
145
|
- `editorView` prosemirror editor view
|
|
144
146
|
- `icons` Optional, if you want to provide icons for your menu elements. Type of `{[key: string]: FC}` where the key is
|
|
145
147
|
the id of the menu element and the value is a `FunctionComponent` that renders the icon
|
|
148
|
+
- `rightIcons` Same as icons but these appear on the right on the menu element, most commonly used for indicating a
|
|
149
|
+
submenu with an arrow
|
|
146
150
|
- `subMenuIcon` Optional icon for submenu label. By default, when a submenu is open an arrow is displayed indicating
|
|
147
151
|
that the user is in a subMenu, it can be replaced with a react node of your choice
|
|
148
152
|
- `filterFieldIcon` Optional icon in the filter field.
|
|
149
153
|
- `filterPlaceHolder` Optional placeholder text for the filter field.
|
|
150
154
|
- `mainMenuLabel` Optional label for the main menu. By default, there is none.
|
|
151
155
|
- `popperReference` Optional popper reference HTMLElement, for displaying the menu next to whatever element you want
|
|
152
|
-
- `popperOptions` You can pass in `placement` and `offset` to position your menu around the reference Element
|
|
156
|
+
- `popperOptions` You can pass in `placement` and `offset` to position your menu around the reference Element
|
|
157
|
+
- `clickable` Optional boolean, if true the menu items are clickable, by default they are used only with keyboard
|
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
padding: 0.2rem 0.5rem;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.menu-element-wrapper-clickable {
|
|
22
|
+
display: flex;
|
|
23
|
+
border-radius: 0.3rem;
|
|
24
|
+
padding: 0.2rem 0.5rem;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
21
28
|
.menu-element-selected {
|
|
22
29
|
background-color: #f1f1f1;
|
|
23
30
|
}
|
|
@@ -29,6 +36,15 @@
|
|
|
29
36
|
align-items: center;
|
|
30
37
|
}
|
|
31
38
|
|
|
39
|
+
.menu-element-right-icon {
|
|
40
|
+
margin-left: auto;
|
|
41
|
+
width: 23px;
|
|
42
|
+
height: auto;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
margin-right: 0.5rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
32
48
|
.menu-element-label {
|
|
33
49
|
color: black;
|
|
34
50
|
display: flex;
|
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
padding: 0.2rem 0.5rem;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.menu-element-wrapper-clickable {
|
|
22
|
+
display: flex;
|
|
23
|
+
border-radius: 0.3rem;
|
|
24
|
+
padding: 0.2rem 0.5rem;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
21
28
|
.menu-element-selected {
|
|
22
29
|
background-color: #f1f1f1;
|
|
23
30
|
}
|
|
@@ -29,6 +36,15 @@
|
|
|
29
36
|
align-items: center;
|
|
30
37
|
}
|
|
31
38
|
|
|
39
|
+
.menu-element-right-icon {
|
|
40
|
+
margin-left: auto;
|
|
41
|
+
width: 23px;
|
|
42
|
+
height: auto;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
margin-right: 0.5rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
32
48
|
.menu-element-label {
|
|
33
49
|
color: black;
|
|
34
50
|
display: flex;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./slashMenuReact/display";
|
|
2
|
-
export * from "./slashMenuReact/defaults";
|
|
1
|
+
export * from "./slashMenuReact/display";
|
|
2
|
+
export * from "./slashMenuReact/defaults";
|