@pareto-engineering/design-system 4.0.0-alpha.77 → 4.0.0-alpha.79
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/cjs/a/AnimatedBlobs/AnimatedBlobs.js +1 -1
- package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +1 -1
- package/dist/cjs/a/AppContext/Context.js +1 -1
- package/dist/cjs/a/AppContext/ContextProvider.js +1 -1
- package/dist/cjs/a/BlurOverlay/BlurOverlay.js +1 -1
- package/dist/cjs/a/ContentTree/ContentTree.js +1 -1
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +1 -1
- package/dist/cjs/a/Conversation/Context.js +1 -1
- package/dist/cjs/a/Conversation/Conversation.js +1 -1
- package/dist/cjs/a/Conversation/common/Message/Message.js +1 -1
- package/dist/cjs/a/DatePicker/DatePicker.js +1 -1
- package/dist/cjs/a/DotInfo/DotInfo.js +1 -1
- package/dist/cjs/a/Figure/Figure.js +1 -1
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +1 -1
- package/dist/cjs/a/IconList/IconList.js +1 -1
- package/dist/cjs/a/IconList/common/Item/Item.js +1 -1
- package/dist/cjs/a/Label/Label.js +1 -1
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +1 -1
- package/dist/cjs/a/MetaCard/MetaCard.js +1 -1
- package/dist/cjs/a/People/People.js +1 -1
- package/dist/cjs/a/People/common/Person/Person.js +1 -1
- package/dist/cjs/a/People/styles.scss +1 -1
- package/dist/cjs/a/Popover/Popover.js +1 -1
- package/dist/cjs/a/ProgressBar/ProgressBar.js +1 -1
- package/dist/cjs/a/Quote/Quote.js +16 -6
- package/dist/cjs/a/Quote/styles.scss +16 -37
- package/dist/cjs/a/Removable/Removable.js +1 -1
- package/dist/cjs/a/SVG/SVG.js +1 -1
- package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +1 -1
- package/dist/cjs/a/SnapScroller/SnapScroller.js +1 -1
- package/dist/cjs/a/Spinner/Spinner.js +1 -1
- package/dist/cjs/a/TextSteps/TextSteps.js +1 -1
- package/dist/cjs/a/Timestamp/Timestamp.js +1 -1
- package/dist/cjs/a/Tip/Tip.js +1 -1
- package/dist/cjs/a/ToggleSwitch/ToggleSwitch.js +1 -1
- package/dist/cjs/a/Tooltip/Tooltip.js +71 -0
- package/dist/cjs/a/{LexicalPreview → Tooltip}/index.js +3 -3
- package/dist/cjs/a/Tooltip/styles.scss +56 -0
- package/dist/cjs/a/XMLEditor/XMLEditor.js +1 -1
- package/dist/cjs/a/index.js +8 -8
- package/dist/cjs/b/Button/Button.js +1 -1
- package/dist/cjs/b/Button/common/Group/Group.js +1 -1
- package/dist/cjs/b/Card/Card.js +1 -1
- package/dist/cjs/b/Card/common/Group/Group.js +1 -1
- package/dist/cjs/b/Card/common/Section/Section.js +1 -1
- package/dist/cjs/b/Logo/Logo.js +1 -1
- package/dist/cjs/b/Page/Context.js +1 -1
- package/dist/cjs/b/Page/Page.js +1 -1
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +5 -2
- package/dist/cjs/b/Page/common/Section/Section.js +1 -1
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +1 -1
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +1 -1
- package/dist/cjs/b/Title/Title.js +1 -1
- package/dist/cjs/b/index.js +1 -8
- package/dist/cjs/c/Modal/Modal.js +1 -1
- package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +1 -1
- package/dist/cjs/c/Shortener/Shortener.js +1 -1
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +1 -1
- package/dist/cjs/f/FormInput/FormInput.js +1 -1
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Description/Description.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +1 -1
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +37 -12
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +256 -0
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +55 -0
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +94 -0
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/styles.scss +36 -0
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +94 -0
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +55 -0
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +295 -0
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +56 -0
- package/dist/cjs/f/fields/EditorInput/common/index.js +24 -3
- package/dist/cjs/f/fields/EditorInput/styles.scss +116 -25
- package/dist/cjs/f/fields/LinkInput/LinkInput.js +1 -1
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +1 -1
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +1 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +10 -3
- package/dist/cjs/f/fields/SelectInput/common/Menu/Menu.js +1 -1
- package/dist/cjs/f/fields/SelectInput/common/Multiple/Multiple.js +1 -1
- package/dist/cjs/f/fields/SelectInput/common/Single/Single.js +14 -3
- package/dist/cjs/f/fields/SelectInput/styles.scss +1 -1
- package/dist/cjs/f/fields/TextInput/TextInput.js +1 -1
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/cjs/{b → g}/ExpandableLexicalPreview/ExpandableLexicalPreview.js +28 -43
- package/dist/cjs/{b → g}/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +7 -8
- package/dist/cjs/g/ExpandableLexicalPreview/styles.scss +34 -0
- package/dist/cjs/g/index.js +12 -0
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/test/QueryLoader/QueryLoader.js +1 -1
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +1 -1
- package/dist/cjs/utils/hooks/index.js +7 -0
- package/dist/cjs/utils/hooks/useOutsideClick.js +25 -0
- package/dist/cjs/utils/index.js +6 -0
- package/dist/es/a/People/styles.scss +1 -1
- package/dist/es/a/Quote/Quote.js +15 -5
- package/dist/es/a/Quote/styles.scss +16 -37
- package/dist/es/a/Tooltip/Tooltip.js +59 -0
- package/dist/es/a/Tooltip/index.js +2 -0
- package/dist/es/a/Tooltip/styles.scss +56 -0
- package/dist/es/a/index.js +2 -2
- package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +4 -1
- package/dist/es/b/index.js +1 -2
- package/dist/es/f/fields/EditorInput/EditorInput.js +35 -11
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +246 -0
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/index.js +2 -0
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +55 -0
- package/dist/es/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +83 -0
- package/dist/es/f/fields/EditorInput/common/ColorPicker/index.js +2 -0
- package/dist/es/f/fields/EditorInput/common/ColorPicker/styles.scss +36 -0
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +81 -0
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/index.js +2 -0
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +55 -0
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +283 -0
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/index.js +2 -0
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +56 -0
- package/dist/es/f/fields/EditorInput/common/index.js +5 -2
- package/dist/es/f/fields/EditorInput/styles.scss +116 -25
- package/dist/es/f/fields/SelectInput/SelectInput.js +9 -2
- package/dist/es/f/fields/SelectInput/common/Single/Single.js +12 -1
- package/dist/es/f/fields/SelectInput/styles.scss +1 -1
- package/dist/es/{b → g}/ExpandableLexicalPreview/ExpandableLexicalPreview.js +29 -45
- package/dist/es/{b → g}/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +18 -21
- package/dist/es/g/ExpandableLexicalPreview/styles.scss +34 -0
- package/dist/es/g/index.js +1 -0
- package/dist/es/index.js +1 -0
- package/dist/es/utils/hooks/index.js +2 -1
- package/dist/es/utils/hooks/useOutsideClick.js +19 -0
- package/dist/es/utils/index.js +1 -1
- package/package.json +14 -6
- package/src/stories/a/Quote.stories.jsx +30 -10
- package/src/stories/a/Tooltip.stories.jsx +80 -0
- package/src/stories/a/XMLEditor.stories.jsx +6 -1
- package/src/stories/f/SelectInput.stories.jsx +18 -2
- package/src/stories/{b → g}/ExpandableLexicalPreview.stories.jsx +2 -1
- package/src/ui/a/People/styles.scss +1 -1
- package/src/ui/a/Quote/Quote.jsx +16 -9
- package/src/ui/a/Quote/styles.scss +16 -37
- package/src/ui/a/Tooltip/Tooltip.jsx +83 -0
- package/src/ui/a/Tooltip/index.js +2 -0
- package/src/ui/a/Tooltip/styles.scss +56 -0
- package/src/ui/a/index.js +1 -1
- package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +6 -0
- package/src/ui/b/index.js +0 -1
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +35 -5
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.jsx +292 -0
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/index.js +2 -0
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +55 -0
- package/src/ui/f/fields/EditorInput/common/ColorPicker/ColorPicker.jsx +110 -0
- package/src/ui/f/fields/EditorInput/common/ColorPicker/index.js +2 -0
- package/src/ui/f/fields/EditorInput/common/ColorPicker/styles.scss +36 -0
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.jsx +134 -0
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/index.js +2 -0
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +55 -0
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.jsx +431 -0
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/index.js +2 -0
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +56 -0
- package/src/ui/f/fields/EditorInput/common/index.js +6 -0
- package/src/ui/f/fields/EditorInput/styles.scss +116 -25
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +10 -2
- package/src/ui/f/fields/SelectInput/common/Single/Single.jsx +13 -1
- package/src/ui/f/fields/SelectInput/styles.scss +1 -1
- package/src/ui/{b → g}/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +43 -56
- package/src/ui/{b → g}/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.jsx +32 -36
- package/src/ui/g/ExpandableLexicalPreview/styles.scss +34 -0
- package/src/ui/g/index.js +1 -0
- package/src/ui/index.js +1 -0
- package/src/ui/utils/hooks/index.js +1 -0
- package/src/ui/utils/hooks/useOutsideClick.js +23 -0
- package/src/ui/utils/index.js +1 -1
- package/tests/__snapshots__/Storyshots.test.js.snap +914 -433
- package/tests/mockResizeObserver.js +9 -0
- package/tests/test-setup.js +3 -0
- package/dist/cjs/a/LexicalPreview/LexicalPreview.js +0 -90
- package/dist/cjs/a/LexicalPreview/styles.scss +0 -46
- package/dist/cjs/b/ExpandableLexicalPreview/styles.scss +0 -84
- package/dist/cjs/f/fields/EditorInput/common/Toolbar.js +0 -257
- package/dist/es/a/LexicalPreview/LexicalPreview.js +0 -80
- package/dist/es/a/LexicalPreview/index.js +0 -2
- package/dist/es/a/LexicalPreview/styles.scss +0 -46
- package/dist/es/b/ExpandableLexicalPreview/styles.scss +0 -84
- package/dist/es/f/fields/EditorInput/common/Toolbar.js +0 -246
- package/src/stories/a/LexicalPreview.stories.jsx +0 -28
- package/src/ui/a/LexicalPreview/LexicalPreview.jsx +0 -109
- package/src/ui/a/LexicalPreview/index.js +0 -2
- package/src/ui/a/LexicalPreview/styles.scss +0 -46
- package/src/ui/b/ExpandableLexicalPreview/styles.scss +0 -84
- package/src/ui/f/fields/EditorInput/common/Toolbar.jsx +0 -356
- package/src/ui/f/fields/EditorInput/common/index.jsx +0 -3
- /package/dist/cjs/{b → g}/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -0
- /package/dist/cjs/{b → g}/ExpandableLexicalPreview/common/index.js +0 -0
- /package/dist/cjs/{b → g}/ExpandableLexicalPreview/index.js +0 -0
- /package/dist/es/{b → g}/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -0
- /package/dist/es/{b → g}/ExpandableLexicalPreview/common/index.js +0 -0
- /package/dist/es/{b → g}/ExpandableLexicalPreview/index.js +0 -0
- /package/src/ui/{b → g}/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -0
- /package/src/ui/{b → g}/ExpandableLexicalPreview/common/index.js +0 -0
- /package/src/ui/{b → g}/ExpandableLexicalPreview/index.js +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
import { Tooltip, Button } from 'ui'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title :'a/Tooltip',
|
|
7
|
+
component :Tooltip,
|
|
8
|
+
subcomponents:{
|
|
9
|
+
// Item:Tooltip.Item
|
|
10
|
+
},
|
|
11
|
+
decorators:[
|
|
12
|
+
// storyfn => <div className="">{ storyfn() }</div>,
|
|
13
|
+
],
|
|
14
|
+
argTypes:{
|
|
15
|
+
backgroundColor:{ control: 'color' },
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const ariaDescribedby = 'test-tooltip'
|
|
20
|
+
|
|
21
|
+
export const Base = {
|
|
22
|
+
args:{
|
|
23
|
+
children:(
|
|
24
|
+
<div>
|
|
25
|
+
<ul>
|
|
26
|
+
<li>This is the tooltips content</li>
|
|
27
|
+
<li>Style it the way you want!</li>
|
|
28
|
+
<li>It's a tooltip, no interactive elements please</li>
|
|
29
|
+
</ul>
|
|
30
|
+
</div>
|
|
31
|
+
),
|
|
32
|
+
id:ariaDescribedby,
|
|
33
|
+
},
|
|
34
|
+
render:(args) => (
|
|
35
|
+
<div
|
|
36
|
+
style={{
|
|
37
|
+
paddingTop :'10rem',
|
|
38
|
+
width :'50%',
|
|
39
|
+
margin :'auto',
|
|
40
|
+
display :'flex',
|
|
41
|
+
flexDirection:'column',
|
|
42
|
+
alignItems :'center',
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
<div aria-describedby={ariaDescribedby}>
|
|
46
|
+
<Button>
|
|
47
|
+
Hover on me!
|
|
48
|
+
</Button>
|
|
49
|
+
<Tooltip {...args} />
|
|
50
|
+
</div>
|
|
51
|
+
<p>
|
|
52
|
+
With some more content around
|
|
53
|
+
</p>
|
|
54
|
+
</div>
|
|
55
|
+
),
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const Left = {
|
|
59
|
+
...Base,
|
|
60
|
+
args:{
|
|
61
|
+
...Base.args,
|
|
62
|
+
position:'left',
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const Right = {
|
|
67
|
+
...Base,
|
|
68
|
+
args:{
|
|
69
|
+
...Base.args,
|
|
70
|
+
position:'right',
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const Top = {
|
|
75
|
+
...Base,
|
|
76
|
+
args:{
|
|
77
|
+
...Base.args,
|
|
78
|
+
position:'top',
|
|
79
|
+
},
|
|
80
|
+
}
|
|
@@ -14,7 +14,12 @@ export default {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const Template = (args) => (
|
|
17
|
-
<
|
|
17
|
+
<div>
|
|
18
|
+
{/* Args as JSON */}
|
|
19
|
+
<pre>{ JSON.stringify(args, null, 2) }</pre>
|
|
20
|
+
</div>
|
|
21
|
+
// TOFIX: Commented out due to issues.
|
|
22
|
+
// <XMLEditor {...args} />
|
|
18
23
|
)
|
|
19
24
|
|
|
20
25
|
export const Base = Template.bind({})
|
|
@@ -11,9 +11,9 @@ export default {
|
|
|
11
11
|
// Item:SelectInput.Item
|
|
12
12
|
},
|
|
13
13
|
decorators:[
|
|
14
|
-
(storyfn) => (
|
|
14
|
+
(storyfn, { args }) => (
|
|
15
15
|
<Formik
|
|
16
|
-
initialValues={{ workType: '' }}
|
|
16
|
+
initialValues={{ workType: args?.testOverride ? 'Training' : '' }}
|
|
17
17
|
>
|
|
18
18
|
<Form>
|
|
19
19
|
{ storyfn() }
|
|
@@ -108,3 +108,19 @@ Multiple.args = {
|
|
|
108
108
|
placeholder:'Type to search',
|
|
109
109
|
multiple :true,
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
export const WithDefault = {
|
|
113
|
+
args:{
|
|
114
|
+
...Base.args,
|
|
115
|
+
hasDefault:true,
|
|
116
|
+
options :[...Base.args.options.map((e, i) => (i === 2 ? { ...e, isDefault: true } : e))],
|
|
117
|
+
},
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export const WithDefaultNoOverride = {
|
|
121
|
+
...WithDefault,
|
|
122
|
+
args:{
|
|
123
|
+
...WithDefault.args,
|
|
124
|
+
testOverride:true,
|
|
125
|
+
},
|
|
126
|
+
}
|
|
@@ -4,7 +4,7 @@ import * as React from 'react'
|
|
|
4
4
|
import { ExpandableLexicalPreview } from 'ui'
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title :'
|
|
7
|
+
title :'g/ExpandableLexicalPreview',
|
|
8
8
|
component :ExpandableLexicalPreview,
|
|
9
9
|
subcomponents:{
|
|
10
10
|
// Item:TextareaInput.Item
|
|
@@ -25,5 +25,6 @@ const Template = (args) => (
|
|
|
25
25
|
export const Base = Template.bind({})
|
|
26
26
|
Base.args = {
|
|
27
27
|
nodes,
|
|
28
|
+
name :'taskDescription',
|
|
28
29
|
title:'Task Instructions',
|
|
29
30
|
}
|
|
@@ -13,7 +13,7 @@ $default-horizontal-margin: .5em;
|
|
|
13
13
|
$default-grid-gap: 1em;
|
|
14
14
|
$default-margin: 1.5rem;
|
|
15
15
|
$default-image-margin: var(--default-image-margin, #{$default-margin});
|
|
16
|
-
$default-color: var(--default-color, var(--
|
|
16
|
+
$default-color: var(--default-color, var(--paragraph));
|
|
17
17
|
|
|
18
18
|
.#{bem.$base}.people {
|
|
19
19
|
display: grid;
|
package/src/ui/a/Quote/Quote.jsx
CHANGED
|
@@ -39,13 +39,16 @@ const Quote = ({
|
|
|
39
39
|
style={style}
|
|
40
40
|
// {...otherProps}
|
|
41
41
|
>
|
|
42
|
-
<blockquote cite={source} className="blockquote
|
|
43
|
-
<p className="quotation
|
|
44
|
-
|
|
42
|
+
<blockquote cite={source} className="blockquote">
|
|
43
|
+
<p className="quotation h2">
|
|
44
|
+
<span className="c-x">“</span>
|
|
45
|
+
<span className="c-x">{children}</span>
|
|
46
|
+
<span className="c-x">”</span>
|
|
45
47
|
</p>
|
|
46
48
|
</blockquote>
|
|
47
49
|
<figcaption className="figcaption">
|
|
48
|
-
<
|
|
50
|
+
<span className="x-metadata c-x">-</span>
|
|
51
|
+
<cite className="x-metadata c-x">{author}</cite>
|
|
49
52
|
</figcaption>
|
|
50
53
|
</figure>
|
|
51
54
|
)
|
|
@@ -64,27 +67,31 @@ Quote.propTypes = {
|
|
|
64
67
|
/**
|
|
65
68
|
* The React-written, css properties for this element.
|
|
66
69
|
*/
|
|
67
|
-
style
|
|
70
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
71
|
+
|
|
68
72
|
/**
|
|
69
73
|
* The children jsx
|
|
70
74
|
*/
|
|
71
75
|
children:PropTypes.node.isRequired,
|
|
76
|
+
|
|
72
77
|
/**
|
|
73
78
|
* A URL for the source of the quotation
|
|
74
79
|
*/
|
|
75
|
-
source
|
|
80
|
+
source:PropTypes.string,
|
|
81
|
+
|
|
76
82
|
/**
|
|
77
83
|
* text representation of the source
|
|
78
84
|
*/
|
|
79
|
-
author
|
|
85
|
+
author:PropTypes.string,
|
|
86
|
+
|
|
80
87
|
/**
|
|
81
88
|
* The color of the quotation text
|
|
82
89
|
*/
|
|
83
|
-
color
|
|
90
|
+
color:PropTypes.string,
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
Quote.defaultProps = {
|
|
87
|
-
color:'
|
|
94
|
+
color:'highlighted',
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
export default Quote
|
|
@@ -4,53 +4,32 @@
|
|
|
4
4
|
@use "@pareto-engineering/styles/src/mixins";
|
|
5
5
|
@use "@pareto-engineering/styles/src/globals" as *;
|
|
6
6
|
|
|
7
|
+
$default-gap: 3rem;
|
|
7
8
|
|
|
8
9
|
.#{bem.$base}.quote {
|
|
9
|
-
|
|
10
|
+
border-left: 3px solid var(--x);
|
|
10
11
|
display: flex;
|
|
11
12
|
flex-direction: column;
|
|
12
13
|
|
|
13
|
-
.blockquote {
|
|
14
|
+
> .blockquote {
|
|
14
15
|
margin: 0;
|
|
15
|
-
padding: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.figcaption {
|
|
19
|
-
padding: 0;
|
|
20
|
-
}
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
display: inline;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&::before {
|
|
29
|
-
color: transparent;
|
|
30
|
-
content: "\201C";
|
|
31
|
-
font-size: 4em;
|
|
32
|
-
line-height: 0;
|
|
33
|
-
opacity: inherit;
|
|
34
|
-
position: static;
|
|
35
|
-
-webkit-text-stroke: 1px var(--x);
|
|
36
|
-
vertical-align: -.4em;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&::after {
|
|
40
|
-
color: transparent;
|
|
41
|
-
content: "\201D";
|
|
42
|
-
font-size: 4em;
|
|
43
|
-
line-height: 0;
|
|
44
|
-
margin-left: -.1em;
|
|
45
|
-
-webkit-text-stroke: 1px var(--x);
|
|
46
|
-
vertical-align: -.6em;
|
|
47
|
-
}
|
|
17
|
+
> .h2 {
|
|
18
|
+
margin-left: 0;
|
|
19
|
+
margin-top: 0;
|
|
48
20
|
}
|
|
49
21
|
|
|
50
|
-
.
|
|
51
|
-
margin:
|
|
22
|
+
> .quotation {
|
|
23
|
+
margin-left: $default-gap;
|
|
52
24
|
}
|
|
53
25
|
}
|
|
54
|
-
}
|
|
55
26
|
|
|
27
|
+
> .figcaption {
|
|
28
|
+
margin-left: $default-gap;
|
|
29
|
+
padding: 0;
|
|
56
30
|
|
|
31
|
+
> cite {
|
|
32
|
+
font-style: normal;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import PropTypes from 'prop-types'
|
|
5
|
+
|
|
6
|
+
import styleNames from '@pareto-engineering/bem/exports'
|
|
7
|
+
|
|
8
|
+
import './styles.scss'
|
|
9
|
+
|
|
10
|
+
// Local Definitions
|
|
11
|
+
|
|
12
|
+
const baseClassName = styleNames.base
|
|
13
|
+
|
|
14
|
+
const componentClassName = 'tooltip'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This is the component description.
|
|
18
|
+
*/
|
|
19
|
+
const Tooltip = ({
|
|
20
|
+
id,
|
|
21
|
+
className:userClassName,
|
|
22
|
+
style,
|
|
23
|
+
position,
|
|
24
|
+
color,
|
|
25
|
+
children,
|
|
26
|
+
// ...otherProps
|
|
27
|
+
}) => (
|
|
28
|
+
<div
|
|
29
|
+
id={id}
|
|
30
|
+
className={[
|
|
31
|
+
baseClassName,
|
|
32
|
+
componentClassName,
|
|
33
|
+
userClassName,
|
|
34
|
+
position,
|
|
35
|
+
`x-${color}`,
|
|
36
|
+
]
|
|
37
|
+
.filter((e) => e)
|
|
38
|
+
.join(' ')}
|
|
39
|
+
style={style}
|
|
40
|
+
role="tooltip"
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</div>
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
Tooltip.propTypes = {
|
|
47
|
+
/**
|
|
48
|
+
* The HTML id for this element
|
|
49
|
+
*/
|
|
50
|
+
id:PropTypes.string.isRequired,
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The HTML class names for this element
|
|
54
|
+
*/
|
|
55
|
+
className:PropTypes.string,
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The React-written, css properties for this element.
|
|
59
|
+
*/
|
|
60
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The children JSX
|
|
64
|
+
*/
|
|
65
|
+
children:PropTypes.node.isRequired,
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The position of the tooltip with respect to the trigger element
|
|
69
|
+
*/
|
|
70
|
+
position:PropTypes.oneOf(['top', 'bottom', 'left', 'right']),
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The base color of the tooltip
|
|
74
|
+
*/
|
|
75
|
+
color:PropTypes.string,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
Tooltip.defaultProps = {
|
|
79
|
+
position:'bottom',
|
|
80
|
+
color :'background-cards',
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export default Tooltip
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
$default-block-padding: calc(var(--theme-default-padding) / 2);
|
|
6
|
+
$default-inline-padding: var(--theme-default-padding);
|
|
7
|
+
$default-width: var(--tooltip-width, 20rem);
|
|
8
|
+
|
|
9
|
+
.#{bem.$base}.tooltip {
|
|
10
|
+
background: var(--x);
|
|
11
|
+
border: var(--theme-default-border-style) var(--ui-lines);
|
|
12
|
+
border-radius: calc(var(--theme-default-border-radius) / 2);
|
|
13
|
+
opacity: 0;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
padding: $default-block-padding $default-inline-padding;
|
|
16
|
+
position: absolute;
|
|
17
|
+
transform: translateX(var(--horizontal, 0)) translateY(var(--vertical, 0));
|
|
18
|
+
transition: opacity .2s ease, transform .2s ease;
|
|
19
|
+
visibility: hidden;
|
|
20
|
+
width: $default-width;
|
|
21
|
+
z-index: 10;
|
|
22
|
+
|
|
23
|
+
:has(> &) {
|
|
24
|
+
position: relative;
|
|
25
|
+
|
|
26
|
+
&:is(:hover, :focus-visible, :active) > .#{bem.$base}.tooltip {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
transition-delay: 200ms;
|
|
29
|
+
visibility: visible;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.top {
|
|
34
|
+
--horizontal: -50%;
|
|
35
|
+
bottom: calc(100% + $default-block-padding);
|
|
36
|
+
left: 50%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.right {
|
|
40
|
+
--vertical: 50%;
|
|
41
|
+
bottom: 50%;
|
|
42
|
+
left: calc(100% + $default-inline-padding);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.bottom {
|
|
46
|
+
--horizontal: -50%;
|
|
47
|
+
left: 50%;
|
|
48
|
+
top: calc(100% + $default-block-padding);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.left {
|
|
52
|
+
--vertical: 50%;
|
|
53
|
+
bottom: 50%;
|
|
54
|
+
right: calc(100% + $default-inline-padding);
|
|
55
|
+
}
|
|
56
|
+
}
|
package/src/ui/a/index.js
CHANGED
|
@@ -26,5 +26,5 @@ export { TextSteps } from './TextSteps'
|
|
|
26
26
|
export { Removable } from './Removable'
|
|
27
27
|
export { ToggleSwitch } from './ToggleSwitch'
|
|
28
28
|
export { XMLEditor } from './XMLEditor'
|
|
29
|
-
export { LexicalPreview } from './LexicalPreview'
|
|
30
29
|
export { DatePicker } from './DatePicker'
|
|
30
|
+
export { Tooltip } from './Tooltip'
|
|
@@ -172,6 +172,7 @@ const helmetMap = [
|
|
|
172
172
|
]
|
|
173
173
|
|
|
174
174
|
const PageHelmet = ({
|
|
175
|
+
jsonld,
|
|
175
176
|
...props
|
|
176
177
|
}) => {
|
|
177
178
|
// const intl = useIntl()
|
|
@@ -217,6 +218,11 @@ const PageHelmet = ({
|
|
|
217
218
|
return (
|
|
218
219
|
<Helmet key={props.title}>
|
|
219
220
|
{ HelmetContent }
|
|
221
|
+
{ jsonld && (
|
|
222
|
+
<script type="application/ld+json">
|
|
223
|
+
{`${JSON.stringify(jsonld)}`}
|
|
224
|
+
</script>
|
|
225
|
+
)}
|
|
220
226
|
</Helmet>
|
|
221
227
|
)
|
|
222
228
|
}
|
package/src/ui/b/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies -- required here */
|
|
3
3
|
import * as React from 'react'
|
|
4
|
-
import { memo } from 'react'
|
|
4
|
+
import { memo, useEffect } from 'react'
|
|
5
5
|
import { useFormikContext } from 'formik'
|
|
6
6
|
import { LexicalComposer } from '@lexical/react/LexicalComposer'
|
|
7
7
|
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
|
|
@@ -9,10 +9,16 @@ import { ContentEditable } from '@lexical/react/LexicalContentEditable'
|
|
|
9
9
|
import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin'
|
|
10
10
|
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin'
|
|
11
11
|
import { LinkPlugin } from '@lexical/react/LexicalLinkPlugin'
|
|
12
|
+
import LexicalClickableLinkPlugin from '@lexical/react/LexicalClickableLinkPlugin'
|
|
12
13
|
import { ListPlugin } from '@lexical/react/LexicalListPlugin'
|
|
14
|
+
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'
|
|
13
15
|
import { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin'
|
|
14
16
|
import { AutoLinkNode, LinkNode } from '@lexical/link'
|
|
15
17
|
import { ListItemNode, ListNode } from '@lexical/list'
|
|
18
|
+
import { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin'
|
|
19
|
+
import { HeadingNode, QuoteNode } from '@lexical/rich-text'
|
|
20
|
+
import { CodeHighlightNode, CodeNode } from '@lexical/code'
|
|
21
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
|
16
22
|
|
|
17
23
|
import PropTypes from 'prop-types'
|
|
18
24
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
@@ -20,13 +26,22 @@ import styleNames from '@pareto-engineering/bem/exports'
|
|
|
20
26
|
// Local Definitions
|
|
21
27
|
|
|
22
28
|
import { FormLabel, FormDescription } from '../../common'
|
|
23
|
-
import {
|
|
29
|
+
import { ToolbarPlugin, TreeViewPlugin, StopPropagationPlugin } from './common'
|
|
24
30
|
|
|
25
31
|
import './styles.scss'
|
|
26
32
|
|
|
27
33
|
const baseClassName = styleNames.base
|
|
28
34
|
const componentClassName = 'editor-input'
|
|
29
35
|
|
|
36
|
+
const ExposeEditorStatePlugin = ({ setEditorState }) => {
|
|
37
|
+
const [editor] = useLexicalComposerContext()
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
setEditorState(editor)
|
|
40
|
+
}, [editor])
|
|
41
|
+
|
|
42
|
+
return null
|
|
43
|
+
}
|
|
44
|
+
|
|
30
45
|
/**
|
|
31
46
|
* This is the component description.
|
|
32
47
|
*/
|
|
@@ -46,12 +61,14 @@ const EditorInput = ({
|
|
|
46
61
|
disabled,
|
|
47
62
|
showDebugger,
|
|
48
63
|
stopPropagationKeys,
|
|
64
|
+
setEditorState,
|
|
49
65
|
// ...otherProps
|
|
50
66
|
}) => {
|
|
51
67
|
const formik = useFormikContext()
|
|
52
68
|
|
|
53
69
|
const setInitialValue = () => {
|
|
54
70
|
const value = formik.values[name]
|
|
71
|
+
|
|
55
72
|
try {
|
|
56
73
|
JSON.parse(value)
|
|
57
74
|
return value
|
|
@@ -107,8 +124,17 @@ const EditorInput = ({
|
|
|
107
124
|
strikethrough:'strikethrough',
|
|
108
125
|
underline :'underlined',
|
|
109
126
|
},
|
|
127
|
+
list:{
|
|
128
|
+
listitemChecked :'lexical-list-item-checked',
|
|
129
|
+
listitemUnchecked:'lexical-list-item-unchecked',
|
|
130
|
+
},
|
|
131
|
+
code:'lexical-code',
|
|
110
132
|
},
|
|
111
133
|
nodes:[
|
|
134
|
+
HeadingNode,
|
|
135
|
+
QuoteNode,
|
|
136
|
+
CodeNode,
|
|
137
|
+
CodeHighlightNode,
|
|
112
138
|
AutoLinkNode,
|
|
113
139
|
LinkNode,
|
|
114
140
|
ListNode,
|
|
@@ -145,19 +171,23 @@ const EditorInput = ({
|
|
|
145
171
|
{label}
|
|
146
172
|
</FormLabel>
|
|
147
173
|
|
|
148
|
-
{ !disabled && <
|
|
174
|
+
{ !disabled && <ToolbarPlugin /> }
|
|
149
175
|
<RichTextPlugin
|
|
150
176
|
contentEditable={(
|
|
151
177
|
<ContentEditable
|
|
152
|
-
id={name}
|
|
153
178
|
className="content-editable"
|
|
179
|
+
id={name}
|
|
154
180
|
/>
|
|
155
181
|
)}
|
|
182
|
+
ErrorBoundary={LexicalErrorBoundary}
|
|
156
183
|
/>
|
|
184
|
+
<ListPlugin />
|
|
185
|
+
<CheckListPlugin />
|
|
157
186
|
<OnChangePlugin onChange={onChange} />
|
|
158
187
|
<LinkPlugin />
|
|
159
|
-
<
|
|
188
|
+
<LexicalClickableLinkPlugin />
|
|
160
189
|
<TabIndentationPlugin />
|
|
190
|
+
{setEditorState && <ExposeEditorStatePlugin setEditorState={setEditorState} />}
|
|
161
191
|
<HistoryPlugin />
|
|
162
192
|
{ stopPropagationKeys && (
|
|
163
193
|
<StopPropagationPlugin stopPropagationKeys={stopPropagationKeys} />
|