@pareto-engineering/design-system 4.0.0-alpha.4 → 4.0.0-alpha.9
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 +90 -0
- package/dist/cjs/a/AnimatedBlobs/index.js +13 -0
- package/dist/cjs/a/AnimatedBlobs/styles.scss +87 -0
- package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +56 -0
- package/dist/cjs/a/AnimatedGradient/index.js +13 -0
- package/dist/cjs/a/AnimatedGradient/styles.scss +14 -0
- package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +528 -0
- package/dist/cjs/a/ContentTree/ContentTree.js +2 -2
- package/dist/cjs/a/Conversation/Conversation.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/Label/Label.js +13 -5
- package/dist/cjs/a/Label/styles.scss +1 -1
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +1 -1
- package/dist/cjs/a/MetaCard/MetaCard.js +60 -0
- package/dist/cjs/a/MetaCard/index.js +13 -0
- package/dist/cjs/a/MetaCard/styles.scss +28 -0
- package/dist/cjs/a/People/People.js +1 -1
- package/dist/cjs/a/Popover/Popover.js +2 -2
- package/dist/cjs/a/ProgressBar/ProgressBar.js +1 -1
- package/dist/cjs/a/Quote/Quote.js +1 -1
- package/dist/cjs/a/SVG/SVG.js +1 -1
- package/dist/cjs/a/SnapScroller/SnapScroller.js +1 -1
- package/dist/cjs/a/SnapScroller/styles.scss +18 -10
- package/dist/cjs/a/Spinner/Spinner.js +1 -1
- package/dist/cjs/a/TextSteps/TextSteps.js +70 -0
- package/dist/cjs/a/TextSteps/index.js +13 -0
- package/dist/cjs/a/TextSteps/styles.scss +29 -0
- package/dist/cjs/a/Timestamp/Timestamp.js +1 -1
- package/dist/cjs/a/Tip/Tip.js +72 -0
- package/dist/cjs/a/Tip/index.js +13 -0
- package/dist/cjs/a/Tip/styles.scss +22 -0
- package/dist/cjs/a/index.js +36 -1
- package/dist/cjs/b/Button/Button.js +2 -1
- package/dist/cjs/b/Button/styles.scss +2 -0
- package/dist/cjs/b/Card/Card.js +74 -0
- package/dist/cjs/b/Card/common/Group/Group.js +73 -0
- package/dist/cjs/b/Card/common/Group/index.js +13 -0
- package/dist/cjs/b/Card/common/Group/styles.scss +42 -0
- package/dist/cjs/b/Card/common/Section/Section.js +59 -0
- package/dist/cjs/b/Card/common/Section/index.js +13 -0
- package/dist/cjs/b/Card/common/index.js +19 -0
- package/dist/cjs/b/Card/index.js +13 -0
- package/dist/cjs/b/Card/styles.scss +46 -0
- package/dist/cjs/b/Logo/Logo.js +1 -1
- package/dist/cjs/b/Page/Page.js +10 -3
- package/dist/cjs/b/Page/common/Section/Section.js +6 -1
- package/dist/cjs/b/Page/styles.scss +22 -4
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +1 -1
- package/dist/cjs/b/SocialMediaButton/styles.scss +1 -1
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +1 -1
- package/dist/cjs/b/Title/Title.js +4 -1
- package/dist/cjs/b/index.js +8 -1
- package/dist/cjs/c/ContentSlides/ContentSlides.js +2 -2
- package/dist/cjs/c/Modal/Modal.js +1 -1
- package/dist/cjs/c/Modal/styles.scss +2 -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 +16 -8
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +21 -33
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +5 -4
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +1 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +3 -3
- package/dist/cjs/f/fields/SelectInput/styles.scss +31 -21
- package/dist/cjs/f/fields/TextInput/TextInput.js +5 -3
- package/dist/cjs/f/fields/TextInput/styles.scss +26 -17
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +82 -0
- package/dist/es/a/AnimatedBlobs/index.js +1 -0
- package/dist/es/a/AnimatedBlobs/styles.scss +87 -0
- package/dist/es/a/AnimatedGradient/AnimatedGradient.js +48 -0
- package/dist/es/a/AnimatedGradient/index.js +1 -0
- package/dist/es/a/AnimatedGradient/styles.scss +14 -0
- package/dist/es/a/AnimatedGradient/webGIRenderer.js +492 -0
- package/dist/es/a/ContentTree/ContentTree.js +3 -3
- package/dist/es/a/Conversation/Conversation.js +2 -2
- package/dist/es/a/DotInfo/DotInfo.js +2 -2
- package/dist/es/a/Figure/Figure.js +2 -2
- package/dist/es/a/HamburgerButton/HamburgerButton.js +2 -2
- package/dist/es/a/IconList/IconList.js +2 -2
- package/dist/es/a/Label/Label.js +14 -6
- package/dist/es/a/Label/styles.scss +1 -1
- package/dist/es/a/LoadingCircle/LoadingCircle.js +2 -2
- package/dist/es/a/MetaCard/MetaCard.js +52 -0
- package/dist/es/a/MetaCard/index.js +1 -0
- package/dist/es/a/MetaCard/styles.scss +28 -0
- package/dist/es/a/People/People.js +2 -2
- package/dist/es/a/Popover/Popover.js +3 -3
- package/dist/es/a/ProgressBar/ProgressBar.js +2 -2
- package/dist/es/a/Quote/Quote.js +2 -2
- package/dist/es/a/SVG/SVG.js +2 -2
- package/dist/es/a/SnapScroller/SnapScroller.js +2 -2
- package/dist/es/a/SnapScroller/styles.scss +18 -10
- package/dist/es/a/Spinner/Spinner.js +2 -2
- package/dist/es/a/TextSteps/TextSteps.js +61 -0
- package/dist/es/a/TextSteps/index.js +1 -0
- package/dist/es/a/TextSteps/styles.scss +29 -0
- package/dist/es/a/Timestamp/Timestamp.js +2 -2
- package/dist/es/a/Tip/Tip.js +64 -0
- package/dist/es/a/Tip/index.js +2 -0
- package/dist/es/a/Tip/styles.scss +22 -0
- package/dist/es/a/index.js +6 -1
- package/dist/es/b/Button/Button.js +2 -1
- package/dist/es/b/Button/styles.scss +2 -0
- package/dist/es/b/Card/Card.js +66 -0
- package/dist/es/b/Card/common/Group/Group.js +65 -0
- package/dist/es/b/Card/common/Group/index.js +1 -0
- package/dist/es/b/Card/common/Group/styles.scss +42 -0
- package/dist/es/b/Card/common/Section/Section.js +48 -0
- package/dist/es/b/Card/common/Section/index.js +1 -0
- package/dist/es/b/Card/common/index.js +2 -0
- package/dist/es/b/Card/index.js +1 -0
- package/dist/es/b/Card/styles.scss +46 -0
- package/dist/es/b/Logo/Logo.js +2 -2
- package/dist/es/b/Page/Page.js +11 -4
- package/dist/es/b/Page/common/Section/Section.js +6 -1
- package/dist/es/b/Page/styles.scss +22 -4
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +2 -2
- package/dist/es/b/SocialMediaButton/styles.scss +1 -1
- package/dist/es/b/ThemeSelector/ThemeSelector.js +2 -2
- package/dist/es/b/Title/Title.js +18 -12
- package/dist/es/b/index.js +2 -1
- package/dist/es/c/ContentSlides/ContentSlides.js +3 -3
- package/dist/es/c/Modal/Modal.js +2 -2
- package/dist/es/c/Modal/styles.scss +2 -1
- package/dist/es/c/Shortener/Shortener.js +2 -2
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +2 -2
- package/dist/es/f/FormInput/FormInput.js +2 -2
- package/dist/es/f/common/Debugger/Debugger.js +2 -2
- package/dist/es/f/common/Description/Description.js +2 -2
- package/dist/es/f/common/Label/Label.js +2 -2
- package/dist/es/f/fields/Checkbox/Checkbox.js +2 -2
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +18 -10
- package/dist/es/f/fields/ChoicesInput/styles.scss +21 -33
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +2 -2
- package/dist/es/f/fields/QueryCombobox/styles.scss +5 -4
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +2 -2
- package/dist/es/f/fields/SelectInput/SelectInput.js +4 -4
- package/dist/es/f/fields/SelectInput/styles.scss +31 -21
- package/dist/es/f/fields/TextInput/TextInput.js +6 -4
- package/dist/es/f/fields/TextInput/styles.scss +26 -17
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +2 -2
- package/package.json +16 -16
- package/src/stories/a/MetaCard.stories.jsx +35 -0
- package/src/stories/a/TextSteps.stories.jsx +19 -0
- package/src/stories/a/Tip.stories.jsx +28 -0
- package/src/stories/b/Card/Card.stories.jsx +59 -0
- package/src/stories/b/Card/Group.stories.jsx +59 -0
- package/src/stories/b/Page.stories.jsx +19 -3
- package/src/stories/f/SelectInput.stories.jsx +7 -0
- package/src/stories/f/TextInput.stories.jsx +4 -4
- package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +102 -0
- package/src/ui/a/AnimatedBlobs/index.js +1 -0
- package/src/ui/a/AnimatedBlobs/styles.scss +87 -0
- package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +69 -0
- package/src/ui/a/AnimatedGradient/index.js +1 -0
- package/src/ui/a/AnimatedGradient/styles.scss +14 -0
- package/src/ui/a/AnimatedGradient/webGIRenderer.js +541 -0
- package/src/ui/a/ContentTree/ContentTree.jsx +3 -3
- package/src/ui/a/Conversation/Conversation.jsx +2 -2
- package/src/ui/a/DotInfo/DotInfo.jsx +2 -2
- package/src/ui/a/Figure/Figure.jsx +2 -2
- package/src/ui/a/HamburgerButton/HamburgerButton.jsx +2 -2
- package/src/ui/a/IconList/IconList.jsx +2 -2
- package/src/ui/a/Label/Label.jsx +13 -4
- package/src/ui/a/Label/styles.scss +1 -1
- package/src/ui/a/LoadingCircle/LoadingCircle.jsx +2 -2
- package/src/ui/a/MetaCard/MetaCard.jsx +74 -0
- package/src/ui/a/MetaCard/index.js +1 -0
- package/src/ui/a/MetaCard/styles.scss +28 -0
- package/src/ui/a/People/People.jsx +2 -2
- package/src/ui/a/Popover/Popover.jsx +3 -3
- package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -2
- package/src/ui/a/Quote/Quote.jsx +2 -2
- package/src/ui/a/SVG/SVG.jsx +2 -2
- package/src/ui/a/SnapScroller/SnapScroller.jsx +2 -2
- package/src/ui/a/SnapScroller/styles.scss +18 -10
- package/src/ui/a/Spinner/Spinner.jsx +2 -2
- package/src/ui/a/TextSteps/TextSteps.jsx +87 -0
- package/src/ui/a/TextSteps/index.js +1 -0
- package/src/ui/a/TextSteps/styles.scss +29 -0
- package/src/ui/a/Timestamp/Timestamp.jsx +2 -2
- package/src/ui/a/Tip/Tip.jsx +88 -0
- package/src/ui/a/Tip/index.js +2 -0
- package/src/ui/a/Tip/styles.scss +22 -0
- package/src/ui/a/index.js +5 -0
- package/src/ui/b/Button/Button.jsx +2 -1
- package/src/ui/b/Button/styles.scss +2 -0
- package/src/ui/b/Card/Card.jsx +94 -0
- package/src/ui/b/Card/common/Group/Group.jsx +91 -0
- package/src/ui/b/Card/common/Group/index.js +1 -0
- package/src/ui/b/Card/common/Group/styles.scss +42 -0
- package/src/ui/b/Card/common/Section/Section.jsx +70 -0
- package/src/ui/b/Card/common/Section/index.js +1 -0
- package/src/ui/b/Card/common/index.js +2 -0
- package/src/ui/b/Card/index.js +1 -0
- package/src/ui/b/Card/styles.scss +46 -0
- package/src/ui/b/Logo/Logo.jsx +2 -2
- package/src/ui/b/Page/Page.jsx +9 -3
- package/src/ui/b/Page/common/Section/Section.jsx +8 -0
- package/src/ui/b/Page/styles.scss +22 -4
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +2 -2
- package/src/ui/b/SocialMediaButton/styles.scss +1 -1
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +2 -2
- package/src/ui/b/Title/Title.jsx +30 -23
- package/src/ui/b/index.js +1 -0
- package/src/ui/c/ContentSlides/ContentSlides.jsx +3 -3
- package/src/ui/c/Modal/Modal.jsx +2 -2
- package/src/ui/c/Modal/styles.scss +2 -1
- package/src/ui/c/Shortener/Shortener.jsx +2 -2
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +2 -2
- package/src/ui/f/FormInput/FormInput.jsx +2 -2
- package/src/ui/f/common/Debugger/Debugger.jsx +2 -2
- package/src/ui/f/common/Description/Description.jsx +2 -2
- package/src/ui/f/common/Label/Label.jsx +2 -2
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +2 -2
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +12 -7
- package/src/ui/f/fields/ChoicesInput/styles.scss +21 -33
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +2 -2
- package/src/ui/f/fields/QueryCombobox/styles.scss +5 -4
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +2 -2
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +4 -4
- package/src/ui/f/fields/SelectInput/styles.scss +31 -21
- package/src/ui/f/fields/TextInput/TextInput.jsx +13 -11
- package/src/ui/f/fields/TextInput/styles.scss +26 -17
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +2 -2
- package/tests/__snapshots__/Storyshots.test.js.snap +1049 -485
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
|
+
@use "sass:math";
|
|
4
5
|
|
|
5
6
|
$default-background: var(--background1);
|
|
6
7
|
/* stylelint-disable-next-line color-named -- needed for rgba function */
|
|
7
8
|
$default-box-shadow: 0 10px 20px rgba(black, .2);
|
|
8
|
-
$default-padding: 1em
|
|
9
|
+
$default-padding: math.div(1em, 2);
|
|
9
10
|
$default-margin: 2em;
|
|
10
11
|
$default-max-height: 75vh;
|
|
11
12
|
$default-max-width: 90%;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect, useState } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ const Shortener = ({
|
|
|
31
31
|
|
|
32
32
|
countLetters,
|
|
33
33
|
}) => {
|
|
34
|
-
|
|
34
|
+
useInsertionEffect(() => {
|
|
35
35
|
import('./styles.scss')
|
|
36
36
|
}, [])
|
|
37
37
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -25,7 +25,7 @@ const SocialMediaShareButton = ({
|
|
|
25
25
|
type,
|
|
26
26
|
color,
|
|
27
27
|
}) => {
|
|
28
|
-
|
|
28
|
+
useInsertionEffect(() => {
|
|
29
29
|
import('./styles.scss')
|
|
30
30
|
}, [])
|
|
31
31
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { memo,
|
|
4
|
+
import { memo, useInsertionEffect } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -33,7 +33,7 @@ const FormInput = ({
|
|
|
33
33
|
disabled,
|
|
34
34
|
...otherProps
|
|
35
35
|
}) => {
|
|
36
|
-
|
|
36
|
+
useInsertionEffect(() => {
|
|
37
37
|
import('./styles.scss')
|
|
38
38
|
}, [])
|
|
39
39
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
|
-
import { useState,
|
|
3
|
+
import { useState, useInsertionEffect, useContext } from 'react'
|
|
4
4
|
|
|
5
5
|
import PropTypes from 'prop-types'
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ const Debugger = ({
|
|
|
21
21
|
initialIsOpen,
|
|
22
22
|
// ...otherProps
|
|
23
23
|
}) => {
|
|
24
|
-
|
|
24
|
+
useInsertionEffect(() => {
|
|
25
25
|
import('./styles.scss')
|
|
26
26
|
}, [])
|
|
27
27
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect } from 'react'
|
|
5
5
|
|
|
6
6
|
import { useField } from 'formik'
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ const Description = ({
|
|
|
27
27
|
color,
|
|
28
28
|
// ...otherProps
|
|
29
29
|
}) => {
|
|
30
|
-
|
|
30
|
+
useInsertionEffect(() => {
|
|
31
31
|
import('./styles.scss')
|
|
32
32
|
}, [])
|
|
33
33
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ const Label = ({
|
|
|
27
27
|
as:Wrapper,
|
|
28
28
|
// ...otherProps
|
|
29
29
|
}) => {
|
|
30
|
-
|
|
30
|
+
useInsertionEffect(() => {
|
|
31
31
|
import('./styles.scss')
|
|
32
32
|
}, [])
|
|
33
33
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ const Checkbox = ({
|
|
|
31
31
|
optional,
|
|
32
32
|
// ...otherProps
|
|
33
33
|
}) => {
|
|
34
|
-
|
|
34
|
+
useInsertionEffect(() => {
|
|
35
35
|
import('./styles.scss')
|
|
36
36
|
}, [])
|
|
37
37
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect, memo } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ import styleNames from '@pareto-engineering/bem/exports'
|
|
|
11
11
|
|
|
12
12
|
import { Choice } from './common'
|
|
13
13
|
|
|
14
|
-
import { FormLabel } from '../../common'
|
|
14
|
+
import { FormDescription, FormLabel } from '../../common'
|
|
15
15
|
|
|
16
16
|
const baseClassName = styleNames.base
|
|
17
17
|
|
|
@@ -31,13 +31,13 @@ const ChoicesInput = ({
|
|
|
31
31
|
gridColumnsMobile,
|
|
32
32
|
gridColumnsDesktop,
|
|
33
33
|
color,
|
|
34
|
-
colorChecked,
|
|
35
34
|
label,
|
|
36
35
|
optional,
|
|
37
36
|
disabled,
|
|
37
|
+
description,
|
|
38
38
|
// ...otherProps
|
|
39
39
|
}) => {
|
|
40
|
-
|
|
40
|
+
useInsertionEffect(() => {
|
|
41
41
|
import('./styles.scss')
|
|
42
42
|
}, [])
|
|
43
43
|
|
|
@@ -52,7 +52,6 @@ const ChoicesInput = ({
|
|
|
52
52
|
userClassName,
|
|
53
53
|
multiple && 'multiple',
|
|
54
54
|
color && `x-${color}`,
|
|
55
|
-
colorChecked && `y-${colorChecked}`,
|
|
56
55
|
]
|
|
57
56
|
.filter((e) => e)
|
|
58
57
|
.join(' ')}
|
|
@@ -71,6 +70,7 @@ const ChoicesInput = ({
|
|
|
71
70
|
<div className="choices">
|
|
72
71
|
{ options.map((choice) => (
|
|
73
72
|
<Choice
|
|
73
|
+
labelClassName="with-faded-border"
|
|
74
74
|
key={choice.value}
|
|
75
75
|
name={name}
|
|
76
76
|
id={`${name}-${choice.value}`}
|
|
@@ -81,6 +81,7 @@ const ChoicesInput = ({
|
|
|
81
81
|
/>
|
|
82
82
|
))}
|
|
83
83
|
</div>
|
|
84
|
+
<FormDescription className="v50 mt-v s-1" description={description} name={name} />
|
|
84
85
|
</div>
|
|
85
86
|
)
|
|
86
87
|
}
|
|
@@ -148,13 +149,17 @@ ChoicesInput.propTypes = {
|
|
|
148
149
|
* Whether the input is optional or not
|
|
149
150
|
*/
|
|
150
151
|
optional:PropTypes.bool,
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The select input description
|
|
155
|
+
*/
|
|
156
|
+
description:PropTypes.string,
|
|
151
157
|
}
|
|
152
158
|
|
|
153
159
|
ChoicesInput.defaultProps = {
|
|
154
160
|
gridColumnsMobile :2,
|
|
155
161
|
gridColumnsDesktop:3,
|
|
156
|
-
color :'
|
|
157
|
-
colorChecked :'main2',
|
|
162
|
+
color :'main',
|
|
158
163
|
disabled :false,
|
|
159
164
|
}
|
|
160
165
|
|
|
@@ -5,21 +5,18 @@
|
|
|
5
5
|
@use "@pareto-engineering/styles/src/mixins";
|
|
6
6
|
@use "@pareto-engineering/styles/src/globals" as *;
|
|
7
7
|
|
|
8
|
-
$default-
|
|
9
|
-
$default-
|
|
10
|
-
$default-
|
|
8
|
+
$default-flex-separator:calc(1em / 2) calc(.75em / 2);
|
|
9
|
+
$default-transition:var(--theme-default-transition);
|
|
10
|
+
$default-label-padding: .3em 1em calc(2em - .3em);
|
|
11
|
+
$default-label-height: .5em;
|
|
11
12
|
|
|
12
13
|
.#{bem.$base}.choices-input {
|
|
13
|
-
|
|
14
|
-
display:
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
>.choices {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
gap: $default-flex-separator;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
grid-template-columns: repeat(var(--grid-columns-desktop), 1fr);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.choice {
|
|
19
|
+
>.choice {
|
|
23
20
|
display: flex;
|
|
24
21
|
|
|
25
22
|
input {
|
|
@@ -33,35 +30,26 @@ $default-transition:all .3s;
|
|
|
33
30
|
background-color: var(--hard-x);
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
input:not(:disabled) + label {
|
|
37
|
-
&:hover {
|
|
38
|
-
border-color: var(--soft-y);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
33
|
label {
|
|
43
|
-
background: var(--
|
|
44
|
-
border: var(--theme-border-
|
|
45
|
-
border-radius: var(--theme-border-radius);
|
|
46
|
-
color: var(--on-x);
|
|
34
|
+
background-color: var(--background-inputs);
|
|
35
|
+
border-radius: var(--theme-default-border-radius);
|
|
47
36
|
cursor: pointer;
|
|
48
37
|
display: block;
|
|
49
|
-
height:
|
|
50
|
-
|
|
38
|
+
height: $default-label-height;
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
padding: $default-label-padding;
|
|
41
|
+
position: relative;
|
|
51
42
|
transition: $default-transition;
|
|
52
|
-
width: 100%;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
input:checked + label {
|
|
56
|
-
background: var(--y);
|
|
57
|
-
color: var(--on-y);
|
|
58
43
|
|
|
59
44
|
&:hover {
|
|
60
|
-
|
|
45
|
+
box-shadow: var(--theme-default-input-box-shadow);
|
|
61
46
|
}
|
|
62
47
|
}
|
|
48
|
+
|
|
49
|
+
input:checked + label {
|
|
50
|
+
background: var(--x);
|
|
51
|
+
color: var(--on-x);
|
|
52
|
+
}
|
|
63
53
|
}
|
|
64
54
|
}
|
|
65
55
|
}
|
|
66
|
-
|
|
67
|
-
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useState,
|
|
4
|
+
import { useState, useInsertionEffect } from 'react'
|
|
5
5
|
|
|
6
6
|
import { useField } from 'formik'
|
|
7
7
|
|
|
@@ -37,7 +37,7 @@ const QueryCombobox = ({
|
|
|
37
37
|
validate,
|
|
38
38
|
// ...otherProps
|
|
39
39
|
}) => {
|
|
40
|
-
|
|
40
|
+
useInsertionEffect(() => {
|
|
41
41
|
import('./styles.scss')
|
|
42
42
|
}, [])
|
|
43
43
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
|
+
@use "sass:math";
|
|
4
5
|
|
|
5
6
|
$default-input-padding: .75em .75em .55em;
|
|
6
7
|
$default-padding: 1em;
|
|
@@ -26,7 +27,7 @@ $default-loading-circle-displacement: 1em;
|
|
|
26
27
|
padding: 0;
|
|
27
28
|
|
|
28
29
|
>.item {
|
|
29
|
-
padding: $default-padding
|
|
30
|
+
padding: math.div($default-padding, 2);
|
|
30
31
|
|
|
31
32
|
&.#{bem.$modifier-active} {
|
|
32
33
|
background-color: var(--background2);
|
|
@@ -76,12 +77,12 @@ $default-loading-circle-displacement: 1em;
|
|
|
76
77
|
>.selected-items {
|
|
77
78
|
display: flex;
|
|
78
79
|
flex-wrap: wrap;
|
|
79
|
-
gap: $default-gap
|
|
80
|
-
margin-bottom: $default-margin
|
|
80
|
+
gap: math.div($default-gap, 2);
|
|
81
|
+
margin-bottom: math.div($default-margin, 2);
|
|
81
82
|
|
|
82
83
|
>.item {
|
|
83
84
|
background-color: var(--main2);
|
|
84
|
-
padding: $default-padding
|
|
85
|
+
padding: math.div($default-padding, 4);
|
|
85
86
|
|
|
86
87
|
.close {
|
|
87
88
|
font-size: calc(var(--s-3) * 1em);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useState,
|
|
4
|
+
import { useState, useInsertionEffect, memo } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -35,7 +35,7 @@ const RatingsInput = ({
|
|
|
35
35
|
optional,
|
|
36
36
|
// ...otherProps
|
|
37
37
|
}) => {
|
|
38
|
-
|
|
38
|
+
useInsertionEffect(() => {
|
|
39
39
|
import('./styles.scss')
|
|
40
40
|
}, [])
|
|
41
41
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect, memo } from 'react'
|
|
5
5
|
|
|
6
6
|
import { useField } from 'formik'
|
|
7
7
|
|
|
@@ -38,7 +38,7 @@ const SelectInput = ({
|
|
|
38
38
|
autoComplete,
|
|
39
39
|
// ...otherProps
|
|
40
40
|
}) => {
|
|
41
|
-
|
|
41
|
+
useInsertionEffect(() => {
|
|
42
42
|
import('./styles.scss')
|
|
43
43
|
}, [])
|
|
44
44
|
|
|
@@ -61,7 +61,7 @@ const SelectInput = ({
|
|
|
61
61
|
// {...otherProps}
|
|
62
62
|
>
|
|
63
63
|
<FormLabel name={name} optional={optional}>{label}</FormLabel>
|
|
64
|
-
<div className="select-wrapper">
|
|
64
|
+
<div className="select-wrapper with-faded-border">
|
|
65
65
|
<select
|
|
66
66
|
className="input"
|
|
67
67
|
{...field}
|
|
@@ -172,7 +172,7 @@ SelectInput.propTypes = {
|
|
|
172
172
|
|
|
173
173
|
SelectInput.defaultProps = {
|
|
174
174
|
disabled:false,
|
|
175
|
-
color :'
|
|
175
|
+
color :'interactive',
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
export default memo(SelectInput)
|
|
@@ -5,20 +5,32 @@
|
|
|
5
5
|
@use "../../../form.scss";
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
$default-spacing-size: 1em;
|
|
8
9
|
$default-padding: .75em;
|
|
9
|
-
$default-
|
|
10
|
+
$default-bg-gradient: var(--background-far);
|
|
11
|
+
$default-input-border-radius: var(--theme-default-input-border-radius);
|
|
10
12
|
|
|
11
13
|
.#{bem.$base}.select-input {
|
|
12
14
|
display: flex;
|
|
13
15
|
flex-direction: column;
|
|
14
16
|
|
|
15
17
|
.#{bem.$base}.label {
|
|
16
|
-
margin-bottom: $default-
|
|
18
|
+
margin-bottom: $default-spacing-size;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
>.select-wrapper {
|
|
22
|
+
background-color: var(--background-inputs);
|
|
23
|
+
border-radius: $default-input-border-radius;
|
|
24
|
+
padding: $default-padding;
|
|
20
25
|
position: relative;
|
|
21
26
|
|
|
27
|
+
&::after {
|
|
28
|
+
border-radius: $default-input-border-radius;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:not(:disabled):hover {
|
|
32
|
+
box-shadow: var(--default-input-box-shadow);
|
|
33
|
+
}
|
|
22
34
|
>.#{bem.$base}.loading-circle {
|
|
23
35
|
position: absolute;
|
|
24
36
|
right: 0;
|
|
@@ -26,24 +38,22 @@ $default-margin: 1em;
|
|
|
26
38
|
transform: translateY(-50%);
|
|
27
39
|
}
|
|
28
40
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
&:focus {
|
|
46
|
-
background: var(--y);
|
|
41
|
+
select {
|
|
42
|
+
appearance: none;
|
|
43
|
+
background-color: inherit;
|
|
44
|
+
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAyMCAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDEuNUwxMCAxMC41TDEgMS41IiBzdHJva2U9IiM0QzRENTMiIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
45
|
+
background-position: calc(100% - $default-spacing-size);
|
|
46
|
+
background-repeat: no-repeat;
|
|
47
|
+
background-size: $default-spacing-size;
|
|
48
|
+
padding-right: $default-spacing-size;
|
|
49
|
+
|
|
50
|
+
&.input {
|
|
51
|
+
width: 100%;
|
|
52
|
+
|
|
53
|
+
&:disabled {
|
|
54
|
+
appearance: none;
|
|
55
|
+
opacity: 35%;
|
|
56
|
+
}
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect, memo } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -38,7 +38,7 @@ const TextInput = ({
|
|
|
38
38
|
autoComplete,
|
|
39
39
|
// ...otherProps
|
|
40
40
|
}) => {
|
|
41
|
-
|
|
41
|
+
useInsertionEffect(() => {
|
|
42
42
|
import('./styles.scss')
|
|
43
43
|
}, [])
|
|
44
44
|
|
|
@@ -68,15 +68,17 @@ const TextInput = ({
|
|
|
68
68
|
>
|
|
69
69
|
{ label }
|
|
70
70
|
</FormLabel>
|
|
71
|
-
<input
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
71
|
+
<div className="input-wrapper with-faded-border">
|
|
72
|
+
<input
|
|
73
|
+
id={name}
|
|
74
|
+
className="input"
|
|
75
|
+
type={type}
|
|
76
|
+
disabled={disabled}
|
|
77
|
+
placeholder={placeholder}
|
|
78
|
+
autoComplete={autoComplete}
|
|
79
|
+
{...field}
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
80
82
|
|
|
81
83
|
<FormDescription className="v50 mt-v s-1" description={description} name={name} />
|
|
82
84
|
|
|
@@ -4,31 +4,40 @@
|
|
|
4
4
|
@use "../../../form.scss";
|
|
5
5
|
|
|
6
6
|
$default-padding: .75em .75em .55em;
|
|
7
|
+
$default-input-border-radius: var(--theme-default-input-border-radius);
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
.#{bem.$base}.text-input {
|
|
9
11
|
display: flex;
|
|
10
12
|
flex-direction: column;
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
border: var(--theme-border-style) var(--hard-y);
|
|
15
|
-
color: var(--on-y);
|
|
16
|
-
padding: $default-padding;
|
|
17
|
-
|
|
18
|
-
&::placeholder {
|
|
19
|
-
color: var(--metadata);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:not(:disabled):hover {
|
|
23
|
-
border: var(--theme-border-style) var(--soft-background4);
|
|
24
|
-
}
|
|
14
|
+
>.input-wrapper {
|
|
15
|
+
position: relative;
|
|
25
16
|
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
&::after {
|
|
18
|
+
border-radius: $default-input-border-radius;
|
|
28
19
|
}
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
background: var(--
|
|
21
|
+
> input {
|
|
22
|
+
background-color: var(--background-inputs);
|
|
23
|
+
border-radius: $default-input-border-radius;
|
|
24
|
+
color: var(--x);
|
|
25
|
+
height: 100%;
|
|
26
|
+
padding: $default-padding;
|
|
27
|
+
width: 100%;
|
|
28
|
+
|
|
29
|
+
&::placeholder {
|
|
30
|
+
color: var(--metadata);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:disabled {
|
|
34
|
+
background-color: var(--hard-x);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:not(:disabled):hover {
|
|
38
|
+
border-radius: $default-input-border-radius;
|
|
39
|
+
box-shadow: var(--theme-default-input-box-shadow);
|
|
40
|
+
}
|
|
32
41
|
}
|
|
33
42
|
}
|
|
34
43
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect, memo } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -40,7 +40,7 @@ const TextareaInput = ({
|
|
|
40
40
|
resize,
|
|
41
41
|
// ...otherProps
|
|
42
42
|
}) => {
|
|
43
|
-
|
|
43
|
+
useInsertionEffect(() => {
|
|
44
44
|
import('./styles.scss')
|
|
45
45
|
}, [])
|
|
46
46
|
|