@atlaskit/editor-plugin-help-dialog 1.2.5 → 1.2.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/CHANGELOG.md +18 -0
- package/dist/cjs/ui/ModalContent.js +17 -9
- package/dist/cjs/ui/ModalFooter.js +10 -7
- package/dist/cjs/ui/ModalHeader.js +21 -16
- package/dist/cjs/ui/formatting.js +139 -113
- package/dist/cjs/ui/styles.js +35 -0
- package/dist/cjs/ui/utils.js +52 -34
- package/dist/es2019/ui/ModalContent.js +9 -3
- package/dist/es2019/ui/ModalFooter.js +3 -1
- package/dist/es2019/ui/ModalHeader.js +21 -16
- package/dist/es2019/ui/formatting.js +28 -11
- package/dist/es2019/ui/styles.js +35 -0
- package/dist/es2019/ui/utils.js +52 -34
- package/dist/esm/ui/ModalContent.js +17 -9
- package/dist/esm/ui/ModalFooter.js +10 -7
- package/dist/esm/ui/ModalHeader.js +21 -16
- package/dist/esm/ui/formatting.js +140 -114
- package/dist/esm/ui/styles.js +35 -0
- package/dist/esm/ui/utils.js +52 -34
- package/package.json +81 -102
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, clearFormatting, decreaseMediaSize, focusTableResizer, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redo, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
5
|
+
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, clearFormatting, decreaseMediaSize, focusTableResizer, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redo, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
6
6
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -338,147 +338,174 @@ var otherFormatting = function otherFormatting(_ref3) {
|
|
|
338
338
|
name: formatMessage(messages.selectTableRow),
|
|
339
339
|
type: 'table',
|
|
340
340
|
autoFormatting: function autoFormatting() {
|
|
341
|
-
return
|
|
342
|
-
css
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
341
|
+
return (
|
|
342
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
343
|
+
jsx("span", {
|
|
344
|
+
css: shortcutsArray
|
|
345
|
+
}, jsx("span", null, jsx("span", {
|
|
346
|
+
css: browser.mac ? codeSm : codeMd
|
|
347
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
348
|
+
css: codeMd
|
|
349
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
350
|
+
css: codeMd
|
|
351
|
+
}, "Shift"), ' + ', jsx("span", {
|
|
352
|
+
css: codeSm
|
|
353
|
+
}, "\u2190")), jsx("span", null, jsx("span", {
|
|
354
|
+
css: browser.mac ? codeSm : codeMd
|
|
355
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
356
|
+
css: codeMd
|
|
357
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
358
|
+
css: codeMd
|
|
359
|
+
}, "Shift"), ' + ', jsx("span", {
|
|
360
|
+
css: codeSm
|
|
361
|
+
}, "\u2192")))
|
|
362
|
+
);
|
|
360
363
|
}
|
|
361
364
|
}, {
|
|
362
365
|
name: formatMessage(messages.selectTableColumn),
|
|
363
366
|
type: 'table',
|
|
364
367
|
autoFormatting: function autoFormatting() {
|
|
365
|
-
return
|
|
366
|
-
css
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
368
|
+
return (
|
|
369
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
370
|
+
jsx("span", {
|
|
371
|
+
css: shortcutsArray
|
|
372
|
+
}, jsx("span", null, jsx("span", {
|
|
373
|
+
css: browser.mac ? codeSm : codeMd
|
|
374
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
375
|
+
css: codeMd
|
|
376
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
377
|
+
css: codeMd
|
|
378
|
+
}, "Shift"), ' + ', jsx("span", {
|
|
379
|
+
css: codeSm
|
|
380
|
+
}, "\u2191")), jsx("span", null, jsx("span", {
|
|
381
|
+
css: browser.mac ? codeSm : codeMd
|
|
382
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
383
|
+
css: codeMd
|
|
384
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
385
|
+
css: codeMd
|
|
386
|
+
}, "Shift"), ' + ', jsx("span", {
|
|
387
|
+
css: codeSm
|
|
388
|
+
}, "\u2193")))
|
|
389
|
+
);
|
|
384
390
|
}
|
|
385
391
|
}].concat(_toConsumableArray(getBooleanFF('platform.editor.a11y-help-dialog-shortcut-keys-position_aghfg') ? [{
|
|
386
392
|
name: formatMessage(messages.InsertTableColumn),
|
|
387
393
|
type: 'table',
|
|
388
394
|
autoFormatting: function autoFormatting() {
|
|
389
|
-
return
|
|
390
|
-
css
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
395
|
+
return (
|
|
396
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
397
|
+
jsx("span", {
|
|
398
|
+
css: shortcutsArray
|
|
399
|
+
}, jsx("span", null, jsx("span", {
|
|
400
|
+
css: browser.mac ? codeSm : codeMd
|
|
401
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
402
|
+
css: codeMd
|
|
403
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
404
|
+
css: codeSm
|
|
405
|
+
}, "=")), jsx("span", null, jsx("span", {
|
|
406
|
+
css: browser.mac ? codeSm : codeMd
|
|
407
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
408
|
+
css: codeMd
|
|
409
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
410
|
+
css: codeSm
|
|
411
|
+
}, "-")))
|
|
412
|
+
);
|
|
404
413
|
}
|
|
405
414
|
}, {
|
|
406
415
|
name: formatMessage(messages.InsertTableRow),
|
|
407
416
|
type: 'table',
|
|
408
417
|
autoFormatting: function autoFormatting() {
|
|
409
|
-
return
|
|
410
|
-
css
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
418
|
+
return (
|
|
419
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
420
|
+
jsx("span", {
|
|
421
|
+
css: shortcutsArray
|
|
422
|
+
}, jsx("span", null, jsx("span", {
|
|
423
|
+
css: browser.mac ? codeSm : codeMd
|
|
424
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
425
|
+
css: codeMd
|
|
426
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
427
|
+
css: codeSm
|
|
428
|
+
}, "]")), jsx("span", null, jsx("span", {
|
|
429
|
+
css: browser.mac ? codeSm : codeMd
|
|
430
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
431
|
+
css: codeMd
|
|
432
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
433
|
+
css: codeSm
|
|
434
|
+
}, "[")))
|
|
435
|
+
);
|
|
424
436
|
}
|
|
425
437
|
}] : [{
|
|
426
438
|
name: formatMessage(messages.InsertTableColumn),
|
|
427
439
|
type: 'table',
|
|
428
440
|
autoFormatting: function autoFormatting() {
|
|
429
|
-
return
|
|
430
|
-
css
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
return (
|
|
442
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
443
|
+
jsx("span", {
|
|
444
|
+
css: shortcutsArray
|
|
445
|
+
}, jsx("span", null, jsx("span", {
|
|
446
|
+
css: codeSm
|
|
447
|
+
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
448
|
+
css: codeMd
|
|
449
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
450
|
+
css: codeSm
|
|
451
|
+
}, "\u2192")), jsx("span", null, jsx("span", {
|
|
452
|
+
css: codeSm
|
|
453
|
+
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
454
|
+
css: codeMd
|
|
455
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
456
|
+
css: codeSm
|
|
457
|
+
}, "\u2190")))
|
|
458
|
+
);
|
|
444
459
|
}
|
|
445
460
|
}, {
|
|
446
461
|
name: formatMessage(messages.InsertTableRow),
|
|
447
462
|
type: 'table',
|
|
448
463
|
autoFormatting: function autoFormatting() {
|
|
449
|
-
return
|
|
450
|
-
css
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
+
return (
|
|
465
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
466
|
+
jsx("span", {
|
|
467
|
+
css: shortcutsArray
|
|
468
|
+
}, jsx("span", null, jsx("span", {
|
|
469
|
+
css: codeSm
|
|
470
|
+
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
471
|
+
css: codeMd
|
|
472
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
473
|
+
css: codeSm
|
|
474
|
+
}, "\u2193")), jsx("span", null, jsx("span", {
|
|
475
|
+
css: codeSm
|
|
476
|
+
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
477
|
+
css: codeMd
|
|
478
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
479
|
+
css: codeSm
|
|
480
|
+
}, "\u2191")))
|
|
481
|
+
);
|
|
464
482
|
}
|
|
465
483
|
}]), _toConsumableArray(getBooleanFF('platform.editor.a11y-column-resizing_emcvz') ? [{
|
|
466
484
|
name: formatMessage(messages.selectColumnResize),
|
|
467
485
|
type: 'table',
|
|
468
486
|
autoFormatting: function autoFormatting() {
|
|
469
|
-
return
|
|
470
|
-
css
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
487
|
+
return (
|
|
488
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
489
|
+
jsx("span", {
|
|
490
|
+
css: shortcutsArray
|
|
491
|
+
}, jsx("span", null, jsx("span", {
|
|
492
|
+
css: browser.mac ? codeSm : codeMd
|
|
493
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx("span", {
|
|
494
|
+
css: codeMd
|
|
495
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
496
|
+
css: codeMd
|
|
497
|
+
}, "Shift"), ' + ', jsx("span", {
|
|
498
|
+
css: codeSm
|
|
499
|
+
}, "C")))
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
}] : []), [{
|
|
503
|
+
name: formatMessage(messages.highlightColor),
|
|
504
|
+
type: 'highlight',
|
|
505
|
+
keymap: function keymap() {
|
|
506
|
+
return toggleHighlightPalette;
|
|
507
|
+
}
|
|
508
|
+
}]);
|
|
482
509
|
};
|
|
483
510
|
var resizeInformationFormatting = function resizeInformationFormatting(_ref4) {
|
|
484
511
|
var formatMessage = _ref4.formatMessage;
|
|
@@ -527,10 +554,9 @@ var quickInsertAutoFormat = function quickInsertAutoFormat(_ref6) {
|
|
|
527
554
|
}
|
|
528
555
|
};
|
|
529
556
|
};
|
|
530
|
-
var isAnyA11yResizeFeatureFlagEnabled = getBooleanFF('platform.editor.a11y-media-resizing_b5v0o') || getBooleanFF('platform.editor.a11y-table-resizing_uapcv');
|
|
531
557
|
export var getSupportedFormatting = function getSupportedFormatting(schema, intl, imageEnabled, quickInsertEnabled) {
|
|
532
558
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
533
559
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
534
560
|
});
|
|
535
|
-
return [].concat(_toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(getBooleanFF('platform.editor.a11y-table-resizing_uapcv') ? focusTableResizeHandleFormatting(intl) : []), _toConsumableArray(
|
|
561
|
+
return [].concat(_toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(getBooleanFF('platform.editor.a11y-table-resizing_uapcv') ? focusTableResizeHandleFormatting(intl) : []), _toConsumableArray(resizeInformationFormatting(intl)));
|
|
536
562
|
};
|
package/dist/esm/ui/styles.js
CHANGED
|
@@ -2,36 +2,52 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { akEditorUnitZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
4
|
import { B300, N400 } from '@atlaskit/theme/colors';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
5
6
|
export var header = css({
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
6
8
|
zIndex: akEditorUnitZIndex,
|
|
7
9
|
minHeight: "var(--ds-space-300, 24px)",
|
|
8
10
|
padding: "var(--ds-space-250, 20px)".concat(" ", "var(--ds-space-500, 40px)"),
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
9
12
|
fontSize: relativeFontSizeToBase16(24),
|
|
10
13
|
display: 'flex',
|
|
11
14
|
justifyContent: 'space-between',
|
|
12
15
|
alignItems: 'center',
|
|
13
16
|
boxShadow: "'none'",
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
14
18
|
color: "var(--ds-text, ".concat(colors.N400, ")"),
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
15
20
|
backgroundColor: "var(--ds-background-neutral-subtle, ".concat(colors.N0, ")"),
|
|
16
21
|
borderRadius: "var(--ds-border-radius, 3px)"
|
|
17
22
|
});
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
18
25
|
export var footer = css({
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
27
|
zIndex: akEditorUnitZIndex,
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
20
29
|
fontSize: relativeFontSizeToBase16(14),
|
|
21
30
|
lineHeight: "var(--ds-space-250, 20px)",
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
22
32
|
color: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
|
|
23
33
|
padding: "var(--ds-space-300, 24px)",
|
|
24
34
|
textAlign: 'right',
|
|
25
35
|
boxShadow: "'none'"
|
|
26
36
|
});
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
27
39
|
export var contentWrapper = css({
|
|
28
40
|
padding: "var(--ds-space-250, 20px)".concat(" ", "var(--ds-space-500, 40px)"),
|
|
29
41
|
borderBottomRightRadius: "var(--ds-border-radius, 3px)",
|
|
30
42
|
overflow: 'auto',
|
|
31
43
|
position: 'relative',
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
32
45
|
color: "var(--ds-text-subtle, ".concat(colors.N400, ")"),
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
33
47
|
backgroundColor: "var(--ds-background-neutral-subtle, ".concat(colors.N0, ")")
|
|
34
48
|
});
|
|
49
|
+
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
35
51
|
export var line = css({
|
|
36
52
|
background: "var(--ds-background-neutral-subtle, #fff)",
|
|
37
53
|
content: "''",
|
|
@@ -44,6 +60,8 @@ export var line = css({
|
|
|
44
60
|
width: '100%',
|
|
45
61
|
minWidth: '604px'
|
|
46
62
|
});
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
47
65
|
export var content = css({
|
|
48
66
|
minWidth: '524px',
|
|
49
67
|
width: '100%',
|
|
@@ -57,6 +75,8 @@ export var column = {
|
|
|
57
75
|
padding: 0
|
|
58
76
|
}
|
|
59
77
|
};
|
|
78
|
+
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
60
80
|
export var row = css({
|
|
61
81
|
margin: "var(--ds-space-250, 20px)".concat(" 0"),
|
|
62
82
|
display: 'flex',
|
|
@@ -80,7 +100,10 @@ export var title = {
|
|
|
80
100
|
lineHeight: 1.42857142857143
|
|
81
101
|
}
|
|
82
102
|
};
|
|
103
|
+
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
83
105
|
export var codeSm = css({
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
84
107
|
backgroundColor: "var(--ds-background-neutral, ".concat(colors.N20, ")"),
|
|
85
108
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
86
109
|
width: "var(--ds-space-300, 24px)",
|
|
@@ -89,7 +112,10 @@ export var codeSm = css({
|
|
|
89
112
|
lineHeight: '24px',
|
|
90
113
|
textAlign: 'center'
|
|
91
114
|
});
|
|
115
|
+
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
92
117
|
export var codeMd = css({
|
|
118
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
93
119
|
backgroundColor: "var(--ds-background-neutral, ".concat(colors.N20, ")"),
|
|
94
120
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
95
121
|
display: 'inline-block',
|
|
@@ -98,7 +124,10 @@ export var codeMd = css({
|
|
|
98
124
|
width: '50px',
|
|
99
125
|
textAlign: 'center'
|
|
100
126
|
});
|
|
127
|
+
|
|
128
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
101
129
|
export var codeLg = css({
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
102
131
|
backgroundColor: "var(--ds-background-neutral, ".concat(colors.N20, ")"),
|
|
103
132
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
104
133
|
display: 'inline-block',
|
|
@@ -107,15 +136,21 @@ export var codeLg = css({
|
|
|
107
136
|
padding: "0 ".concat("var(--ds-space-150, 12px)"),
|
|
108
137
|
textAlign: 'center'
|
|
109
138
|
});
|
|
139
|
+
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
110
141
|
export var shortcutsArray = css({
|
|
111
142
|
display: 'flex',
|
|
112
143
|
flexDirection: 'column',
|
|
113
144
|
flexShrink: 0,
|
|
114
145
|
gap: "var(--ds-space-150, 12px)"
|
|
115
146
|
});
|
|
147
|
+
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
116
149
|
export var componentFromKeymapWrapperStyles = css({
|
|
117
150
|
flexShrink: 0
|
|
118
151
|
});
|
|
152
|
+
|
|
153
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
119
154
|
export var toolbarButton = css({
|
|
120
155
|
'&:focus': {
|
|
121
156
|
outline: "2px solid ".concat("var(--ds-border-focused, ".concat(B300, ")")),
|
package/dist/esm/ui/utils.js
CHANGED
|
@@ -12,38 +12,56 @@ var getKeyParts = function getKeyParts(keymap) {
|
|
|
12
12
|
export var shortcutNamesWithoutKeymap = ['table', 'emoji', 'mention', 'quickInsert'];
|
|
13
13
|
export var getComponentFromKeymap = function getComponentFromKeymap(keymap) {
|
|
14
14
|
var keyParts = getKeyParts(keymap);
|
|
15
|
-
return
|
|
16
|
-
css
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
15
|
+
return (
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
17
|
+
jsx("span", {
|
|
18
|
+
css: componentFromKeymapWrapperStyles
|
|
19
|
+
}, keyParts.map(function (part, index) {
|
|
20
|
+
if (part === '+') {
|
|
21
|
+
return jsx("span", {
|
|
22
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
23
|
+
}, ' + ');
|
|
24
|
+
} else if (part === 'Cmd') {
|
|
25
|
+
return (
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
27
|
+
jsx("span", {
|
|
28
|
+
css: codeSm,
|
|
29
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
30
|
+
}, "\u2318")
|
|
31
|
+
);
|
|
32
|
+
} else if (['ctrl', 'alt', 'opt', 'shift'].indexOf(part.toLowerCase()) >= 0) {
|
|
33
|
+
return (
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
35
|
+
jsx("span", {
|
|
36
|
+
css: codeMd,
|
|
37
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
38
|
+
}, part)
|
|
39
|
+
);
|
|
40
|
+
} else if (['f9', 'f10'].indexOf(part.toLowerCase()) >= 0) {
|
|
41
|
+
return (
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
43
|
+
jsx("span", {
|
|
44
|
+
css: codeLg,
|
|
45
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
46
|
+
}, part)
|
|
47
|
+
);
|
|
48
|
+
} else if (part.toLowerCase() === 'enter') {
|
|
49
|
+
return (
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
51
|
+
jsx("span", {
|
|
52
|
+
className: "enter-keymap",
|
|
53
|
+
css: codeSm,
|
|
54
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
55
|
+
}, '⏎')
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
return (
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
60
|
+
jsx("span", {
|
|
61
|
+
css: codeSm,
|
|
62
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
63
|
+
}, part.toUpperCase())
|
|
64
|
+
);
|
|
65
|
+
}))
|
|
66
|
+
);
|
|
49
67
|
};
|