@pareto-engineering/design-system 4.0.0-alpha.62 → 4.0.0-alpha.64
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/f/common/Description/Description.js +6 -5
- package/dist/cjs/f/common/Label/Label.js +9 -22
- package/dist/cjs/f/common/Label/styles.scss +0 -5
- package/dist/cjs/f/common/index.js +1 -9
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +16 -21
- package/dist/cjs/f/fields/Checkbox/styles.scss +7 -5
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +13 -23
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +44 -41
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +11 -39
- package/dist/cjs/f/fields/EditorInput/styles.scss +92 -90
- package/dist/cjs/f/fields/LinkInput/LinkInput.js +14 -20
- package/dist/cjs/f/fields/LinkInput/styles.scss +52 -51
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +2 -26
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +4 -30
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +7 -16
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +9 -17
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +38 -37
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +2 -10
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +14 -38
- package/dist/cjs/f/fields/RatingsInput/styles.scss +5 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +14 -36
- package/dist/cjs/f/fields/SelectInput/styles.scss +5 -2
- package/dist/cjs/f/fields/TextInput/TextInput.js +19 -37
- package/dist/cjs/f/fields/TextInput/styles.scss +37 -30
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -37
- package/dist/cjs/f/fields/TextareaInput/styles.scss +30 -27
- package/dist/es/f/common/Description/Description.js +4 -1
- package/dist/es/f/common/Label/Label.js +15 -24
- package/dist/es/f/common/Label/styles.scss +0 -5
- package/dist/es/f/common/index.js +0 -1
- package/dist/es/f/fields/Checkbox/Checkbox.js +14 -19
- package/dist/es/f/fields/Checkbox/styles.scss +7 -5
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +31 -39
- package/dist/es/f/fields/ChoicesInput/styles.scss +44 -41
- package/dist/es/f/fields/EditorInput/EditorInput.js +12 -35
- package/dist/es/f/fields/EditorInput/styles.scss +92 -90
- package/dist/es/f/fields/LinkInput/LinkInput.js +14 -20
- package/dist/es/f/fields/LinkInput/styles.scss +52 -51
- package/dist/es/f/fields/QueryChoices/QueryChoices.js +2 -26
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +4 -26
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +8 -17
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +10 -18
- package/dist/es/f/fields/QueryCombobox/styles.scss +38 -37
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +2 -10
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +15 -35
- package/dist/es/f/fields/RatingsInput/styles.scss +5 -1
- package/dist/es/f/fields/SelectInput/SelectInput.js +14 -36
- package/dist/es/f/fields/SelectInput/styles.scss +5 -2
- package/dist/es/f/fields/TextInput/TextInput.js +19 -37
- package/dist/es/f/fields/TextInput/styles.scss +37 -30
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -37
- package/dist/es/f/fields/TextareaInput/styles.scss +30 -27
- package/package.json +3 -3
- package/src/stories/f/Checkbox.stories.jsx +13 -21
- package/src/stories/f/ChoicesInput.stories.jsx +12 -27
- package/src/stories/f/EditorInput.stories.jsx +7 -14
- package/src/stories/f/LinkInput.stories.jsx +15 -22
- package/src/stories/f/QueryChoices.stories.jsx +12 -19
- package/src/stories/f/QueryCombobox.stories.jsx +16 -24
- package/src/stories/f/QuerySelect.stories.jsx +12 -19
- package/src/stories/f/RatingsInput.stories.jsx +7 -14
- package/src/stories/f/SelectInput.stories.jsx +12 -19
- package/src/stories/f/TextInput.stories.jsx +16 -23
- package/src/stories/f/TextareaInput.stories.jsx +7 -14
- package/src/ui/f/common/Description/Description.jsx +6 -2
- package/src/ui/f/common/Label/Label.jsx +27 -37
- package/src/ui/f/common/Label/styles.scss +0 -5
- package/src/ui/f/common/index.js +0 -1
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +27 -33
- package/src/ui/f/fields/Checkbox/styles.scss +7 -5
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +29 -38
- package/src/ui/f/fields/ChoicesInput/styles.scss +44 -41
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +16 -41
- package/src/ui/f/fields/EditorInput/styles.scss +92 -90
- package/src/ui/f/fields/LinkInput/LinkInput.jsx +38 -45
- package/src/ui/f/fields/LinkInput/styles.scss +52 -51
- package/src/ui/f/fields/QueryChoices/QueryChoices.jsx +0 -28
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +5 -31
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +35 -46
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +63 -73
- package/src/ui/f/fields/QueryCombobox/styles.scss +38 -37
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +0 -8
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +20 -47
- package/src/ui/f/fields/RatingsInput/styles.scss +5 -1
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +33 -61
- package/src/ui/f/fields/SelectInput/styles.scss +5 -2
- package/src/ui/f/fields/TextInput/TextInput.jsx +27 -50
- package/src/ui/f/fields/TextInput/styles.scss +37 -30
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +32 -59
- package/src/ui/f/fields/TextareaInput/styles.scss +30 -27
- package/tests/__snapshots__/Storyshots.test.js.snap +5909 -0
- package/dist/cjs/f/common/InputWrapper/InputWrapper.js +0 -73
- package/dist/cjs/f/common/InputWrapper/index.js +0 -13
- package/dist/cjs/f/common/InputWrapper/styles.scss +0 -13
- package/dist/es/f/common/InputWrapper/InputWrapper.js +0 -61
- package/dist/es/f/common/InputWrapper/index.js +0 -2
- package/dist/es/f/common/InputWrapper/styles.scss +0 -13
- package/src/ui/f/common/InputWrapper/InputWrapper.jsx +0 -83
- package/src/ui/f/common/InputWrapper/index.js +0 -2
- package/src/ui/f/common/InputWrapper/styles.scss +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pareto-engineering/design-system",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.64",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@lexical/react": "^0.11.3",
|
|
54
|
-
"@pareto-engineering/assets": "^4.0.0-alpha.
|
|
54
|
+
"@pareto-engineering/assets": "^4.0.0-alpha.63",
|
|
55
55
|
"@pareto-engineering/bem": "^4.0.0-alpha.20",
|
|
56
56
|
"@pareto-engineering/styles": "^4.0.0-alpha.57",
|
|
57
57
|
"@pareto-engineering/utils": "^4.0.0-alpha.46",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"relay-test-utils": "^15.0.0"
|
|
72
72
|
},
|
|
73
73
|
"browserslist": "> 2%",
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "2664d428449c22570d89c6c4f9e6d65e3c1d51c1"
|
|
75
75
|
}
|
|
@@ -27,16 +27,12 @@ export default {
|
|
|
27
27
|
),
|
|
28
28
|
],
|
|
29
29
|
argTypes:{
|
|
30
|
-
label
|
|
31
|
-
labelColor
|
|
32
|
-
description
|
|
33
|
-
defaultValue
|
|
34
|
-
disabled
|
|
35
|
-
optional
|
|
36
|
-
labelSpan :{ control: 'number' },
|
|
37
|
-
inputSpan :{ control: 'number' },
|
|
38
|
-
desktopLabelSpan:{ control: 'number' },
|
|
39
|
-
desktopInputSpan:{ control: 'number' },
|
|
30
|
+
label :{ control: 'text' },
|
|
31
|
+
labelColor :{ control: 'text' },
|
|
32
|
+
description :{ control: 'text' },
|
|
33
|
+
defaultValue:{ control: 'boolean' },
|
|
34
|
+
disabled :{ control: 'boolean' },
|
|
35
|
+
optional :{ control: 'boolean' },
|
|
40
36
|
},
|
|
41
37
|
}
|
|
42
38
|
|
|
@@ -54,7 +50,13 @@ const Template = ({ defaultValue, ...args }) => {
|
|
|
54
50
|
}, [defaultValue])
|
|
55
51
|
|
|
56
52
|
return (
|
|
57
|
-
<div
|
|
53
|
+
<div
|
|
54
|
+
style={{
|
|
55
|
+
display :'flex',
|
|
56
|
+
flexDirection:'column',
|
|
57
|
+
gap :'1rem',
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
58
60
|
<Checkbox {...args} />
|
|
59
61
|
<FormDebugger />
|
|
60
62
|
</div>
|
|
@@ -98,13 +100,3 @@ Optional.args = {
|
|
|
98
100
|
...WithLabel.args,
|
|
99
101
|
optional:true,
|
|
100
102
|
}
|
|
101
|
-
|
|
102
|
-
export const OnSingleRow = Template.bind({})
|
|
103
|
-
OnSingleRow.args = {
|
|
104
|
-
...Base.args,
|
|
105
|
-
label :'Urgent',
|
|
106
|
-
labelSpan :4,
|
|
107
|
-
inputSpan :4,
|
|
108
|
-
desktopLabelSpan:4,
|
|
109
|
-
desktopInputSpan:10,
|
|
110
|
-
}
|
|
@@ -22,15 +22,11 @@ export default {
|
|
|
22
22
|
),
|
|
23
23
|
],
|
|
24
24
|
argTypes:{
|
|
25
|
-
color
|
|
26
|
-
labelColor
|
|
27
|
-
multiple
|
|
28
|
-
disabled
|
|
29
|
-
optional
|
|
30
|
-
labelSpan :{ control: 'number' },
|
|
31
|
-
inputSpan :{ control: 'number' },
|
|
32
|
-
desktopLabelSpan:{ control: 'number' },
|
|
33
|
-
desktopInputSpan:{ control: 'number' },
|
|
25
|
+
color :{ control: 'color' },
|
|
26
|
+
labelColor:{ control: 'color' },
|
|
27
|
+
multiple :{ control: 'boolean' },
|
|
28
|
+
disabled :{ control: 'boolean' },
|
|
29
|
+
optional :{ control: 'boolean' },
|
|
34
30
|
},
|
|
35
31
|
}
|
|
36
32
|
|
|
@@ -82,7 +78,13 @@ const Template = ({ defaultValue, ...args }) => {
|
|
|
82
78
|
}, [defaultValue])
|
|
83
79
|
|
|
84
80
|
return (
|
|
85
|
-
<div
|
|
81
|
+
<div
|
|
82
|
+
style={{
|
|
83
|
+
display :'flex',
|
|
84
|
+
flexDirection:'column',
|
|
85
|
+
gap :'1rem',
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
86
88
|
<ChoicesInput {...args} />
|
|
87
89
|
<FormDebugger />
|
|
88
90
|
</div>
|
|
@@ -117,13 +119,6 @@ MultipleWithDefaultFormikValue.args = {
|
|
|
117
119
|
defaultValue:['brown', 'violet'],
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
export const MultipleWithGrid = Template.bind({})
|
|
121
|
-
MultipleWithGrid.args = {
|
|
122
|
-
...Base.args,
|
|
123
|
-
multiple :true,
|
|
124
|
-
gridColumnsDesktop:2,
|
|
125
|
-
}
|
|
126
|
-
|
|
127
122
|
export const ChoicesWithLabel = Template.bind({})
|
|
128
123
|
ChoicesWithLabel.args = {
|
|
129
124
|
...Base.args,
|
|
@@ -142,13 +137,3 @@ DisabledChoicesInput.args = {
|
|
|
142
137
|
...ChoicesWithLabel.args,
|
|
143
138
|
disabled:true,
|
|
144
139
|
}
|
|
145
|
-
|
|
146
|
-
export const OnSingleRow = Template.bind({})
|
|
147
|
-
OnSingleRow.args = {
|
|
148
|
-
...Base.args,
|
|
149
|
-
label :'Select color',
|
|
150
|
-
labelSpan :4,
|
|
151
|
-
inputSpan :4,
|
|
152
|
-
desktopLabelSpan:4,
|
|
153
|
-
desktopInputSpan:10,
|
|
154
|
-
}
|
|
@@ -29,16 +29,18 @@ export default {
|
|
|
29
29
|
disabled :{ control: 'boolean' },
|
|
30
30
|
labelAsDescription:{ control: 'boolean' },
|
|
31
31
|
optional :{ control: 'boolean' },
|
|
32
|
-
labelSpan :{ control: 'number' },
|
|
33
|
-
inputSpan :{ control: 'number' },
|
|
34
|
-
desktopLabelSpan :{ control: 'number' },
|
|
35
|
-
desktopInputSpan :{ control: 'number' },
|
|
36
32
|
showDebugger :{ control: 'boolean' },
|
|
37
33
|
},
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
const Template = (args) => (
|
|
41
|
-
<div
|
|
37
|
+
<div
|
|
38
|
+
style={{
|
|
39
|
+
display :'flex',
|
|
40
|
+
flexDirection:'column',
|
|
41
|
+
gap :'1rem',
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
42
44
|
<EditorInput {...args} />
|
|
43
45
|
<FormDebugger />
|
|
44
46
|
</div>
|
|
@@ -77,12 +79,3 @@ Disabled.args = {
|
|
|
77
79
|
...Base.args,
|
|
78
80
|
disabled:true,
|
|
79
81
|
}
|
|
80
|
-
|
|
81
|
-
export const OnSingleRow = Template.bind({})
|
|
82
|
-
OnSingleRow.args = {
|
|
83
|
-
...Base.args,
|
|
84
|
-
labelSpan :4,
|
|
85
|
-
inputSpan :4,
|
|
86
|
-
desktopLabelSpan:4,
|
|
87
|
-
desktopInputSpan:10,
|
|
88
|
-
}
|
|
@@ -27,24 +27,26 @@ export default {
|
|
|
27
27
|
],
|
|
28
28
|
argTypes:{
|
|
29
29
|
// backgroundColor:{ control: 'color' },
|
|
30
|
-
placeholder
|
|
31
|
-
autoComplete
|
|
32
|
-
disabled
|
|
33
|
-
name
|
|
34
|
-
label
|
|
35
|
-
labelColor
|
|
36
|
-
optional
|
|
37
|
-
symbol
|
|
38
|
-
labelSpan :{ control: 'number' },
|
|
39
|
-
inputSpan :{ control: 'number' },
|
|
40
|
-
desktopLabelSpan:{ control: 'number' },
|
|
41
|
-
desktopInputSpan:{ control: 'number' },
|
|
30
|
+
placeholder :{ control: 'text' },
|
|
31
|
+
autoComplete:{ control: 'select', options: ['off', 'on'] },
|
|
32
|
+
disabled :{ control: 'boolean' },
|
|
33
|
+
name :{ control: 'text' },
|
|
34
|
+
label :{ control: 'text' },
|
|
35
|
+
labelColor :{ control: 'text' },
|
|
36
|
+
optional :{ control: 'boolean' },
|
|
37
|
+
symbol :{ control: 'text' },
|
|
42
38
|
},
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
// eslint-disable-next-line react/prop-types
|
|
46
42
|
const Template = (args) => (
|
|
47
|
-
<div
|
|
43
|
+
<div
|
|
44
|
+
style={{
|
|
45
|
+
display :'flex',
|
|
46
|
+
flexDirection:'column',
|
|
47
|
+
gap :'1rem',
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
48
50
|
<LinkInput {...args} />
|
|
49
51
|
<FormDebugger />
|
|
50
52
|
</div>
|
|
@@ -89,12 +91,3 @@ WithDisabled.args = {
|
|
|
89
91
|
...Base.args,
|
|
90
92
|
disabled:true,
|
|
91
93
|
}
|
|
92
|
-
|
|
93
|
-
export const OnSingleRow = Template.bind({})
|
|
94
|
-
OnSingleRow.args = {
|
|
95
|
-
...Base.args,
|
|
96
|
-
labelSpan :4,
|
|
97
|
-
inputSpan :4,
|
|
98
|
-
desktopLabelSpan:4,
|
|
99
|
-
desktopInputSpan:10,
|
|
100
|
-
}
|
|
@@ -28,15 +28,11 @@ export default {
|
|
|
28
28
|
),
|
|
29
29
|
],
|
|
30
30
|
argTypes:{
|
|
31
|
-
color
|
|
32
|
-
labelColor
|
|
33
|
-
multiple
|
|
34
|
-
isLoading
|
|
35
|
-
optional
|
|
36
|
-
labelSpan :{ control: 'number' },
|
|
37
|
-
inputSpan :{ control: 'number' },
|
|
38
|
-
desktopLabelSpan:{ control: 'number' },
|
|
39
|
-
desktopInputSpan:{ control: 'number' },
|
|
31
|
+
color :{ control: 'color' },
|
|
32
|
+
labelColor:{ control: 'color' },
|
|
33
|
+
multiple :{ control: 'boolean' },
|
|
34
|
+
isLoading :{ control: 'boolean' },
|
|
35
|
+
optional :{ control: 'boolean' },
|
|
40
36
|
},
|
|
41
37
|
}
|
|
42
38
|
|
|
@@ -103,7 +99,13 @@ const Template = ({ isLoading, defaultFormikState, ...args }) => {
|
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
const Content = () => (
|
|
106
|
-
<div
|
|
102
|
+
<div
|
|
103
|
+
style={{
|
|
104
|
+
display :'flex',
|
|
105
|
+
flexDirection:'column',
|
|
106
|
+
gap :'1rem',
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
107
109
|
<QueryChoices
|
|
108
110
|
name="status"
|
|
109
111
|
label="Select Status"
|
|
@@ -140,12 +142,3 @@ export const Optional = Template.bind({})
|
|
|
140
142
|
Optional.args = {
|
|
141
143
|
optional:true,
|
|
142
144
|
}
|
|
143
|
-
|
|
144
|
-
export const OnSingleRow = Template.bind({})
|
|
145
|
-
OnSingleRow.args = {
|
|
146
|
-
...Base.args,
|
|
147
|
-
labelSpan :4,
|
|
148
|
-
inputSpan :4,
|
|
149
|
-
desktopLabelSpan:4,
|
|
150
|
-
desktopInputSpan:10,
|
|
151
|
-
}
|
|
@@ -29,18 +29,14 @@ export default {
|
|
|
29
29
|
),
|
|
30
30
|
],
|
|
31
31
|
argTypes:{
|
|
32
|
-
disabled
|
|
33
|
-
type
|
|
34
|
-
name
|
|
35
|
-
color
|
|
36
|
-
label
|
|
37
|
-
labelColor
|
|
38
|
-
multiple
|
|
39
|
-
optional
|
|
40
|
-
labelSpan :{ control: 'number' },
|
|
41
|
-
inputSpan :{ control: 'number' },
|
|
42
|
-
desktopLabelSpan:{ control: 'number' },
|
|
43
|
-
desktopInputSpan:{ control: 'number' },
|
|
32
|
+
disabled :{ control: 'boolean' },
|
|
33
|
+
type :{ control: 'text' },
|
|
34
|
+
name :{ control: 'text' },
|
|
35
|
+
color :{ control: 'text' },
|
|
36
|
+
label :{ control: 'text' },
|
|
37
|
+
labelColor:{ control: 'text' },
|
|
38
|
+
multiple :{ control: 'boolean' },
|
|
39
|
+
optional :{ control: 'boolean' },
|
|
44
40
|
},
|
|
45
41
|
}
|
|
46
42
|
|
|
@@ -129,7 +125,13 @@ const ResolvedTemplate = ({ defaultFormikState, ...otherProps }) => {
|
|
|
129
125
|
}
|
|
130
126
|
|
|
131
127
|
return (
|
|
132
|
-
<div
|
|
128
|
+
<div
|
|
129
|
+
style={{
|
|
130
|
+
display :'flex',
|
|
131
|
+
flexDirection:'column',
|
|
132
|
+
gap :'1rem',
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
133
135
|
<QueryCombobox
|
|
134
136
|
label="Search for a team"
|
|
135
137
|
optionsKeyMap={{
|
|
@@ -144,7 +146,7 @@ const ResolvedTemplate = ({ defaultFormikState, ...otherProps }) => {
|
|
|
144
146
|
searchVariable="name_Icontains"
|
|
145
147
|
{...otherProps}
|
|
146
148
|
/>
|
|
147
|
-
<div
|
|
149
|
+
<div>
|
|
148
150
|
<FormDebugger />
|
|
149
151
|
<Button
|
|
150
152
|
onClick={updateFormikState}
|
|
@@ -237,16 +239,6 @@ MultipleSelectWithDefaultFormikState.args = {
|
|
|
237
239
|
},
|
|
238
240
|
}
|
|
239
241
|
|
|
240
|
-
export const OnSingleRow = ResolvedTemplate.bind({})
|
|
241
|
-
OnSingleRow.args = {
|
|
242
|
-
multiple :true,
|
|
243
|
-
defaultFormikState:{ teams: [] },
|
|
244
|
-
labelSpan :4,
|
|
245
|
-
inputSpan :4,
|
|
246
|
-
desktopLabelSpan :4,
|
|
247
|
-
desktopInputSpan :10,
|
|
248
|
-
}
|
|
249
|
-
|
|
250
242
|
// eslint-disable-next-line react/prop-types
|
|
251
243
|
// const RejectedTemplate = ({ multiple }) => {
|
|
252
244
|
// const Content = () => {
|
|
@@ -28,15 +28,11 @@ export default {
|
|
|
28
28
|
),
|
|
29
29
|
],
|
|
30
30
|
argTypes:{
|
|
31
|
-
color
|
|
32
|
-
label
|
|
33
|
-
labelColor
|
|
34
|
-
isLoading
|
|
35
|
-
optional
|
|
36
|
-
labelSpan :{ control: 'number' },
|
|
37
|
-
inputSpan :{ control: 'number' },
|
|
38
|
-
desktopLabelSpan:{ control: 'number' },
|
|
39
|
-
desktopInputSpan:{ control: 'number' },
|
|
31
|
+
color :{ control: 'text' },
|
|
32
|
+
label :{ control: 'text' },
|
|
33
|
+
labelColor:{ control: 'text' },
|
|
34
|
+
isLoading :{ control: 'boolean' },
|
|
35
|
+
optional :{ control: 'boolean' },
|
|
40
36
|
},
|
|
41
37
|
}
|
|
42
38
|
const statuses = [
|
|
@@ -99,7 +95,13 @@ const Template = ({ isLoading, defaultFormikState, ...args }) => {
|
|
|
99
95
|
}
|
|
100
96
|
|
|
101
97
|
const Content = () => (
|
|
102
|
-
<div
|
|
98
|
+
<div
|
|
99
|
+
style={{
|
|
100
|
+
display :'flex',
|
|
101
|
+
flexDirection:'column',
|
|
102
|
+
gap :'1rem',
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
103
105
|
<QuerySelect
|
|
104
106
|
name="status"
|
|
105
107
|
label="Select Task Status"
|
|
@@ -146,12 +148,3 @@ export const Optional = Template.bind({})
|
|
|
146
148
|
Optional.args = {
|
|
147
149
|
optional:true,
|
|
148
150
|
}
|
|
149
|
-
|
|
150
|
-
export const OnSingleRow = Template.bind({})
|
|
151
|
-
OnSingleRow.args = {
|
|
152
|
-
...Base.args,
|
|
153
|
-
labelSpan :4,
|
|
154
|
-
inputSpan :4,
|
|
155
|
-
desktopLabelSpan:4,
|
|
156
|
-
desktopInputSpan:10,
|
|
157
|
-
}
|
|
@@ -33,15 +33,17 @@ export default {
|
|
|
33
33
|
labelMax :{ control: 'text' },
|
|
34
34
|
labelMin :{ control: 'text' },
|
|
35
35
|
optional :{ control: 'boolean' },
|
|
36
|
-
labelSpan :{ control: 'number' },
|
|
37
|
-
inputSpan :{ control: 'number' },
|
|
38
|
-
desktopLabelSpan :{ control: 'number' },
|
|
39
|
-
desktopInputSpan :{ control: 'number' },
|
|
40
36
|
},
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
const Template = (args) => (
|
|
44
|
-
<div
|
|
40
|
+
<div
|
|
41
|
+
style={{
|
|
42
|
+
display :'flex',
|
|
43
|
+
flexDirection:'column',
|
|
44
|
+
gap :'1rem',
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
45
47
|
<RatingsInput {...args} />
|
|
46
48
|
<FormDebugger />
|
|
47
49
|
</div>
|
|
@@ -73,12 +75,3 @@ Labels.args = {
|
|
|
73
75
|
labelMin :'not satisfied.',
|
|
74
76
|
displayRatingsLabel:true,
|
|
75
77
|
}
|
|
76
|
-
|
|
77
|
-
export const OnSingleRow = Template.bind({})
|
|
78
|
-
OnSingleRow.args = {
|
|
79
|
-
...Base.args,
|
|
80
|
-
labelSpan :4,
|
|
81
|
-
inputSpan :4,
|
|
82
|
-
desktopLabelSpan:4,
|
|
83
|
-
desktopInputSpan:10,
|
|
84
|
-
}
|
|
@@ -22,20 +22,22 @@ export default {
|
|
|
22
22
|
),
|
|
23
23
|
],
|
|
24
24
|
argTypes:{
|
|
25
|
-
color
|
|
26
|
-
label
|
|
27
|
-
labelColor
|
|
28
|
-
disabled
|
|
29
|
-
optional
|
|
30
|
-
labelSpan :{ control: 'number' },
|
|
31
|
-
inputSpan :{ control: 'number' },
|
|
32
|
-
desktopLabelSpan:{ control: 'number' },
|
|
33
|
-
desktopInputSpan:{ control: 'number' },
|
|
25
|
+
color :{ control: 'text' },
|
|
26
|
+
label :{ control: 'text' },
|
|
27
|
+
labelColor:{ control: 'text' },
|
|
28
|
+
disabled :{ control: 'boolean' },
|
|
29
|
+
optional :{ control: 'boolean' },
|
|
34
30
|
},
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
const Template = (args) => (
|
|
38
|
-
<div
|
|
34
|
+
<div
|
|
35
|
+
style={{
|
|
36
|
+
display :'flex',
|
|
37
|
+
flexDirection:'column',
|
|
38
|
+
gap :'1rem',
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
39
41
|
<SelectInput {...args} />
|
|
40
42
|
<FormDebugger />
|
|
41
43
|
</div>
|
|
@@ -91,12 +93,3 @@ DisabledWithDescriptionSelectInput.args = {
|
|
|
91
93
|
disabled :true,
|
|
92
94
|
description:'This is a description',
|
|
93
95
|
}
|
|
94
|
-
|
|
95
|
-
export const OnSingleRow = Template.bind({})
|
|
96
|
-
OnSingleRow.args = {
|
|
97
|
-
...Base.args,
|
|
98
|
-
labelSpan :4,
|
|
99
|
-
inputSpan :4,
|
|
100
|
-
desktopLabelSpan:4,
|
|
101
|
-
desktopInputSpan:10,
|
|
102
|
-
}
|
|
@@ -27,25 +27,27 @@ export default {
|
|
|
27
27
|
],
|
|
28
28
|
argTypes:{
|
|
29
29
|
// backgroundColor:{ control: 'color' },
|
|
30
|
-
placeholder
|
|
31
|
-
autoComplete
|
|
32
|
-
disabled
|
|
33
|
-
type
|
|
34
|
-
name
|
|
35
|
-
label
|
|
36
|
-
labelColor
|
|
37
|
-
optional
|
|
38
|
-
symbol
|
|
39
|
-
labelSpan :{ control: 'number' },
|
|
40
|
-
inputSpan :{ control: 'number' },
|
|
41
|
-
desktopLabelSpan:{ control: 'number' },
|
|
42
|
-
desktopInputSpan:{ control: 'number' },
|
|
30
|
+
placeholder :{ control: 'text' },
|
|
31
|
+
autoComplete:{ control: 'select', options: ['off', 'on'] },
|
|
32
|
+
disabled :{ control: 'boolean' },
|
|
33
|
+
type :{ control: 'text' },
|
|
34
|
+
name :{ control: 'text' },
|
|
35
|
+
label :{ control: 'text' },
|
|
36
|
+
labelColor :{ control: 'text' },
|
|
37
|
+
optional :{ control: 'boolean' },
|
|
38
|
+
symbol :{ control: 'text' },
|
|
43
39
|
},
|
|
44
40
|
}
|
|
45
41
|
|
|
46
42
|
// eslint-disable-next-line react/prop-types
|
|
47
43
|
const Template = (args) => (
|
|
48
|
-
<div
|
|
44
|
+
<div
|
|
45
|
+
style={{
|
|
46
|
+
display :'flex',
|
|
47
|
+
flexDirection:'column',
|
|
48
|
+
gap :'1rem',
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
49
51
|
<TextInput {...args} />
|
|
50
52
|
<FormDebugger />
|
|
51
53
|
</div>
|
|
@@ -116,12 +118,3 @@ HasSymbol.args = {
|
|
|
116
118
|
...Base.args,
|
|
117
119
|
symbol:"'$'",
|
|
118
120
|
}
|
|
119
|
-
|
|
120
|
-
export const OnSingleRow = Template.bind({})
|
|
121
|
-
OnSingleRow.args = {
|
|
122
|
-
...Base.args,
|
|
123
|
-
labelSpan :4,
|
|
124
|
-
inputSpan :4,
|
|
125
|
-
desktopLabelSpan:4,
|
|
126
|
-
desktopInputSpan:10,
|
|
127
|
-
}
|
|
@@ -32,15 +32,17 @@ export default {
|
|
|
32
32
|
disabled :{ control: 'boolean' },
|
|
33
33
|
labelAsDescription:{ control: 'boolean' },
|
|
34
34
|
optional :{ control: 'boolean' },
|
|
35
|
-
labelSpan :{ control: 'number' },
|
|
36
|
-
inputSpan :{ control: 'number' },
|
|
37
|
-
desktopLabelSpan :{ control: 'number' },
|
|
38
|
-
desktopInputSpan :{ control: 'number' },
|
|
39
35
|
},
|
|
40
36
|
}
|
|
41
37
|
|
|
42
38
|
const Template = (args) => (
|
|
43
|
-
<div
|
|
39
|
+
<div
|
|
40
|
+
style={{
|
|
41
|
+
display :'flex',
|
|
42
|
+
flexDirection:'column',
|
|
43
|
+
gap :'1rem',
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
44
46
|
<TextareaInput {...args} />
|
|
45
47
|
<FormDebugger />
|
|
46
48
|
</div>
|
|
@@ -103,12 +105,3 @@ DisableResize.args = {
|
|
|
103
105
|
...Base.args,
|
|
104
106
|
resize:'none',
|
|
105
107
|
}
|
|
106
|
-
|
|
107
|
-
export const OnSingleRow = Template.bind({})
|
|
108
|
-
OnSingleRow.args = {
|
|
109
|
-
...Base.args,
|
|
110
|
-
labelSpan :4,
|
|
111
|
-
inputSpan :4,
|
|
112
|
-
desktopLabelSpan:4,
|
|
113
|
-
desktopInputSpan:10,
|
|
114
|
-
}
|
|
@@ -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
|
+
|
|
4
6
|
import { useField } from 'formik'
|
|
5
7
|
|
|
6
8
|
import PropTypes from 'prop-types'
|
|
7
9
|
|
|
8
10
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
11
|
|
|
10
|
-
import './styles.scss'
|
|
11
|
-
|
|
12
12
|
// Local Definitions
|
|
13
13
|
|
|
14
14
|
const baseClassName = styleNames.base
|
|
@@ -27,6 +27,10 @@ const Description = ({
|
|
|
27
27
|
color,
|
|
28
28
|
// ...otherProps
|
|
29
29
|
}) => {
|
|
30
|
+
useInsertionEffect(() => {
|
|
31
|
+
import('./styles.scss')
|
|
32
|
+
}, [])
|
|
33
|
+
|
|
30
34
|
const [, meta] = useField(name)
|
|
31
35
|
const hasError = meta.touched && meta.error
|
|
32
36
|
|
|
@@ -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
|
+
|
|
4
6
|
import PropTypes from 'prop-types'
|
|
5
7
|
|
|
6
8
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
7
9
|
|
|
8
|
-
import './styles.scss'
|
|
9
|
-
|
|
10
10
|
// Local Definitions
|
|
11
11
|
|
|
12
12
|
const baseClassName = styleNames.base
|
|
@@ -25,32 +25,32 @@ const Label = ({
|
|
|
25
25
|
color,
|
|
26
26
|
optional,
|
|
27
27
|
as:Wrapper,
|
|
28
|
-
columnSpan,
|
|
29
|
-
desktopColumnSpan,
|
|
30
28
|
// ...otherProps
|
|
31
|
-
}) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
}) => {
|
|
30
|
+
useInsertionEffect(() => {
|
|
31
|
+
import('./styles.scss')
|
|
32
|
+
}, [])
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Wrapper
|
|
36
|
+
htmlFor={Wrapper === 'label' ? name : undefined}
|
|
37
|
+
id={id}
|
|
38
|
+
className={[
|
|
39
|
+
baseClassName,
|
|
40
|
+
componentClassName,
|
|
41
|
+
userClassName,
|
|
42
|
+
`x-${color}`,
|
|
43
|
+
]
|
|
44
|
+
.filter((e) => e)
|
|
45
|
+
.join(' ')}
|
|
46
|
+
style={style}
|
|
47
|
+
// {...otherProps}
|
|
48
|
+
>
|
|
49
|
+
{children}
|
|
50
|
+
{optional && ' (Optional)'}
|
|
51
|
+
</Wrapper>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
54
|
|
|
55
55
|
Label.propTypes = {
|
|
56
56
|
/**
|
|
@@ -91,16 +91,6 @@ Label.propTypes = {
|
|
|
91
91
|
* Whether the input should have an optional tag
|
|
92
92
|
*/
|
|
93
93
|
optional:PropTypes.bool,
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* How many columns the input should span
|
|
97
|
-
*/
|
|
98
|
-
columnSpan:PropTypes.number,
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* How many columns the input should span on desktop
|
|
102
|
-
*/
|
|
103
|
-
desktopColumnSpan:PropTypes.number,
|
|
104
94
|
}
|
|
105
95
|
|
|
106
96
|
Label.defaultProps = {
|