kopia lustrzana https://github.com/wagtail/wagtail
Update Draftail stylesheets to resolve all Sass warnings
rodzic
df6a3d8256
commit
b59539c7d6
|
@ -2,46 +2,44 @@
|
|||
@use '../../../scss/settings' as *;
|
||||
@use '../../../scss/components/forms/input-base' as *;
|
||||
|
||||
$draftail-editor-text: theme('colors.text-context');
|
||||
$draftail-placeholder-text: theme('colors.text-placeholder');
|
||||
// w-body-text-large
|
||||
$draftail-editor-font-size: theme('fontSize.19');
|
||||
$draftail-editor-line-height: theme('lineHeight.normal');
|
||||
@use '../../../../node_modules/draft-js/dist/Draft';
|
||||
@use '../../../../node_modules/draftail/src/index' as * with (
|
||||
$draftail-editor-text: theme('colors.text-context'),
|
||||
$draftail-placeholder-text: theme('colors.text-placeholder'),
|
||||
// w-body-text-large
|
||||
$draftail-editor-font-size: theme('fontSize.19'),
|
||||
$draftail-editor-line-height: theme('lineHeight.normal'),
|
||||
$draftail-editor-chrome: theme('colors.surface-menus'),
|
||||
$draftail-editor-chrome-text: theme('colors.text-button'),
|
||||
// This needs to remain a Sass value due to a limitation in Draftail.
|
||||
// $draftail-editor-chrome-active: theme('colors.surface-page'),
|
||||
$draftail-editor-chrome-active: #fff,
|
||||
$draftail-editor-chrome-accent: transparent,
|
||||
|
||||
$draftail-editor-chrome: theme('colors.surface-menus');
|
||||
$draftail-editor-chrome-text: theme('colors.text-button');
|
||||
// This needs to remain a Sass value due to a limitation in Draftail.
|
||||
// $draftail-editor-chrome-active: theme('colors.surface-page');
|
||||
$draftail-editor-chrome-active: #fff;
|
||||
$draftail-editor-chrome-accent: transparent;
|
||||
$draftail-base-spacing: 0.375rem,
|
||||
$draftail-editor-radius: 0,
|
||||
$draftail-editor-border: 0,
|
||||
$draftail-editor-padding: theme('spacing.[2.5]') theme('spacing.5'),
|
||||
$draftail-editor-background: theme('colors.surface-field'),
|
||||
$draftail-block-spacing: theme('spacing.[2.5]'),
|
||||
$draftail-toolbar-radius: theme('borderRadius.DEFAULT'),
|
||||
$draftail-editor-font-family: theme('fontFamily.sans')
|
||||
);
|
||||
|
||||
@use './Tooltip/Tooltip';
|
||||
@use './CommentableEditor/CommentableEditor';
|
||||
@use './EditorFallback/EditorFallback';
|
||||
|
||||
@use './decorators/TooltipEntity';
|
||||
|
||||
@use './blocks/MediaBlock';
|
||||
@use './blocks/ImageBlock';
|
||||
@use './blocks/EmbedBlock';
|
||||
|
||||
$draftail-base-spacing: 0.375rem;
|
||||
$draftail-editor-radius: 0;
|
||||
$draftail-editor-border: 0;
|
||||
$draftail-editor-padding: theme('spacing.[2.5]') theme('spacing.5');
|
||||
$draftail-editor-background: theme('colors.surface-field');
|
||||
$draftail-block-spacing: theme('spacing.[2.5]');
|
||||
$draftail-toolbar-radius: theme('borderRadius.DEFAULT');
|
||||
$draftail-toolbar-icon-size: 1em;
|
||||
|
||||
$draftail-trigger-additional-size: 30px;
|
||||
$draftail-block-hoverable-area-offset: 40px;
|
||||
|
||||
$draftail-editor-font-family: theme('fontFamily.sans');
|
||||
|
||||
@import '../../../../node_modules/draft-js/dist/Draft';
|
||||
@import '../../../../node_modules/draftail/src/index';
|
||||
|
||||
@import './Tooltip/Tooltip';
|
||||
@import './CommentableEditor/CommentableEditor';
|
||||
@import './EditorFallback/EditorFallback';
|
||||
|
||||
@import './decorators/TooltipEntity';
|
||||
|
||||
@import './blocks/MediaBlock';
|
||||
@import './blocks/ImageBlock';
|
||||
@import './blocks/EmbedBlock';
|
||||
|
||||
@include draftail-richtext-styles {
|
||||
h1,
|
||||
h2,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@use '../../../../../node_modules/draftail/src/index' as *;
|
||||
|
||||
$tooltip-spacing: 0.625rem;
|
||||
$tooltip-arrow-height: 15px;
|
||||
$tooltip-arrow-spacing: 25px;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@use '../../../../../node_modules/draftail/src/index' as *;
|
||||
|
||||
.EmbedBlock__link {
|
||||
display: block;
|
||||
margin-bottom: $button-spacing;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
@use 'sass:color';
|
||||
@use '../../../../../client/scss/tools' as *;
|
||||
|
||||
@mixin wagtail-label-overrides {
|
||||
float: none;
|
||||
width: initial;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@use '../../../../scss/tools' as *;
|
||||
@use '../../../../../node_modules/draftail/src/index' as *;
|
||||
|
||||
.MediaBlock {
|
||||
display: inline-block;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"axe-core": "^4.10.2",
|
||||
"downshift": "^9.0.8",
|
||||
"draft-js": "^0.10.5",
|
||||
"draftail": "^2.0.0-rc.6",
|
||||
"draftail": "^2.0.1",
|
||||
"draftjs-filters": "^3.0.1",
|
||||
"focus-trap-react": "^10.3.1",
|
||||
"immer": "^10.1.1",
|
||||
|
@ -9992,9 +9992,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/compute-scroll-into-view": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz",
|
||||
"integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz",
|
||||
"integrity": "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
|
@ -11199,13 +11199,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/draftail": {
|
||||
"version": "2.0.0-rc.6",
|
||||
"resolved": "https://registry.npmjs.org/draftail/-/draftail-2.0.0-rc.6.tgz",
|
||||
"integrity": "sha512-1Moe87oMhcR0C36H9wjgDo4n9kfv73s8+XKviaxVBopSK6HbZaHiEZu9T68wmYzOnUmAr9G59h0b+sSAGPiBlg==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/draftail/-/draftail-2.0.1.tgz",
|
||||
"integrity": "sha512-bJVcNlcpfsCNCMDSb+ivaEUWDu31Q9I5GRC6OvfkdRcW8SYBzcvrDmElrQ80r1yS3f5l8LuWZE6v/UpglbcKpQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"decorate-component-with-props": "^1.0.2",
|
||||
"downshift": "^7.0.4",
|
||||
"downshift": "^7.0.4 || ^8.5.0 || ^9.0.0",
|
||||
"draft-js-plugins-editor": "^2.1.1",
|
||||
"draftjs-conductor": "^3.0.0",
|
||||
"draftjs-filters": "^3.0.1"
|
||||
|
@ -11216,34 +11217,6 @@
|
|||
"react-dom": "^16.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/draftail/node_modules/compute-scroll-into-view": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-2.0.4.tgz",
|
||||
"integrity": "sha512-y/ZA3BGnxoM/QHHQ2Uy49CLtnWPbt4tTPpEEZiEmmiWBFKjej7nEyH8Ryz54jH0MLXflUYA3Er2zUxPSJu5R+g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/draftail/node_modules/downshift": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/downshift/-/downshift-7.6.2.tgz",
|
||||
"integrity": "sha512-iOv+E1Hyt3JDdL9yYcOgW7nZ7GQ2Uz6YbggwXvKUSleetYhU2nXD482Rz6CzvM4lvI1At34BYruKAL4swRGxaA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.8",
|
||||
"compute-scroll-into-view": "^2.0.4",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-is": "^17.0.2",
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/draftail/node_modules/react-is": {
|
||||
"version": "17.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
||||
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/draftjs-conductor": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/draftjs-conductor/-/draftjs-conductor-3.0.0.tgz",
|
||||
|
@ -29960,9 +29933,9 @@
|
|||
}
|
||||
},
|
||||
"compute-scroll-into-view": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz",
|
||||
"integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg=="
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz",
|
||||
"integrity": "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw=="
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
|
@ -30797,40 +30770,16 @@
|
|||
}
|
||||
},
|
||||
"draftail": {
|
||||
"version": "2.0.0-rc.6",
|
||||
"resolved": "https://registry.npmjs.org/draftail/-/draftail-2.0.0-rc.6.tgz",
|
||||
"integrity": "sha512-1Moe87oMhcR0C36H9wjgDo4n9kfv73s8+XKviaxVBopSK6HbZaHiEZu9T68wmYzOnUmAr9G59h0b+sSAGPiBlg==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/draftail/-/draftail-2.0.1.tgz",
|
||||
"integrity": "sha512-bJVcNlcpfsCNCMDSb+ivaEUWDu31Q9I5GRC6OvfkdRcW8SYBzcvrDmElrQ80r1yS3f5l8LuWZE6v/UpglbcKpQ==",
|
||||
"requires": {
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"decorate-component-with-props": "^1.0.2",
|
||||
"downshift": "^7.0.4",
|
||||
"downshift": "^7.0.4 || ^8.5.0 || ^9.0.0",
|
||||
"draft-js-plugins-editor": "^2.1.1",
|
||||
"draftjs-conductor": "^3.0.0",
|
||||
"draftjs-filters": "^3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"compute-scroll-into-view": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-2.0.4.tgz",
|
||||
"integrity": "sha512-y/ZA3BGnxoM/QHHQ2Uy49CLtnWPbt4tTPpEEZiEmmiWBFKjej7nEyH8Ryz54jH0MLXflUYA3Er2zUxPSJu5R+g=="
|
||||
},
|
||||
"downshift": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/downshift/-/downshift-7.6.2.tgz",
|
||||
"integrity": "sha512-iOv+E1Hyt3JDdL9yYcOgW7nZ7GQ2Uz6YbggwXvKUSleetYhU2nXD482Rz6CzvM4lvI1At34BYruKAL4swRGxaA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.14.8",
|
||||
"compute-scroll-into-view": "^2.0.4",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-is": "^17.0.2",
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"react-is": {
|
||||
"version": "17.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
||||
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"draftjs-conductor": {
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
"axe-core": "^4.10.2",
|
||||
"downshift": "^9.0.8",
|
||||
"draft-js": "^0.10.5",
|
||||
"draftail": "^2.0.0-rc.6",
|
||||
"draftail": "^2.0.1",
|
||||
"draftjs-filters": "^3.0.1",
|
||||
"focus-trap-react": "^10.3.1",
|
||||
"immer": "^10.1.1",
|
||||
|
|
Ładowanie…
Reference in New Issue