@kubex/zinc 1.1.145 → 1.1.147
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/custom-elements.json +79 -75
- package/dist/vscode.html-custom-data.json +12 -12
- package/dist/web-types.json +24 -24
- package/dist/zn.d.ts +1 -0
- package/dist/zn.min.js +96 -96
- package/package.json +1 -1
- package/src/components/remarkd-editor/remarkd-editor.component.ts +1 -0
- package/src/components/remarkd-editor/remarkd-editor.scss +2 -2
- package/src/components/translations/translations.component.ts +4 -2
package/package.json
CHANGED
|
@@ -342,6 +342,7 @@ function renderInlineConditional(block: string): TemplateResult | null {
|
|
|
342
342
|
* @csspart include-picker - The inline Include picker opened from the toolbar or "/include".
|
|
343
343
|
*
|
|
344
344
|
* @cssproperty --remarkd-editor-max-height - The tallest the editor grows before its body scrolls. Defaults to `100dvh`.
|
|
345
|
+
* @cssproperty --remarkd-editor-min-height - The shortest the body renders while empty. Defaults to `10rem`.
|
|
345
346
|
*/
|
|
346
347
|
export default class ZnRemarkdEditor extends ZincElement implements ZincFormControl {
|
|
347
348
|
static styles: CSSResultGroup = unsafeCSS(styles);
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
.remarkd-editor__body {
|
|
56
56
|
padding: var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-large) 52px;
|
|
57
|
-
min-height: 10rem;
|
|
57
|
+
min-height: var(--remarkd-editor-min-height, 10rem);
|
|
58
58
|
overflow-y: auto;
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
|
|
71
71
|
.remarkd-editor__raw {
|
|
72
72
|
flex: 1;
|
|
73
|
-
min-height: 10rem;
|
|
73
|
+
min-height: var(--remarkd-editor-min-height, 10rem);
|
|
74
74
|
resize: vertical;
|
|
75
75
|
border: 0;
|
|
76
76
|
background: transparent;
|
|
@@ -357,8 +357,10 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
357
357
|
|
|
358
358
|
private handleKeyDown = (event: KeyboardEvent) => {
|
|
359
359
|
if (event.key === 'Enter') {
|
|
360
|
-
// An inline edit commits on Enter itself,
|
|
361
|
-
|
|
360
|
+
// An inline edit commits on Enter itself, a textarea needs it for the
|
|
361
|
+
// newline, and a remarkd editor for a new paragraph.
|
|
362
|
+
if (event.target instanceof ZnInlineEdit || event.target instanceof ZnTextarea
|
|
363
|
+
|| event.target instanceof ZnRemarkdEditor) {
|
|
362
364
|
return;
|
|
363
365
|
}
|
|
364
366
|
|