@pie-lib/editable-html-tip-tap 2.1.12 → 2.1.14

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.
@@ -4,7 +4,15 @@ import List from '@mui/material/List';
4
4
  import ListItem from '@mui/material/ListItem';
5
5
 
6
6
  export const AlignLeft = () => (
7
- <svg width="20" height="20" viewBox="0 0 66 66" fill="none" xmlns="http://www.w3.org/2000/svg">
7
+ <svg
8
+ width="20"
9
+ height="20"
10
+ viewBox="0 0 66 66"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden="true"
14
+ focusable="false"
15
+ >
8
16
  <path
9
17
  d="M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z"
10
18
  fill="currentColor"
@@ -13,7 +21,15 @@ export const AlignLeft = () => (
13
21
  );
14
22
 
15
23
  export const AlignRight = () => (
16
- <svg width="20" height="20" viewBox="0 0 66 66" fill="none" xmlns="http://www.w3.org/2000/svg">
24
+ <svg
25
+ width="20"
26
+ height="20"
27
+ viewBox="0 0 66 66"
28
+ fill="none"
29
+ xmlns="http://www.w3.org/2000/svg"
30
+ aria-hidden="true"
31
+ focusable="false"
32
+ >
17
33
  <path
18
34
  d="M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z"
19
35
  fill="currentColor"
@@ -22,7 +38,15 @@ export const AlignRight = () => (
22
38
  );
23
39
 
24
40
  export const AlignCenter = () => (
25
- <svg width="20" height="20" viewBox="0 0 66 66" fill="none" xmlns="http://www.w3.org/2000/svg">
41
+ <svg
42
+ width="20"
43
+ height="20"
44
+ viewBox="0 0 66 66"
45
+ fill="none"
46
+ xmlns="http://www.w3.org/2000/svg"
47
+ aria-hidden="true"
48
+ focusable="false"
49
+ >
26
50
  <path
27
51
  d="M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z"
28
52
  fill="currentColor"
@@ -31,7 +55,15 @@ export const AlignCenter = () => (
31
55
  );
32
56
 
33
57
  export const AlignJustify = () => (
34
- <svg width="20" height="20" viewBox="0 0 66 66" fill="none" xmlns="http://www.w3.org/2000/svg">
58
+ <svg
59
+ width="20"
60
+ height="20"
61
+ viewBox="0 0 66 66"
62
+ fill="none"
63
+ xmlns="http://www.w3.org/2000/svg"
64
+ aria-hidden="true"
65
+ focusable="false"
66
+ >
35
67
  <path
36
68
  d="M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z"
37
69
  fill="currentColor"
@@ -79,7 +111,9 @@ export default ({ editor, onChange }) => {
79
111
  <div>
80
112
  <div style={{ display: 'flex', alignItems: 'center' }} onClick={onMouseDown}>
81
113
  {icon}
82
- <span style={{ marginLeft: '5px', fontSize: '8px' }}>&#9660;</span>
114
+ <span style={{ marginLeft: '5px', fontSize: '8px' }} aria-hidden="true">
115
+ &#9660;
116
+ </span>
83
117
  </div>
84
118
  <Collapse in={open} timeout="auto" unmountOnExit style={{ position: 'absolute' }}>
85
119
  <List
@@ -3,10 +3,16 @@ import PropTypes from 'prop-types';
3
3
  import { NodeViewWrapper } from '@tiptap/react';
4
4
  import { mq } from '@pie-lib/math-input';
5
5
  import { styled } from '@mui/material/styles';
6
+ import { color } from '@pie-lib/render-ui';
6
7
 
7
8
  const StyledSpanContainer = styled('span')(() => ({
8
9
  display: 'inline-flex',
9
- border: '1px solid #C0C3CF',
10
+ /*
11
+ * #C0C3CF is `--pie-blue-grey-300`'s default value, but that token is a fill: it
12
+ * measures 1.00:1 against black-on-rose's own background. The box outline is what
13
+ * marks the response slot in running text, so it takes the stroke token instead.
14
+ */
15
+ border: `1px solid ${color.border()}`,
10
16
  margin: '1px 5px',
11
17
  cursor: 'pointer',
12
18
  alignItems: 'center',
@@ -16,11 +22,12 @@ const StyledSpanContainer = styled('span')(() => ({
16
22
  height: 'fit-content',
17
23
  }));
18
24
 
19
- const StyledResponseBox = styled('div')(({ theme }) => ({
20
- background: theme.palette.grey['A100'],
21
- color: theme.palette.grey['A700'],
25
+ const StyledResponseBox = styled('div')(() => ({
26
+ // Fill and ink move together so the label stays legible on whatever the fill becomes.
27
+ background: color.backgroundDark(),
28
+ color: color.text(),
22
29
  display: 'inline-flex',
23
- borderRight: '2px solid #C0C3CF',
30
+ borderRight: `2px solid ${color.border()}`,
24
31
  boxSizing: 'border-box',
25
32
  overflow: 'hidden',
26
33
  fontSize: '12px',