@pareto-engineering/design-system 4.0.0-alpha.64 → 4.0.0-alpha.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/f/common/Description/Description.js +5 -6
  2. package/dist/cjs/f/common/Label/Label.js +5 -7
  3. package/dist/cjs/f/fields/Checkbox/Checkbox.js +4 -9
  4. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +3 -6
  5. package/dist/cjs/f/fields/EditorInput/EditorInput.js +7 -4
  6. package/dist/cjs/f/fields/LinkInput/LinkInput.js +3 -7
  7. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +6 -4
  8. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +4 -2
  9. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +4 -2
  10. package/dist/cjs/f/fields/QueryCombobox/styles.scss +37 -30
  11. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +6 -4
  12. package/dist/cjs/f/fields/SelectInput/SelectInput.js +3 -5
  13. package/dist/cjs/f/fields/TextInput/TextInput.js +3 -7
  14. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +3 -5
  15. package/dist/es/f/common/Description/Description.js +1 -4
  16. package/dist/es/f/common/Label/Label.js +7 -14
  17. package/dist/es/f/fields/Checkbox/Checkbox.js +1 -5
  18. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +25 -30
  19. package/dist/es/f/fields/EditorInput/EditorInput.js +2 -4
  20. package/dist/es/f/fields/LinkInput/LinkInput.js +2 -4
  21. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +2 -4
  22. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +4 -2
  23. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +4 -2
  24. package/dist/es/f/fields/QueryCombobox/styles.scss +37 -30
  25. package/dist/es/f/fields/RatingsInput/RatingsInput.js +2 -5
  26. package/dist/es/f/fields/SelectInput/SelectInput.js +2 -4
  27. package/dist/es/f/fields/TextInput/TextInput.js +2 -4
  28. package/dist/es/f/fields/TextareaInput/TextareaInput.js +2 -4
  29. package/package.json +4 -4
  30. package/src/ui/f/common/Description/Description.jsx +2 -6
  31. package/src/ui/f/common/Label/Label.jsx +19 -27
  32. package/src/ui/f/fields/Checkbox/Checkbox.jsx +1 -6
  33. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +39 -44
  34. package/src/ui/f/fields/EditorInput/EditorInput.jsx +3 -5
  35. package/src/ui/f/fields/LinkInput/LinkInput.jsx +3 -5
  36. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +3 -5
  37. package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +8 -6
  38. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +15 -12
  39. package/src/ui/f/fields/QueryCombobox/styles.scss +37 -30
  40. package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +2 -5
  41. package/src/ui/f/fields/SelectInput/SelectInput.jsx +3 -5
  42. package/src/ui/f/fields/TextInput/TextInput.jsx +3 -5
  43. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +3 -5
  44. package/tests/__snapshots__/Storyshots.test.js.snap +609 -8434
@@ -125,17 +125,19 @@ const Combobox = ({
125
125
  >
126
126
  {label}
127
127
  </FormLabel>
128
- <input {...getInputProps()} className="input" disabled={disabled} placeholder={placeholder} />
129
- {isFetching && (
130
- <LoadingCircle className="x-main" />
131
- )}
132
- {inputValue.length > minLength && !isFetching && (
128
+ <div className="input-container">
129
+ <input {...getInputProps()} className="input" disabled={disabled} placeholder={placeholder} />
130
+ {isFetching && (
131
+ <LoadingCircle className="x-main" />
132
+ )}
133
+ {inputValue.length > minLength && !isFetching && (
133
134
  <Button isSimple isCompact color="heading" onClick={resetInputValue}>
134
135
  <span className="icon">
135
136
  Y
136
137
  </span>
137
138
  </Button>
138
- )}
139
+ )}
140
+ </div>
139
141
  <FormDescription className="s-1" description={description} name={name} />
140
142
  <Popover
141
143
  isOpen={isOpen}
@@ -215,18 +215,20 @@ const MultipleCombobox = ({
215
215
  ))}
216
216
  </div>
217
217
  )}
218
- <input
219
- {...getInputProps(
220
- getDropdownProps({ preventKeyAction: isOpen }),
218
+
219
+ <div className="input-container">
220
+ <input
221
+ {...getInputProps(
222
+ getDropdownProps({ preventKeyAction: isOpen }),
223
+ )}
224
+ className="input"
225
+ disabled={disabled}
226
+ placeholder={placeholder}
227
+ />
228
+ {isFetching && (
229
+ <LoadingCircle className="x-main" />
221
230
  )}
222
- className="input"
223
- disabled={disabled}
224
- placeholder={placeholder}
225
- />
226
- {isFetching && (
227
- <LoadingCircle className="x-main" />
228
- )}
229
- {inputValue.length > minLength && !isFetching && (
231
+ {inputValue.length > minLength && !isFetching && (
230
232
  <Button
231
233
  isSimple
232
234
  isCompact
@@ -237,7 +239,8 @@ const MultipleCombobox = ({
237
239
  Y
238
240
  </span>
239
241
  </Button>
240
- )}
242
+ )}
243
+ </div>
241
244
 
242
245
  <FormDescription className="s-1" description={description} name={name} />
243
246
  <Popover
@@ -60,45 +60,52 @@ $on-disabled-background: var(--on-background-inputs-30);
60
60
  }
61
61
  }
62
62
 
63
- >.#{bem.$base}.loading-circle,
64
- >.#{bem.$base}.button {
65
- position: absolute;
66
- right: $default-loading-circle-displacement;
67
- }
68
-
69
- >.#{bem.$base}.loading-circle {
70
- top: calc($default-loading-circle-displacement * 1.5);
71
- }
72
63
 
73
- >.#{bem.$base}.button {
74
- top: $default-loading-circle-displacement;
75
- }
64
+ > .input-container {
65
+ position: relative;
76
66
 
77
- > .input {
78
- background: $default-background;
79
- border: $default-border;
80
- border-radius: calc(var(--theme-default-border-radius) / 2);
81
- color: $on-default-background;
82
- outline: none;
83
- padding: $default-input-padding;
67
+ >.#{bem.$base}.loading-circle,
68
+ >.#{bem.$base}.button {
69
+ position: absolute;
70
+ right: $default-loading-circle-displacement;
71
+ }
84
72
 
85
- &::placeholder {
86
- color: var(--metadata);
73
+ >.#{bem.$base}.loading-circle {
74
+ top: calc($default-loading-circle-displacement * 1.5);
87
75
  }
88
76
 
89
- &:disabled {
90
- background-color: $disabled-background;
91
- color: $on-disabled-background;
77
+ >.#{bem.$base}.button {
78
+ top: $default-loading-circle-displacement;
92
79
  }
93
80
 
94
- &:not(:disabled) {
95
- &:hover,
96
- &:active {
97
- border: $hover-border;
81
+
82
+ > .input {
83
+ background: $default-background;
84
+ border: $default-border;
85
+ border-radius: calc(var(--theme-default-border-radius) / 2);
86
+ color: $on-default-background;
87
+ outline: none;
88
+ padding: $default-input-padding;
89
+ width: 100%;
90
+
91
+ &::placeholder {
92
+ color: var(--metadata);
93
+ }
94
+
95
+ &:disabled {
96
+ background-color: $disabled-background;
97
+ color: $on-disabled-background;
98
98
  }
99
99
 
100
- &:focus {
101
- border: $focus-border;
100
+ &:not(:disabled) {
101
+ &:hover,
102
+ &:active {
103
+ border: $hover-border;
104
+ }
105
+
106
+ &:focus {
107
+ border: $focus-border;
108
+ }
102
109
  }
103
110
  }
104
111
  }
@@ -1,13 +1,14 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useState, useInsertionEffect, memo } from 'react'
4
+ import { useState, memo } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
8
8
  import styleNames from '@pareto-engineering/bem/exports'
9
9
 
10
10
  // Local Definitions
11
+ import './styles.scss'
11
12
 
12
13
  import { Rating } from './common'
13
14
  import { FormLabel } from '../../common'
@@ -35,10 +36,6 @@ const RatingsInput = ({
35
36
  optional,
36
37
  // ...otherProps
37
38
  }) => {
38
- useInsertionEffect(() => {
39
- import('./styles.scss')
40
- }, [])
41
-
42
39
  const [hover, setHover] = useState(null)
43
40
 
44
41
  return (
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useInsertionEffect, memo } from 'react'
4
+ import { memo } from 'react'
5
5
 
6
6
  import { useField } from 'formik'
7
7
 
@@ -13,6 +13,8 @@ import { LoadingCircle } from 'ui/a'
13
13
 
14
14
  import { FormLabel, FormDescription } from '../../common'
15
15
 
16
+ import './styles.scss'
17
+
16
18
  // Local Definitions
17
19
 
18
20
  const baseClassName = styleNames.base
@@ -39,10 +41,6 @@ const SelectInput = ({
39
41
  autoComplete,
40
42
  // ...otherProps
41
43
  }) => {
42
- useInsertionEffect(() => {
43
- import('./styles.scss')
44
- }, [])
45
-
46
44
  const [field] = useField({ name, validate })
47
45
 
48
46
  return (
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useInsertionEffect, memo } from 'react'
4
+ import { memo } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -13,6 +13,8 @@ import { FormLabel, FormDescription } from '../../common'
13
13
 
14
14
  // Local Definitions
15
15
 
16
+ import './styles.scss'
17
+
16
18
  const baseClassName = styleNames.base
17
19
 
18
20
  const componentClassName = 'text-input'
@@ -38,10 +40,6 @@ const TextInput = ({
38
40
  symbol,
39
41
  ...otherProps
40
42
  }) => {
41
- useInsertionEffect(() => {
42
- import('./styles.scss')
43
- }, [])
44
-
45
43
  const [field] = useField({ name, validate })
46
44
  const symbolStyle = symbol
47
45
  ? { '--symbol': symbol }
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useInsertionEffect, memo } from 'react'
4
+ import { memo } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -11,6 +11,8 @@ import { useField } from 'formik'
11
11
 
12
12
  // Local Definitions
13
13
 
14
+ import './styles.scss'
15
+
14
16
  import { FormLabel, FormDescription } from '../../common'
15
17
 
16
18
  const baseClassName = styleNames.base
@@ -38,10 +40,6 @@ const TextareaInput = ({
38
40
  resize,
39
41
  // ...otherProps
40
42
  }) => {
41
- useInsertionEffect(() => {
42
- import('./styles.scss')
43
- }, [])
44
-
45
43
  const [field] = useField({ name, validate })
46
44
 
47
45
  return (