@pareto-engineering/design-system 4.0.0-alpha.79 → 4.0.0-alpha.81

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.
Files changed (40) hide show
  1. package/dist/cjs/a/Label/styles.scss +1 -1
  2. package/dist/cjs/a/Tooltip/Tooltip.js +21 -5
  3. package/dist/cjs/a/Tooltip/styles.scss +44 -39
  4. package/dist/cjs/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +8 -4
  5. package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +0 -6
  6. package/dist/cjs/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +44 -17
  7. package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +79 -0
  8. package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +13 -0
  9. package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
  10. package/dist/cjs/g/ExpandableLexicalPreview/common/index.js +3 -3
  11. package/dist/es/a/Label/styles.scss +1 -1
  12. package/dist/es/a/Tooltip/Tooltip.js +21 -5
  13. package/dist/es/a/Tooltip/styles.scss +44 -39
  14. package/dist/es/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +8 -4
  15. package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +0 -6
  16. package/dist/es/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +45 -18
  17. package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +70 -0
  18. package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +2 -0
  19. package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
  20. package/dist/es/g/ExpandableLexicalPreview/common/index.js +1 -1
  21. package/package.json +4 -4
  22. package/src/stories/a/Tooltip.stories.jsx +7 -12
  23. package/src/stories/g/ExpandableLexicalPreview.stories.jsx +12 -5
  24. package/src/ui/a/Label/styles.scss +1 -1
  25. package/src/ui/a/Tooltip/Tooltip.jsx +27 -4
  26. package/src/ui/a/Tooltip/styles.scss +44 -39
  27. package/src/ui/f/fields/EditorInput/common/ColorPicker/ColorPicker.jsx +8 -3
  28. package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.jsx +0 -14
  29. package/src/ui/g/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +61 -25
  30. package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.jsx +80 -0
  31. package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +2 -0
  32. package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
  33. package/src/ui/g/ExpandableLexicalPreview/common/index.js +1 -1
  34. package/tests/__snapshots__/Storyshots.test.js.snap +58 -49
  35. package/dist/cjs/g/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +0 -111
  36. package/dist/cjs/g/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -13
  37. package/dist/es/g/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +0 -99
  38. package/dist/es/g/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -1
  39. package/src/ui/g/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.jsx +0 -119
  40. package/src/ui/g/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -1
@@ -1,99 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- /* eslint-disable import/no-extraneous-dependencies -- required here */
3
- import * as React from 'react';
4
- import { $generateHtmlFromNodes } from '@lexical/html';
5
- import PropTypes from 'prop-types';
6
- import styleNames from '@pareto-engineering/bem/exports';
7
- import { Button } from "../../../../b";
8
-
9
- // Local Definitions
10
-
11
- const baseClassName = styleNames.base;
12
- const componentClassName = 'expand-button';
13
-
14
- /**
15
- * This is the component description.
16
- */
17
- const ExpandButton = ({
18
- id,
19
- className: userClassName,
20
- style,
21
- onResolve,
22
- title,
23
- editorState
24
- // ...otherProps
25
- }) => /*#__PURE__*/React.createElement(Button, {
26
- id: id,
27
- className: [baseClassName, componentClassName, userClassName, 'ai-icon'].filter(e => e).join(' '),
28
- style: style,
29
- color: "background-far",
30
- isCompact: true,
31
- onClick: () => {
32
- editorState.getEditorState().read(() => {
33
- const rawHtml = $generateHtmlFromNodes(editorState);
34
- const preview = window.open('', '_blank', 'width=600,height=600');
35
- preview.document.write(`<html>
36
- <title>${title || 'Preview'}</title>
37
- <style>
38
- li:has(ol, ul) {
39
- list-style-type: none;
40
- }
41
-
42
- p,
43
- span,
44
- strong,
45
- em,
46
- li {
47
- &.underlined {
48
- text-decoration: underline;
49
-
50
- &.strikethrough {
51
- text-decoration: underline line-through;
52
- }
53
- }
54
-
55
- &.strikethrough {
56
- text-decoration: line-through;
57
- }
58
-
59
- &.italic {
60
- font-style: italic;
61
- }
62
- }
63
-
64
- :first-child {
65
- margin-top: 0;
66
- }
67
-
68
- &::placeholder {
69
- color: #abadb3;
70
- }
71
- </style>
72
- <body>
73
- <style></style>
74
- ${rawHtml}
75
- <button onclick="window.close()">Close Preview</button>
76
- </body></html>`);
77
- });
78
- onResolve();
79
- }
80
- }, "D");
81
- ExpandButton.propTypes = {
82
- /**
83
- * The HTML id for this element
84
- */
85
- id: PropTypes.string,
86
- /**
87
- * The HTML class names for this element
88
- */
89
- className: PropTypes.string,
90
- /**
91
- * The React-written, css properties for this element.
92
- */
93
- style: PropTypes.objectOf(PropTypes.string)
94
- };
95
- ExpandButton.defaultProps = {
96
- // color: 'paragraph',
97
- // resize: 'vertical',
98
- };
99
- export default ExpandButton;
@@ -1 +0,0 @@
1
- export { default as ExpandButton } from "./ExpandButton";
@@ -1,119 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- /* eslint-disable import/no-extraneous-dependencies -- required here */
3
- import * as React from 'react'
4
- import { $generateHtmlFromNodes } from '@lexical/html'
5
- import PropTypes from 'prop-types'
6
-
7
- import styleNames from '@pareto-engineering/bem/exports'
8
- import { Button } from 'ui/b'
9
-
10
- // Local Definitions
11
-
12
- const baseClassName = styleNames.base
13
- const componentClassName = 'expand-button'
14
-
15
- /**
16
- * This is the component description.
17
- */
18
- const ExpandButton = ({
19
- id,
20
- className: userClassName,
21
- style,
22
- onResolve,
23
- title,
24
- editorState,
25
- // ...otherProps
26
- }) => (
27
- <Button
28
- id={id}
29
- className={[
30
- baseClassName,
31
- componentClassName,
32
- userClassName,
33
- 'ai-icon',
34
- ]
35
- .filter((e) => e)
36
- .join(' ')}
37
- style={style}
38
- color="background-far"
39
- isCompact
40
- onClick={() => {
41
- editorState.getEditorState().read(() => {
42
- const rawHtml = $generateHtmlFromNodes(editorState)
43
- const preview = window.open('', '_blank', 'width=600,height=600')
44
- preview.document.write(
45
- `<html>
46
- <title>${title || 'Preview'}</title>
47
- <style>
48
- li:has(ol, ul) {
49
- list-style-type: none;
50
- }
51
-
52
- p,
53
- span,
54
- strong,
55
- em,
56
- li {
57
- &.underlined {
58
- text-decoration: underline;
59
-
60
- &.strikethrough {
61
- text-decoration: underline line-through;
62
- }
63
- }
64
-
65
- &.strikethrough {
66
- text-decoration: line-through;
67
- }
68
-
69
- &.italic {
70
- font-style: italic;
71
- }
72
- }
73
-
74
- :first-child {
75
- margin-top: 0;
76
- }
77
-
78
- &::placeholder {
79
- color: #abadb3;
80
- }
81
- </style>
82
- <body>
83
- <style></style>
84
- ${rawHtml}
85
- <button onclick="window.close()">Close Preview</button>
86
- </body></html>`,
87
- )
88
- })
89
- onResolve()
90
- }}
91
- >
92
- D
93
- </Button>
94
-
95
- )
96
-
97
- ExpandButton.propTypes = {
98
- /**
99
- * The HTML id for this element
100
- */
101
- id:PropTypes.string,
102
-
103
- /**
104
- * The HTML class names for this element
105
- */
106
- className:PropTypes.string,
107
-
108
- /**
109
- * The React-written, css properties for this element.
110
- */
111
- style:PropTypes.objectOf(PropTypes.string),
112
- }
113
-
114
- ExpandButton.defaultProps = {
115
- // color: 'paragraph',
116
- // resize: 'vertical',
117
- }
118
-
119
- export default ExpandButton
@@ -1 +0,0 @@
1
- export { default as ExpandButton } from './ExpandButton'