@pareto-engineering/design-system 4.0.0-alpha.59 → 4.0.0-alpha.61
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 +6 -7
- package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +9 -9
- package/dist/cjs/a/AppContext/Context.js +3 -4
- package/dist/cjs/a/AppContext/ContextProvider.js +6 -6
- package/dist/cjs/a/AppContext/useTheme.js +2 -3
- package/dist/cjs/a/BlurOverlay/BlurOverlay.js +6 -7
- package/dist/cjs/a/ContentTree/ContentTree.js +8 -7
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +8 -8
- package/dist/cjs/a/ContentTree/common/useContentTree.js +1 -2
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +1 -2
- package/dist/cjs/a/Conversation/Context.js +3 -4
- package/dist/cjs/a/Conversation/Conversation.js +8 -7
- package/dist/cjs/a/Conversation/common/Message/Message.js +3 -4
- package/dist/cjs/a/DotInfo/DotInfo.js +6 -7
- package/dist/cjs/a/Figure/Figure.js +6 -7
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +5 -8
- package/dist/cjs/a/IconList/IconList.js +5 -8
- package/dist/cjs/a/IconList/common/Item/Item.js +3 -4
- package/dist/cjs/a/Label/Label.js +5 -8
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +6 -7
- package/dist/cjs/a/MetaCard/MetaCard.js +6 -7
- package/dist/cjs/a/People/People.js +8 -7
- package/dist/cjs/a/People/common/Person/Person.js +3 -4
- package/dist/cjs/a/Popover/Popover.js +11 -9
- package/dist/cjs/a/ProgressBar/ProgressBar.js +6 -7
- package/dist/cjs/a/Quote/Quote.js +6 -7
- package/dist/cjs/a/Removable/Removable.js +6 -7
- package/dist/cjs/a/SVG/SVG.js +8 -10
- package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +3 -4
- package/dist/cjs/a/SnapScroller/SnapScroller.js +12 -12
- package/dist/cjs/a/Spinner/Spinner.js +6 -7
- package/dist/cjs/a/TextSteps/TextSteps.js +4 -7
- package/dist/cjs/a/Timestamp/Timestamp.js +12 -12
- package/dist/cjs/a/Tip/Tip.js +6 -7
- package/dist/cjs/a/ToggleSwitch/ToggleSwitch.js +10 -11
- package/dist/cjs/b/Button/Button.js +4 -8
- package/dist/cjs/b/Button/common/Group/Group.js +5 -8
- package/dist/cjs/b/Card/Card.js +6 -7
- package/dist/cjs/b/Card/common/Group/Group.js +5 -8
- package/dist/cjs/b/Card/common/Section/Section.js +3 -4
- package/dist/cjs/b/Logo/Logo.js +9 -9
- package/dist/cjs/b/Page/Context.js +3 -4
- package/dist/cjs/b/Page/Page.js +8 -11
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +6 -6
- package/dist/cjs/b/Page/common/Section/Section.js +3 -4
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +5 -8
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +10 -10
- package/dist/cjs/b/Title/Title.js +4 -10
- package/dist/cjs/c/ContentSlides/ContentSlides.js +10 -10
- package/dist/cjs/c/ContentSlides/Context.js +3 -4
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +3 -4
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +3 -4
- package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +3 -4
- package/dist/cjs/c/ContentSlides/common/Slide/Slide.js +3 -4
- package/dist/cjs/c/Modal/Modal.js +6 -7
- package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +3 -4
- package/dist/cjs/c/Shortener/Shortener.js +11 -9
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +6 -7
- package/dist/cjs/f/FormInput/FormInput.js +7 -9
- package/dist/cjs/f/common/Debugger/Debugger.js +10 -10
- package/dist/cjs/f/common/Description/Description.js +6 -7
- package/dist/cjs/f/common/InputWrapper/InputWrapper.js +6 -7
- package/dist/cjs/f/common/Label/Label.js +6 -7
- package/dist/cjs/f/common/index.js +19 -1
- package/dist/cjs/f/common/utils/index.js +12 -0
- package/dist/cjs/f/common/utils/lookUpInputValueFromFetchedOptions.js +29 -0
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +5 -8
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +7 -9
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +3 -4
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +11 -8
- package/dist/cjs/f/fields/EditorInput/common/Toolbar.js +17 -17
- package/dist/cjs/f/fields/EditorInput/common/TreeViewPlugin.js +1 -2
- package/dist/cjs/f/fields/LinkInput/LinkInput.js +7 -9
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +8 -8
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +27 -14
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +29 -11
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +3 -4
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +30 -12
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +8 -8
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +11 -9
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +3 -4
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +7 -9
- package/dist/cjs/f/fields/TextInput/TextInput.js +7 -9
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +7 -9
- package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +3 -4
- package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +6 -6
- package/dist/cjs/test/QueryLoader/QueryLoader.js +7 -7
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +3 -4
- package/dist/cjs/utils/hooks/useDynamicPosition.js +1 -2
- package/dist/cjs/utils/hooks/useWindowSize.js +1 -2
- package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +18 -23
- package/dist/es/a/AnimatedGradient/AnimatedGradient.js +2 -4
- package/dist/es/a/BlurOverlay/BlurOverlay.js +6 -11
- package/dist/es/a/ContentTree/ContentTree.js +1 -4
- package/dist/es/a/Conversation/Conversation.js +11 -16
- package/dist/es/a/DotInfo/DotInfo.js +9 -14
- package/dist/es/a/Figure/Figure.js +10 -15
- package/dist/es/a/HamburgerButton/HamburgerButton.js +13 -18
- package/dist/es/a/IconList/IconList.js +10 -15
- package/dist/es/a/Label/Label.js +6 -11
- package/dist/es/a/LoadingCircle/LoadingCircle.js +32 -37
- package/dist/es/a/MetaCard/MetaCard.js +6 -11
- package/dist/es/a/People/People.js +11 -16
- package/dist/es/a/Popover/Popover.js +2 -4
- package/dist/es/a/ProgressBar/ProgressBar.js +12 -17
- package/dist/es/a/Quote/Quote.js +14 -19
- package/dist/es/a/Removable/Removable.js +13 -18
- package/dist/es/a/SVG/SVG.js +2 -4
- package/dist/es/a/SnapScroller/SnapScroller.js +2 -4
- package/dist/es/a/Spinner/Spinner.js +9 -14
- package/dist/es/a/TextSteps/TextSteps.js +12 -17
- package/dist/es/a/Timestamp/Timestamp.js +3 -5
- package/dist/es/a/Tip/Tip.js +9 -14
- package/dist/es/a/ToggleSwitch/ToggleSwitch.js +20 -25
- package/dist/es/b/Button/Button.js +0 -4
- package/dist/es/b/Button/common/Group/Group.js +6 -11
- package/dist/es/b/Card/Card.js +11 -16
- package/dist/es/b/Card/common/Group/Group.js +1 -4
- package/dist/es/b/Logo/Logo.js +2 -4
- package/dist/es/b/Page/Page.js +2 -6
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +1 -4
- package/dist/es/b/ThemeSelector/ThemeSelector.js +3 -5
- package/dist/es/b/Title/Title.js +11 -20
- package/dist/es/c/ContentSlides/ContentSlides.js +1 -3
- package/dist/es/c/Modal/Modal.js +13 -18
- package/dist/es/c/Shortener/Shortener.js +2 -4
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +1 -4
- package/dist/es/f/FormInput/FormInput.js +2 -4
- package/dist/es/f/common/Debugger/Debugger.js +2 -4
- package/dist/es/f/common/Description/Description.js +1 -4
- package/dist/es/f/common/InputWrapper/InputWrapper.js +10 -15
- package/dist/es/f/common/Label/Label.js +12 -17
- package/dist/es/f/common/index.js +2 -1
- package/dist/es/f/common/utils/index.js +1 -0
- package/dist/es/f/common/utils/lookUpInputValueFromFetchedOptions.js +20 -0
- package/dist/es/f/fields/Checkbox/Checkbox.js +1 -4
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +30 -34
- package/dist/es/f/fields/EditorInput/EditorInput.js +2 -4
- package/dist/es/f/fields/LinkInput/LinkInput.js +2 -4
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +17 -8
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +22 -4
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +22 -4
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +2 -4
- package/dist/es/f/fields/SelectInput/SelectInput.js +2 -4
- package/dist/es/f/fields/TextInput/TextInput.js +2 -4
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +2 -4
- package/package.json +4 -3
- package/src/stories/f/QueryCombobox.stories.jsx +18 -0
- package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +25 -31
- package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +2 -5
- package/src/ui/a/BlurOverlay/BlurOverlay.jsx +18 -24
- package/src/ui/a/ContentTree/ContentTree.jsx +2 -6
- package/src/ui/a/Conversation/Conversation.jsx +26 -32
- package/src/ui/a/DotInfo/DotInfo.jsx +23 -29
- package/src/ui/a/Figure/Figure.jsx +21 -27
- package/src/ui/a/HamburgerButton/HamburgerButton.jsx +27 -33
- package/src/ui/a/IconList/IconList.jsx +22 -28
- package/src/ui/a/Label/Label.jsx +21 -27
- package/src/ui/a/LoadingCircle/LoadingCircle.jsx +43 -49
- package/src/ui/a/MetaCard/MetaCard.jsx +19 -25
- package/src/ui/a/People/People.jsx +25 -31
- package/src/ui/a/Popover/Popover.jsx +3 -5
- package/src/ui/a/ProgressBar/ProgressBar.jsx +25 -31
- package/src/ui/a/Quote/Quote.jsx +26 -32
- package/src/ui/a/Removable/Removable.jsx +22 -29
- package/src/ui/a/SVG/SVG.jsx +3 -5
- package/src/ui/a/SnapScroller/SnapScroller.jsx +2 -4
- package/src/ui/a/Spinner/Spinner.jsx +19 -25
- package/src/ui/a/TextSteps/TextSteps.jsx +27 -34
- package/src/ui/a/Timestamp/Timestamp.jsx +5 -7
- package/src/ui/a/Tip/Tip.jsx +22 -28
- package/src/ui/a/ToggleSwitch/ToggleSwitch.jsx +33 -35
- package/src/ui/b/Button/Button.jsx +0 -5
- package/src/ui/b/Button/common/Group/Group.jsx +18 -24
- package/src/ui/b/Card/Card.jsx +25 -31
- package/src/ui/b/Card/common/Group/Group.jsx +2 -5
- package/src/ui/b/Logo/Logo.jsx +3 -5
- package/src/ui/b/Page/Page.jsx +2 -7
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +2 -7
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +4 -6
- package/src/ui/b/Title/Title.jsx +36 -46
- package/src/ui/c/ContentSlides/ContentSlides.jsx +2 -4
- package/src/ui/c/Modal/Modal.jsx +24 -30
- package/src/ui/c/Shortener/Shortener.jsx +3 -5
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +2 -6
- package/src/ui/f/FormInput/FormInput.jsx +3 -5
- package/src/ui/f/common/Debugger/Debugger.jsx +3 -5
- package/src/ui/f/common/Description/Description.jsx +2 -6
- package/src/ui/f/common/InputWrapper/InputWrapper.jsx +21 -27
- package/src/ui/f/common/Label/Label.jsx +25 -31
- package/src/ui/f/common/index.js +1 -0
- package/src/ui/f/common/utils/index.js +1 -0
- package/src/ui/f/common/utils/lookUpInputValueFromFetchedOptions.js +23 -0
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +2 -6
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +48 -52
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +2 -5
- package/src/ui/f/fields/LinkInput/LinkInput.jsx +2 -5
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +21 -11
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +18 -2
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +18 -1
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +3 -5
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +3 -5
- package/src/ui/f/fields/TextInput/TextInput.jsx +3 -5
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +3 -5
- package/tests/__snapshots__/Storyshots.test.js.snap +269 -20
- package/dist/cjs/b/Title/styles.scss +0 -16
- package/dist/es/b/Title/styles.scss +0 -16
- package/src/ui/b/Title/styles.scss +0 -16
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
|
|
3
|
-
import { useInsertionEffect } from 'react'
|
|
4
|
-
|
|
5
3
|
import PropTypes from 'prop-types'
|
|
6
4
|
|
|
7
5
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
6
|
+
import './styles.scss'
|
|
8
7
|
|
|
9
8
|
// Local Definitions
|
|
10
9
|
|
|
@@ -21,38 +20,32 @@ const Steps = ({
|
|
|
21
20
|
style,
|
|
22
21
|
items,
|
|
23
22
|
title,
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
<div className=" description"><p>{item}</p></div>
|
|
51
|
-
</>
|
|
52
|
-
))}
|
|
53
|
-
</div>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
23
|
+
}) => (
|
|
24
|
+
<div
|
|
25
|
+
id={id}
|
|
26
|
+
className={[
|
|
27
|
+
baseClassName,
|
|
28
|
+
componentClassName,
|
|
29
|
+
userClassName,
|
|
30
|
+
'grid',
|
|
31
|
+
]
|
|
32
|
+
.filter((e) => e)
|
|
33
|
+
.join(' ')}
|
|
34
|
+
style={style}
|
|
35
|
+
>
|
|
36
|
+
{title && (
|
|
37
|
+
<p className="title h4">
|
|
38
|
+
{title}
|
|
39
|
+
</p>
|
|
40
|
+
)}
|
|
41
|
+
{items.map((item, i) => (
|
|
42
|
+
<>
|
|
43
|
+
<div className=" number h3 start-1 span-2 md-start-1 md-span-2"><p>{i + 1}</p></div>
|
|
44
|
+
<div className=" description"><p>{item}</p></div>
|
|
45
|
+
</>
|
|
46
|
+
))}
|
|
47
|
+
</div>
|
|
48
|
+
)
|
|
56
49
|
|
|
57
50
|
Steps.propTypes = {
|
|
58
51
|
/**
|
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
useMemo, useCallback, useState,
|
|
6
6
|
} from 'react'
|
|
7
7
|
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
|
|
10
|
-
import styleNames from '@pareto-engineering/bem/exports'
|
|
11
|
-
|
|
12
10
|
import {
|
|
13
11
|
format, differenceInDays, formatDistance, formatRelative,
|
|
14
12
|
} from 'date-fns'
|
|
15
13
|
|
|
14
|
+
import styleNames from '@pareto-engineering/bem/exports'
|
|
15
|
+
|
|
16
|
+
import './styles.scss'
|
|
17
|
+
|
|
16
18
|
// Local Definitions
|
|
17
19
|
|
|
18
20
|
const baseClassName = styleNames.base
|
|
@@ -36,10 +38,6 @@ const Timestamp = ({
|
|
|
36
38
|
// ...otherProps
|
|
37
39
|
as:Element,
|
|
38
40
|
}) => {
|
|
39
|
-
useInsertionEffect(() => {
|
|
40
|
-
import('./styles.scss')
|
|
41
|
-
}, [])
|
|
42
|
-
|
|
43
41
|
const [currentDisplay, setCurrentDisplay] = useState(enabledFormats[0])
|
|
44
42
|
|
|
45
43
|
const formatMap = useMemo(() => ({
|
package/src/ui/a/Tip/Tip.jsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useInsertionEffect } from 'react'
|
|
5
|
-
|
|
6
4
|
import PropTypes from 'prop-types'
|
|
7
5
|
|
|
8
6
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
7
|
|
|
8
|
+
import './styles.scss'
|
|
9
|
+
|
|
10
10
|
// Local Definitions
|
|
11
11
|
|
|
12
12
|
const baseClassName = styleNames.base
|
|
@@ -26,32 +26,26 @@ const Tip = ({
|
|
|
26
26
|
color,
|
|
27
27
|
backgroundColor,
|
|
28
28
|
// ...otherProps
|
|
29
|
-
}) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{icon}
|
|
50
|
-
</span>
|
|
51
|
-
{children}
|
|
52
|
-
</Wrapper>
|
|
53
|
-
)
|
|
54
|
-
}
|
|
29
|
+
}) => (
|
|
30
|
+
<Wrapper
|
|
31
|
+
id={id}
|
|
32
|
+
className={[
|
|
33
|
+
baseClassName,
|
|
34
|
+
componentClassName,
|
|
35
|
+
userClassName,
|
|
36
|
+
`x-${backgroundColor}`,
|
|
37
|
+
]
|
|
38
|
+
.filter((e) => e)
|
|
39
|
+
.join(' ')}
|
|
40
|
+
style={style}
|
|
41
|
+
// {...otherProps}
|
|
42
|
+
>
|
|
43
|
+
<span className={`x-${color} c-x icon`}>
|
|
44
|
+
{icon}
|
|
45
|
+
</span>
|
|
46
|
+
{children}
|
|
47
|
+
</Wrapper>
|
|
48
|
+
)
|
|
55
49
|
|
|
56
50
|
Tip.propTypes = {
|
|
57
51
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useInsertionEffect } from 'react'
|
|
5
|
-
|
|
6
4
|
import PropTypes from 'prop-types'
|
|
7
5
|
|
|
8
6
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
7
|
|
|
8
|
+
import './styles.scss'
|
|
9
|
+
|
|
10
10
|
// Local Definitions
|
|
11
11
|
|
|
12
12
|
const baseClassName = styleNames.base
|
|
@@ -20,41 +20,39 @@ const ToggleSwitch = ({
|
|
|
20
20
|
id,
|
|
21
21
|
className:userClassName,
|
|
22
22
|
style,
|
|
23
|
-
|
|
23
|
+
handleOnChange,
|
|
24
24
|
checked,
|
|
25
25
|
size,
|
|
26
26
|
// ...otherProps
|
|
27
|
-
}) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
)
|
|
57
|
-
}
|
|
27
|
+
}) => (
|
|
28
|
+
<button
|
|
29
|
+
id={id}
|
|
30
|
+
className={[
|
|
31
|
+
|
|
32
|
+
baseClassName,
|
|
33
|
+
|
|
34
|
+
componentClassName,
|
|
35
|
+
userClassName,
|
|
36
|
+
]
|
|
37
|
+
.filter((e) => e)
|
|
38
|
+
.join(' ')}
|
|
39
|
+
style={{
|
|
40
|
+
'--size':size,
|
|
41
|
+
...style,
|
|
42
|
+
}}
|
|
43
|
+
type="button"
|
|
44
|
+
// {...otherProps}
|
|
45
|
+
>
|
|
46
|
+
<input
|
|
47
|
+
type="checkbox"
|
|
48
|
+
id="switch"
|
|
49
|
+
checked={checked}
|
|
50
|
+
onChange={handleOnChange}
|
|
51
|
+
/>
|
|
52
|
+
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
|
|
53
|
+
<label htmlFor="switch" />
|
|
54
|
+
</button>
|
|
55
|
+
)
|
|
58
56
|
|
|
59
57
|
ToggleSwitch.propTypes = {
|
|
60
58
|
/**
|
|
@@ -75,7 +73,7 @@ ToggleSwitch.propTypes = {
|
|
|
75
73
|
/**
|
|
76
74
|
* The onClick handler for this element
|
|
77
75
|
*/
|
|
78
|
-
|
|
76
|
+
handleOnChange:PropTypes.func,
|
|
79
77
|
|
|
80
78
|
/**
|
|
81
79
|
* The checked state of this element
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 0.2.4 */
|
|
2
2
|
import * as React from 'react'
|
|
3
|
-
import { useInsertionEffect } from 'react'
|
|
4
3
|
import PropTypes from 'prop-types'
|
|
5
4
|
|
|
6
5
|
// Package-level Imports
|
|
@@ -29,10 +28,6 @@ const Button = ({
|
|
|
29
28
|
arrowDirection,
|
|
30
29
|
...otherProps
|
|
31
30
|
}) => {
|
|
32
|
-
useInsertionEffect(() => {
|
|
33
|
-
import('./styles.scss')
|
|
34
|
-
}, [])
|
|
35
|
-
|
|
36
31
|
const buttonText = isSimple ? <span className={styleNames.modifierUnderlined}>{children}</span>
|
|
37
32
|
: children
|
|
38
33
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useInsertionEffect } from 'react'
|
|
5
|
-
|
|
6
4
|
import PropTypes from 'prop-types'
|
|
7
5
|
|
|
8
6
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
7
|
|
|
8
|
+
import './styles.scss'
|
|
9
|
+
|
|
10
10
|
// Local Definitions
|
|
11
11
|
|
|
12
12
|
const baseClassName = styleNames.base
|
|
@@ -19,28 +19,22 @@ const Group = ({
|
|
|
19
19
|
style,
|
|
20
20
|
children,
|
|
21
21
|
...otherProps
|
|
22
|
-
}) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{...otherProps}
|
|
39
|
-
>
|
|
40
|
-
{children}
|
|
41
|
-
</div>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
22
|
+
}) => (
|
|
23
|
+
<div
|
|
24
|
+
id={id}
|
|
25
|
+
className={[
|
|
26
|
+
baseClassName,
|
|
27
|
+
componentClassName,
|
|
28
|
+
userClassName,
|
|
29
|
+
]
|
|
30
|
+
.filter((e) => e)
|
|
31
|
+
.join(' ')}
|
|
32
|
+
style={style}
|
|
33
|
+
{...otherProps}
|
|
34
|
+
>
|
|
35
|
+
{children}
|
|
36
|
+
</div>
|
|
37
|
+
)
|
|
44
38
|
|
|
45
39
|
Group.propTypes = {
|
|
46
40
|
/**
|
package/src/ui/b/Card/Card.jsx
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useInsertionEffect } from 'react'
|
|
5
|
-
|
|
6
4
|
import PropTypes from 'prop-types'
|
|
7
5
|
|
|
8
6
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
@@ -11,6 +9,8 @@ import { ProgressBar } from 'ui'
|
|
|
11
9
|
|
|
12
10
|
import { Group, Section } from './common'
|
|
13
11
|
|
|
12
|
+
import './styles.scss'
|
|
13
|
+
|
|
14
14
|
// Local Definitions
|
|
15
15
|
|
|
16
16
|
const baseClassName = styleNames.base
|
|
@@ -27,35 +27,29 @@ const Card = ({
|
|
|
27
27
|
children,
|
|
28
28
|
progress,
|
|
29
29
|
progressBarColor,
|
|
30
|
-
}) =>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/>
|
|
54
|
-
)}
|
|
55
|
-
{children}
|
|
56
|
-
</div>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
30
|
+
}) => (
|
|
31
|
+
<div
|
|
32
|
+
id={id}
|
|
33
|
+
className={[
|
|
34
|
+
baseClassName,
|
|
35
|
+
componentClassName,
|
|
36
|
+
userClassName,
|
|
37
|
+
]
|
|
38
|
+
.filter((e) => e)
|
|
39
|
+
.join(' ')}
|
|
40
|
+
style={style}
|
|
41
|
+
>
|
|
42
|
+
{progress && (
|
|
43
|
+
<ProgressBar
|
|
44
|
+
attached
|
|
45
|
+
color={progressBarColor}
|
|
46
|
+
progress={progress}
|
|
47
|
+
height=".5em"
|
|
48
|
+
/>
|
|
49
|
+
)}
|
|
50
|
+
{children}
|
|
51
|
+
</div>
|
|
52
|
+
)
|
|
59
53
|
|
|
60
54
|
Card.propTypes = {
|
|
61
55
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useInsertionEffect } from 'react'
|
|
5
|
-
|
|
6
4
|
import PropTypes from 'prop-types'
|
|
7
5
|
|
|
8
6
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
7
|
|
|
10
8
|
import { SnapScroller } from 'ui'
|
|
11
9
|
|
|
10
|
+
import './styles.scss'
|
|
11
|
+
|
|
12
12
|
// Local Definitions
|
|
13
13
|
|
|
14
14
|
const baseClassName = styleNames.base
|
|
@@ -24,9 +24,6 @@ const Group = ({
|
|
|
24
24
|
desktopType,
|
|
25
25
|
...otherProps
|
|
26
26
|
}) => {
|
|
27
|
-
useInsertionEffect(() => {
|
|
28
|
-
import('./styles.scss')
|
|
29
|
-
}, [])
|
|
30
27
|
const Wrapper = type === 'snap-scroller' ? SnapScroller : 'div'
|
|
31
28
|
const wrapperProps = (type === 'snap-scroller' && desktopType !== 'snap-scroller') ? { noScrollOnDesktop: true } : {}
|
|
32
29
|
|
package/src/ui/b/Logo/Logo.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useMemo
|
|
4
|
+
import { useMemo } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -9,6 +9,8 @@ import styleNames from '@pareto-engineering/bem/exports'
|
|
|
9
9
|
|
|
10
10
|
import { SVG } from 'ui/a'
|
|
11
11
|
|
|
12
|
+
import './styles.scss'
|
|
13
|
+
|
|
12
14
|
// Local Definitions
|
|
13
15
|
|
|
14
16
|
const baseClassName = styleNames.base
|
|
@@ -64,10 +66,6 @@ const Logo = ({
|
|
|
64
66
|
square,
|
|
65
67
|
// ...otherProps
|
|
66
68
|
}) => {
|
|
67
|
-
useInsertionEffect(() => {
|
|
68
|
-
import('./styles.scss')
|
|
69
|
-
}, [])
|
|
70
|
-
|
|
71
69
|
const contentMap = square ? contentMapSquare : contentMapWithName
|
|
72
70
|
const svgConfig = useMemo(() => contentMap[variant], [variant])
|
|
73
71
|
|
package/src/ui/b/Page/Page.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.0 */
|
|
2
2
|
import * as React from 'react'
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect } from 'react'
|
|
4
4
|
import PropTypes from 'prop-types'
|
|
5
5
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
6
6
|
import { useApp } from 'ui/a'
|
|
@@ -8,8 +8,7 @@ import { useApp } from 'ui/a'
|
|
|
8
8
|
// Imports from the component folder
|
|
9
9
|
import { PageHelmet, Section } from './common'
|
|
10
10
|
import Context from './Context'
|
|
11
|
-
|
|
12
|
-
// import('./styles.scss')
|
|
11
|
+
import './styles.scss'
|
|
13
12
|
|
|
14
13
|
// Local Definitions
|
|
15
14
|
const baseClassName = styleNames.base
|
|
@@ -30,10 +29,6 @@ const Page = ({
|
|
|
30
29
|
Background,
|
|
31
30
|
...otherProps
|
|
32
31
|
}) => {
|
|
33
|
-
useInsertionEffect(() => {
|
|
34
|
-
import('./styles.scss')
|
|
35
|
-
}, [])
|
|
36
|
-
|
|
37
32
|
const { userTheme } = useApp()
|
|
38
33
|
|
|
39
34
|
useEffect(() => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useInsertionEffect } from 'react'
|
|
5
|
-
|
|
6
4
|
import PropTypes from 'prop-types'
|
|
7
5
|
|
|
8
6
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
7
|
|
|
10
8
|
import { useApp } from 'ui/a'
|
|
11
9
|
|
|
10
|
+
import './styles.scss'
|
|
11
|
+
|
|
12
12
|
// Local Definitions
|
|
13
13
|
|
|
14
14
|
const baseClassName = styleNames.base
|
|
@@ -55,11 +55,6 @@ const SocialMediaButton = ({
|
|
|
55
55
|
...otherProps
|
|
56
56
|
}) => {
|
|
57
57
|
const applicationContext = useApp()
|
|
58
|
-
|
|
59
|
-
useInsertionEffect(() => {
|
|
60
|
-
import('./styles.scss')
|
|
61
|
-
}, [])
|
|
62
|
-
|
|
63
58
|
const content = type && defaultsMap[type]
|
|
64
59
|
const href = link || applicationContext?.SOCIAL?.[content?.link]
|
|
65
60
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
|
-
import {
|
|
3
|
+
import { useCallback } from 'react'
|
|
4
4
|
import PropTypes from 'prop-types'
|
|
5
5
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
6
6
|
|
|
7
7
|
import { useApp, ToggleSwitch } from 'ui/a'
|
|
8
8
|
|
|
9
|
+
import './styles.scss'
|
|
10
|
+
|
|
9
11
|
// Local Definitions
|
|
10
12
|
|
|
11
13
|
const baseClassName = styleNames.base
|
|
@@ -26,10 +28,6 @@ const ThemeSelector = ({
|
|
|
26
28
|
setPreferredTheme,
|
|
27
29
|
} = useApp()
|
|
28
30
|
|
|
29
|
-
useInsertionEffect(() => {
|
|
30
|
-
import('./styles.scss')
|
|
31
|
-
}, [])
|
|
32
|
-
|
|
33
31
|
const loopThemes = useCallback(() => {
|
|
34
32
|
const current = themes.indexOf(userTheme)
|
|
35
33
|
setPreferredTheme(themes[(current + 1) % themes.length])
|
|
@@ -53,7 +51,7 @@ const ThemeSelector = ({
|
|
|
53
51
|
{' '}
|
|
54
52
|
Theme
|
|
55
53
|
</span>
|
|
56
|
-
<ToggleSwitch checked={userTheme === 'dark'}
|
|
54
|
+
<ToggleSwitch checked={userTheme === 'dark'} handleOnChange={loopThemes} />
|
|
57
55
|
</div>
|
|
58
56
|
)
|
|
59
57
|
}
|
package/src/ui/b/Title/Title.jsx
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 0.3.1 */
|
|
2
2
|
import * as React from 'react'
|
|
3
|
-
import { useInsertionEffect } from 'react'
|
|
4
3
|
import PropTypes from 'prop-types'
|
|
5
4
|
|
|
6
5
|
// Package-level Imports
|
|
7
6
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
8
7
|
|
|
9
|
-
// Component-level imports
|
|
10
|
-
// import('./styles.scss')
|
|
11
|
-
|
|
12
8
|
// Helper Definition
|
|
13
9
|
const baseClassName = styleNames.base
|
|
14
10
|
const componentClassName = 'title'
|
|
@@ -29,53 +25,47 @@ const Title = ({
|
|
|
29
25
|
subtitleStyle,
|
|
30
26
|
subtitleProps,
|
|
31
27
|
// ...otherProps
|
|
32
|
-
}) =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
}) => (
|
|
29
|
+
<div
|
|
30
|
+
id={id}
|
|
31
|
+
className={[
|
|
32
|
+
baseClassName,
|
|
33
|
+
componentClassName,
|
|
34
|
+
userClassName,
|
|
35
|
+
]
|
|
36
|
+
.filter((e) => e)
|
|
37
|
+
.join(' ')}
|
|
38
|
+
style={style}
|
|
39
|
+
>
|
|
40
|
+
<HeadingWrapper
|
|
40
41
|
className={[
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
userClassName,
|
|
42
|
+
headingClassName,
|
|
43
|
+
styleNames.heading,
|
|
44
44
|
]
|
|
45
45
|
.filter((e) => e)
|
|
46
46
|
.join(' ')}
|
|
47
|
-
style={
|
|
47
|
+
style={headingStyle}
|
|
48
|
+
{...headingProps}
|
|
48
49
|
>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.filter((e) => e)
|
|
69
|
-
.join(' ')}
|
|
70
|
-
style={subtitleStyle}
|
|
71
|
-
{...subtitleProps}
|
|
72
|
-
>
|
|
73
|
-
{ subtitle }
|
|
74
|
-
</SubtitleWrapper>
|
|
75
|
-
)}
|
|
76
|
-
</div>
|
|
77
|
-
)
|
|
78
|
-
}
|
|
50
|
+
{ heading }
|
|
51
|
+
</HeadingWrapper>
|
|
52
|
+
{ subtitle
|
|
53
|
+
&& (
|
|
54
|
+
<SubtitleWrapper
|
|
55
|
+
className={[
|
|
56
|
+
subtitleClassName,
|
|
57
|
+
styleNames.subtitle,
|
|
58
|
+
]
|
|
59
|
+
.filter((e) => e)
|
|
60
|
+
.join(' ')}
|
|
61
|
+
style={subtitleStyle}
|
|
62
|
+
{...subtitleProps}
|
|
63
|
+
>
|
|
64
|
+
{ subtitle }
|
|
65
|
+
</SubtitleWrapper>
|
|
66
|
+
)}
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
79
69
|
|
|
80
70
|
Title.propTypes = {
|
|
81
71
|
/**
|