@pareto-engineering/design-system 4.0.0-alpha.61 → 4.0.0-alpha.63

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 (198) hide show
  1. package/dist/cjs/a/TextSteps/TextSteps.js +4 -4
  2. package/dist/cjs/a/TextSteps/styles.scss +1 -1
  3. package/dist/cjs/f/FormInput/FormInput.js +43 -13
  4. package/dist/cjs/f/common/V2/Description/Description.js +76 -0
  5. package/dist/cjs/f/common/V2/Description/index.js +13 -0
  6. package/dist/cjs/f/common/V2/Description/styles.scss +10 -0
  7. package/dist/cjs/f/common/V2/Label/Label.js +84 -0
  8. package/dist/cjs/f/common/V2/Label/index.js +13 -0
  9. package/dist/cjs/f/common/V2/Label/styles.scss +9 -0
  10. package/dist/cjs/f/common/V2/index.js +19 -0
  11. package/dist/cjs/f/common/index.js +12 -0
  12. package/dist/cjs/f/fields/V2/Checkbox/Checkbox.js +122 -0
  13. package/dist/cjs/f/fields/V2/Checkbox/index.js +13 -0
  14. package/dist/cjs/f/fields/V2/Checkbox/styles.scss +16 -0
  15. package/dist/cjs/f/fields/V2/ChoicesInput/ChoicesInput.js +154 -0
  16. package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/Choice.js +104 -0
  17. package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/index.js +13 -0
  18. package/dist/cjs/f/fields/V2/ChoicesInput/common/index.js +12 -0
  19. package/dist/cjs/f/fields/V2/ChoicesInput/index.js +13 -0
  20. package/dist/cjs/f/fields/V2/ChoicesInput/styles.scss +79 -0
  21. package/dist/cjs/f/fields/V2/EditorInput/EditorInput.js +197 -0
  22. package/dist/cjs/f/fields/V2/EditorInput/common/Toolbar.js +257 -0
  23. package/dist/cjs/f/fields/V2/EditorInput/common/TreeViewPlugin.js +18 -0
  24. package/dist/cjs/f/fields/V2/EditorInput/common/index.js +20 -0
  25. package/dist/cjs/f/fields/V2/EditorInput/index.js +13 -0
  26. package/dist/cjs/f/fields/V2/EditorInput/styles.scss +149 -0
  27. package/dist/cjs/f/fields/V2/LinkInput/LinkInput.js +156 -0
  28. package/dist/cjs/f/fields/V2/LinkInput/index.js +13 -0
  29. package/dist/cjs/f/fields/V2/LinkInput/styles.scss +90 -0
  30. package/dist/cjs/f/fields/V2/QueryChoices/QueryChoices.js +137 -0
  31. package/dist/cjs/f/fields/V2/QueryChoices/index.js +13 -0
  32. package/dist/cjs/f/fields/V2/QueryCombobox/QueryCombobox.js +229 -0
  33. package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +236 -0
  34. package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/index.js +13 -0
  35. package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/Menu.js +83 -0
  36. package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/index.js +13 -0
  37. package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +300 -0
  38. package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +13 -0
  39. package/dist/cjs/f/fields/V2/QueryCombobox/common/index.js +26 -0
  40. package/dist/cjs/f/fields/V2/QueryCombobox/index.js +13 -0
  41. package/dist/cjs/f/fields/V2/QueryCombobox/styles.scss +127 -0
  42. package/dist/cjs/f/fields/V2/QuerySelect/QuerySelect.js +198 -0
  43. package/dist/cjs/f/fields/V2/QuerySelect/index.js +13 -0
  44. package/dist/cjs/f/fields/V2/RatingsInput/RatingsInput.js +130 -0
  45. package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/Rating.js +117 -0
  46. package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/index.js +13 -0
  47. package/dist/cjs/f/fields/V2/RatingsInput/common/index.js +12 -0
  48. package/dist/cjs/f/fields/V2/RatingsInput/index.js +13 -0
  49. package/dist/cjs/f/fields/V2/RatingsInput/styles.scss +48 -0
  50. package/dist/cjs/f/fields/V2/SelectInput/SelectInput.js +154 -0
  51. package/dist/cjs/f/fields/V2/SelectInput/index.js +13 -0
  52. package/dist/cjs/f/fields/V2/SelectInput/styles.scss +87 -0
  53. package/dist/cjs/f/fields/V2/TextInput/TextInput.js +155 -0
  54. package/dist/cjs/f/fields/V2/TextInput/index.js +13 -0
  55. package/dist/cjs/f/fields/V2/TextInput/styles.scss +78 -0
  56. package/dist/cjs/f/fields/V2/TextareaInput/TextareaInput.js +152 -0
  57. package/dist/cjs/f/fields/V2/TextareaInput/index.js +13 -0
  58. package/dist/cjs/f/fields/V2/TextareaInput/styles.scss +53 -0
  59. package/dist/cjs/f/fields/V2/index.js +82 -0
  60. package/dist/cjs/f/fields/index.js +26 -1
  61. package/dist/es/a/TextSteps/TextSteps.js +4 -4
  62. package/dist/es/a/TextSteps/styles.scss +1 -1
  63. package/dist/es/f/FormInput/FormInput.js +33 -3
  64. package/dist/es/f/common/V2/Description/Description.js +68 -0
  65. package/dist/es/f/common/V2/Description/index.js +2 -0
  66. package/dist/es/f/common/V2/Description/styles.scss +10 -0
  67. package/dist/es/f/common/V2/Label/Label.js +76 -0
  68. package/dist/es/f/common/V2/Label/index.js +2 -0
  69. package/dist/es/f/common/V2/Label/styles.scss +9 -0
  70. package/dist/es/f/common/V2/index.js +2 -0
  71. package/dist/es/f/common/index.js +2 -1
  72. package/dist/es/f/fields/V2/Checkbox/Checkbox.js +114 -0
  73. package/dist/es/f/fields/V2/Checkbox/index.js +2 -0
  74. package/dist/es/f/fields/V2/Checkbox/styles.scss +16 -0
  75. package/dist/es/f/fields/V2/ChoicesInput/ChoicesInput.js +148 -0
  76. package/dist/es/f/fields/V2/ChoicesInput/common/Choice/Choice.js +97 -0
  77. package/dist/es/f/fields/V2/ChoicesInput/common/Choice/index.js +2 -0
  78. package/dist/es/f/fields/V2/ChoicesInput/common/index.js +1 -0
  79. package/dist/es/f/fields/V2/ChoicesInput/index.js +2 -0
  80. package/dist/es/f/fields/V2/ChoicesInput/styles.scss +79 -0
  81. package/dist/es/f/fields/V2/EditorInput/EditorInput.js +192 -0
  82. package/dist/es/f/fields/V2/EditorInput/common/Toolbar.js +246 -0
  83. package/dist/es/f/fields/V2/EditorInput/common/TreeViewPlugin.js +11 -0
  84. package/dist/es/f/fields/V2/EditorInput/common/index.js +2 -0
  85. package/dist/es/f/fields/V2/EditorInput/index.js +2 -0
  86. package/dist/es/f/fields/V2/EditorInput/styles.scss +149 -0
  87. package/dist/es/f/fields/V2/LinkInput/LinkInput.js +148 -0
  88. package/dist/es/f/fields/V2/LinkInput/index.js +2 -0
  89. package/dist/es/f/fields/V2/LinkInput/styles.scss +90 -0
  90. package/dist/es/f/fields/V2/QueryChoices/QueryChoices.js +126 -0
  91. package/dist/es/f/fields/V2/QueryChoices/index.js +2 -0
  92. package/dist/es/f/fields/V2/QueryCombobox/QueryCombobox.js +221 -0
  93. package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +229 -0
  94. package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/index.js +2 -0
  95. package/dist/es/f/fields/V2/QueryCombobox/common/Menu/Menu.js +73 -0
  96. package/dist/es/f/fields/V2/QueryCombobox/common/Menu/index.js +2 -0
  97. package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +293 -0
  98. package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +2 -0
  99. package/dist/es/f/fields/V2/QueryCombobox/common/index.js +3 -0
  100. package/dist/es/f/fields/V2/QueryCombobox/index.js +2 -0
  101. package/dist/es/f/fields/V2/QueryCombobox/styles.scss +127 -0
  102. package/dist/es/f/fields/V2/QuerySelect/QuerySelect.js +186 -0
  103. package/dist/es/f/fields/V2/QuerySelect/index.js +2 -0
  104. package/dist/es/f/fields/V2/RatingsInput/RatingsInput.js +124 -0
  105. package/dist/es/f/fields/V2/RatingsInput/common/Rating/Rating.js +109 -0
  106. package/dist/es/f/fields/V2/RatingsInput/common/Rating/index.js +2 -0
  107. package/dist/es/f/fields/V2/RatingsInput/common/index.js +1 -0
  108. package/dist/es/f/fields/V2/RatingsInput/index.js +2 -0
  109. package/dist/es/f/fields/V2/RatingsInput/styles.scss +48 -0
  110. package/dist/es/f/fields/V2/SelectInput/SelectInput.js +146 -0
  111. package/dist/es/f/fields/V2/SelectInput/index.js +2 -0
  112. package/dist/es/f/fields/V2/SelectInput/styles.scss +87 -0
  113. package/dist/es/f/fields/V2/TextInput/TextInput.js +147 -0
  114. package/dist/es/f/fields/V2/TextInput/index.js +2 -0
  115. package/dist/es/f/fields/V2/TextInput/styles.scss +78 -0
  116. package/dist/es/f/fields/V2/TextareaInput/TextareaInput.js +146 -0
  117. package/dist/es/f/fields/V2/TextareaInput/index.js +2 -0
  118. package/dist/es/f/fields/V2/TextareaInput/styles.scss +53 -0
  119. package/dist/es/f/fields/V2/index.js +11 -0
  120. package/dist/es/f/fields/index.js +2 -1
  121. package/package.json +3 -3
  122. package/src/stories/f/v2/Checkbox.stories.jsx +102 -0
  123. package/src/stories/f/v2/ChoicesInput.stories.jsx +139 -0
  124. package/src/stories/f/v2/EditorInput.stories.jsx +81 -0
  125. package/src/stories/f/v2/LinkInput.stories.jsx +93 -0
  126. package/src/stories/f/v2/QueryChoices.stories.jsx +144 -0
  127. package/src/stories/f/v2/QueryCombobox.stories.jsx +301 -0
  128. package/src/stories/f/v2/QuerySelect.stories.jsx +150 -0
  129. package/src/stories/f/v2/RatingsInput.stories.jsx +77 -0
  130. package/src/stories/f/v2/SelectInput.stories.jsx +95 -0
  131. package/src/stories/f/v2/TextInput.stories.jsx +120 -0
  132. package/src/stories/f/v2/TextareaInput.stories.jsx +107 -0
  133. package/src/stories/f/v2/__generated__/FormInputAllTaskStatusesQuery.graphql.js +122 -0
  134. package/src/stories/f/v2/__generated__/FormInputAllTeamsQuery.graphql.js +139 -0
  135. package/src/stories/f/v2/__generated__/QueryChoicesAllTaskStatusesQuery.graphql.js +122 -0
  136. package/src/stories/f/v2/__generated__/QueryComboboxAllTeamsQuery.graphql.js +139 -0
  137. package/src/stories/f/v2/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +122 -0
  138. package/src/ui/a/TextSteps/TextSteps.jsx +4 -4
  139. package/src/ui/a/TextSteps/styles.scss +1 -1
  140. package/src/ui/f/FormInput/FormInput.jsx +57 -12
  141. package/src/ui/f/common/V2/Description/Description.jsx +94 -0
  142. package/src/ui/f/common/V2/Description/index.js +2 -0
  143. package/src/ui/f/common/V2/Description/styles.scss +10 -0
  144. package/src/ui/f/common/V2/Label/Label.jsx +102 -0
  145. package/src/ui/f/common/V2/Label/index.js +2 -0
  146. package/src/ui/f/common/V2/Label/styles.scss +9 -0
  147. package/src/ui/f/common/V2/index.js +2 -0
  148. package/src/ui/f/common/index.js +1 -0
  149. package/src/ui/f/fields/V2/Checkbox/Checkbox.jsx +146 -0
  150. package/src/ui/f/fields/V2/Checkbox/index.js +2 -0
  151. package/src/ui/f/fields/V2/Checkbox/styles.scss +16 -0
  152. package/src/ui/f/fields/V2/ChoicesInput/ChoicesInput.jsx +183 -0
  153. package/src/ui/f/fields/V2/ChoicesInput/common/Choice/Choice.jsx +125 -0
  154. package/src/ui/f/fields/V2/ChoicesInput/common/Choice/index.js +2 -0
  155. package/src/ui/f/fields/V2/ChoicesInput/common/index.js +1 -0
  156. package/src/ui/f/fields/V2/ChoicesInput/index.js +2 -0
  157. package/src/ui/f/fields/V2/ChoicesInput/styles.scss +79 -0
  158. package/src/ui/f/fields/V2/EditorInput/EditorInput.jsx +244 -0
  159. package/src/ui/f/fields/V2/EditorInput/common/Toolbar.jsx +356 -0
  160. package/src/ui/f/fields/V2/EditorInput/common/TreeViewPlugin.jsx +16 -0
  161. package/src/ui/f/fields/V2/EditorInput/common/index.jsx +2 -0
  162. package/src/ui/f/fields/V2/EditorInput/index.js +2 -0
  163. package/src/ui/f/fields/V2/EditorInput/styles.scss +149 -0
  164. package/src/ui/f/fields/V2/LinkInput/LinkInput.jsx +187 -0
  165. package/src/ui/f/fields/V2/LinkInput/index.js +2 -0
  166. package/src/ui/f/fields/V2/LinkInput/styles.scss +90 -0
  167. package/src/ui/f/fields/V2/QueryChoices/QueryChoices.jsx +153 -0
  168. package/src/ui/f/fields/V2/QueryChoices/index.js +2 -0
  169. package/src/ui/f/fields/V2/QueryCombobox/QueryCombobox.jsx +254 -0
  170. package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/Combobox.jsx +276 -0
  171. package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/index.js +2 -0
  172. package/src/ui/f/fields/V2/QueryCombobox/common/Menu/Menu.jsx +103 -0
  173. package/src/ui/f/fields/V2/QueryCombobox/common/Menu/index.js +2 -0
  174. package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +362 -0
  175. package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +2 -0
  176. package/src/ui/f/fields/V2/QueryCombobox/common/index.js +3 -0
  177. package/src/ui/f/fields/V2/QueryCombobox/index.js +2 -0
  178. package/src/ui/f/fields/V2/QueryCombobox/styles.scss +127 -0
  179. package/src/ui/f/fields/V2/QuerySelect/QuerySelect.jsx +220 -0
  180. package/src/ui/f/fields/V2/QuerySelect/index.js +2 -0
  181. package/src/ui/f/fields/V2/RatingsInput/RatingsInput.jsx +152 -0
  182. package/src/ui/f/fields/V2/RatingsInput/common/Rating/Rating.jsx +142 -0
  183. package/src/ui/f/fields/V2/RatingsInput/common/Rating/index.js +2 -0
  184. package/src/ui/f/fields/V2/RatingsInput/common/index.js +1 -0
  185. package/src/ui/f/fields/V2/RatingsInput/index.js +2 -0
  186. package/src/ui/f/fields/V2/RatingsInput/styles.scss +48 -0
  187. package/src/ui/f/fields/V2/SelectInput/SelectInput.jsx +187 -0
  188. package/src/ui/f/fields/V2/SelectInput/index.js +2 -0
  189. package/src/ui/f/fields/V2/SelectInput/styles.scss +87 -0
  190. package/src/ui/f/fields/V2/TextInput/TextInput.jsx +192 -0
  191. package/src/ui/f/fields/V2/TextInput/index.js +2 -0
  192. package/src/ui/f/fields/V2/TextInput/styles.scss +78 -0
  193. package/src/ui/f/fields/V2/TextareaInput/TextareaInput.jsx +180 -0
  194. package/src/ui/f/fields/V2/TextareaInput/index.js +2 -0
  195. package/src/ui/f/fields/V2/TextareaInput/styles.scss +53 -0
  196. package/src/ui/f/fields/V2/index.js +11 -0
  197. package/src/ui/f/fields/index.js +1 -0
  198. package/tests/__snapshots__/Storyshots.test.js.snap +5910 -1
@@ -0,0 +1,53 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@pareto-engineering/styles/src/mixins";
5
+ @use "@pareto-engineering/styles/src/globals" as *;
6
+
7
+ $default-padding: .55em .75em;
8
+ $default-border: 1px solid var(--outline-inputs);
9
+ $default-input-border-radius: var(--theme-default-input-border-radius);
10
+ $default-border: var(--theme-default-input-border);
11
+ $hover-border: var(--theme-hover-input-border);
12
+ $focus-border: var(--theme-focus-input-border);
13
+ $default-background: var(--background-inputs);
14
+ $disabled-background: var(--background-inputs-30);
15
+
16
+ .#{bem.$base}.text-area-input {
17
+ display: flex;
18
+ flex-direction: column;
19
+
20
+ > .#{bem.$base}.form-label {
21
+ margin-bottom: var(--gap);
22
+ }
23
+
24
+
25
+ > .textarea {
26
+ background: $default-background;
27
+ border: $default-border;
28
+ border-radius: $default-input-border-radius;
29
+ color: var(--y);
30
+ outline: none;
31
+ padding: $default-padding;
32
+ width: 100%;
33
+
34
+ &::placeholder {
35
+ color: var(--metadata);
36
+ }
37
+
38
+ &:disabled {
39
+ background-color: $disabled-background;
40
+ }
41
+
42
+ &:not(:disabled) {
43
+ &:hover,
44
+ &:active {
45
+ border: $hover-border;
46
+ }
47
+
48
+ &:focus {
49
+ border: $focus-border;
50
+ }
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "CheckboxV2", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Checkbox.Checkbox;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "ChoicesInputV2", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _ChoicesInput.ChoicesInput;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "EditorInputV2", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _EditorInput.EditorInput;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "LinkInputV2", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _LinkInput.LinkInput;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "QueryChoicesV2", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _QueryChoices.QueryChoices;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "QueryComboboxV2", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _QueryCombobox.QueryCombobox;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "QuerySelectV2", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _QuerySelect.QuerySelect;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "RatingsInputV2", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _RatingsInput.RatingsInput;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "SelectInputV2", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _SelectInput.SelectInput;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "TextInputV2", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _TextInput.TextInput;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "TextareaInputV2", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _TextareaInput.TextareaInput;
70
+ }
71
+ });
72
+ var _TextInput = require("./TextInput");
73
+ var _SelectInput = require("./SelectInput");
74
+ var _ChoicesInput = require("./ChoicesInput");
75
+ var _TextareaInput = require("./TextareaInput");
76
+ var _RatingsInput = require("./RatingsInput");
77
+ var _QueryCombobox = require("./QueryCombobox");
78
+ var _QuerySelect = require("./QuerySelect");
79
+ var _Checkbox = require("./Checkbox");
80
+ var _QueryChoices = require("./QueryChoices");
81
+ var _LinkInput = require("./LinkInput");
82
+ var _EditorInput = require("./EditorInput");
@@ -3,6 +3,19 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _exportNames = {
7
+ TextInput: true,
8
+ SelectInput: true,
9
+ ChoicesInput: true,
10
+ TextareaInput: true,
11
+ RatingsInput: true,
12
+ QueryCombobox: true,
13
+ QuerySelect: true,
14
+ Checkbox: true,
15
+ QueryChoices: true,
16
+ LinkInput: true,
17
+ EditorInput: true
18
+ };
6
19
  Object.defineProperty(exports, "Checkbox", {
7
20
  enumerable: true,
8
21
  get: function () {
@@ -79,4 +92,16 @@ var _QuerySelect = require("./QuerySelect");
79
92
  var _Checkbox = require("./Checkbox");
80
93
  var _QueryChoices = require("./QueryChoices");
81
94
  var _LinkInput = require("./LinkInput");
82
- var _EditorInput = require("./EditorInput");
95
+ var _EditorInput = require("./EditorInput");
96
+ var _V = require("./V2");
97
+ Object.keys(_V).forEach(function (key) {
98
+ if (key === "default" || key === "__esModule") return;
99
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
100
+ if (key in exports && exports[key] === _V[key]) return;
101
+ Object.defineProperty(exports, key, {
102
+ enumerable: true,
103
+ get: function () {
104
+ return _V[key];
105
+ }
106
+ });
107
+ });
@@ -6,12 +6,12 @@ import "./styles.scss";
6
6
  // Local Definitions
7
7
 
8
8
  const baseClassName = styleNames.base;
9
- const componentClassName = 'steps';
9
+ const componentClassName = 'text-steps';
10
10
 
11
11
  /**
12
12
  * This is the component description.
13
13
  */
14
- const Steps = ({
14
+ const TextSteps = ({
15
15
  id,
16
16
  className: userClassName,
17
17
  style,
@@ -28,7 +28,7 @@ const Steps = ({
28
28
  }, /*#__PURE__*/React.createElement("p", null, i + 1)), /*#__PURE__*/React.createElement("div", {
29
29
  className: " description"
30
30
  }, /*#__PURE__*/React.createElement("p", null, item)))));
31
- Steps.propTypes = {
31
+ TextSteps.propTypes = {
32
32
  /**
33
33
  * The HTML id for this element
34
34
  */
@@ -53,4 +53,4 @@ Steps.propTypes = {
53
53
  */
54
54
  title: PropTypes.string
55
55
  };
56
- export default Steps;
56
+ export default TextSteps;
@@ -6,7 +6,7 @@
6
6
 
7
7
  $default-padding: 1em;
8
8
 
9
- .#{bem.$base}.steps {
9
+ .#{bem.$base}.text-steps {
10
10
  grid-column: 1 / -1;
11
11
  grid-template-columns: repeat(var(--columns), 1fr);
12
12
  padding: $default-padding 0;
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
3
3
  import * as React from 'react';
4
4
  import { memo } from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import { TextInput, TextareaInput, ChoicesInput, SelectInput, QueryCombobox, QuerySelect, RatingsInput, Checkbox, QueryChoices, LinkInput, EditorInput } from "../fields";
6
+ import { TextInput as TextInputV1, TextareaInput as TextareaInputV1, ChoicesInput as ChoicesInputV1, SelectInput as SelectInputV1, QueryCombobox as QueryComboboxV1, QuerySelect as QuerySelectV1, RatingsInput as RatingsInputV1, Checkbox as CheckboxV1, QueryChoices as QueryChoicesV1, LinkInput as LinkInputV1, EditorInput as EditorInputV1, TextInputV2, TextareaInputV2, ChoicesInputV2, SelectInputV2, QueryComboboxV2, QuerySelectV2, RatingsInputV2, CheckboxV2, QueryChoicesV2, LinkInputV2, EditorInputV2 } from "../fields";
7
7
  import "./styles.scss";
8
8
 
9
9
  // Local Definitions
@@ -20,9 +20,34 @@ const FormInput = ({
20
20
  type,
21
21
  extraTypes,
22
22
  disabled,
23
+ isVersionTwo,
23
24
  ...otherProps
24
25
  }) => {
25
26
  const newClassName = [className, componentClassName].filter(Boolean).join(' ');
27
+ let TextInput = TextInputV1;
28
+ let TextareaInput = TextareaInputV1;
29
+ let ChoicesInput = ChoicesInputV1;
30
+ let SelectInput = SelectInputV1;
31
+ let QueryCombobox = QueryComboboxV1;
32
+ let QuerySelect = QuerySelectV1;
33
+ let RatingsInput = RatingsInputV1;
34
+ let Checkbox = CheckboxV1;
35
+ let QueryChoices = QueryChoicesV1;
36
+ let LinkInput = LinkInputV1;
37
+ let EditorInput = EditorInputV1;
38
+ if (isVersionTwo) {
39
+ TextInput = TextInputV2;
40
+ TextareaInput = TextareaInputV2;
41
+ ChoicesInput = ChoicesInputV2;
42
+ SelectInput = SelectInputV2;
43
+ QueryCombobox = QueryComboboxV2;
44
+ QuerySelect = QuerySelectV2;
45
+ RatingsInput = RatingsInputV2;
46
+ Checkbox = CheckboxV2;
47
+ QueryChoices = QueryChoicesV2;
48
+ LinkInput = LinkInputV2;
49
+ EditorInput = EditorInputV2;
50
+ }
26
51
  if (type === 'textarea') {
27
52
  return /*#__PURE__*/React.createElement(TextareaInput, _extends({
28
53
  className: newClassName,
@@ -113,9 +138,14 @@ FormInput.propTypes = {
113
138
  /**
114
139
  * Whether the Form input input should be disabled
115
140
  */
116
- disabled: PropTypes.bool
141
+ disabled: PropTypes.bool,
142
+ /**
143
+ * Whethe the Form input is version 2
144
+ */
145
+ isVersionTwo: PropTypes.bool
117
146
  };
118
147
  FormInput.defaultProps = {
119
- disabled: false
148
+ disabled: false,
149
+ isVersionTwo: false
120
150
  };
121
151
  export default /*#__PURE__*/memo(FormInput);
@@ -0,0 +1,68 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react';
3
+ import { useInsertionEffect } from 'react';
4
+ import { useField } from 'formik';
5
+ import PropTypes from 'prop-types';
6
+ import styleNames from '@pareto-engineering/bem/exports';
7
+
8
+ // Local Definitions
9
+
10
+ const baseClassName = styleNames.base;
11
+ const componentClassName = 'description';
12
+
13
+ /**
14
+ * This is the component description.
15
+ */
16
+ const Description = ({
17
+ id,
18
+ className: userClassName,
19
+ style,
20
+ description,
21
+ name,
22
+ color
23
+ // ...otherProps
24
+ }) => {
25
+ useInsertionEffect(() => {
26
+ import("./styles.scss");
27
+ }, []);
28
+ const [, meta] = useField(name);
29
+ const hasError = meta.touched && meta.error;
30
+ if (hasError || description) {
31
+ return /*#__PURE__*/React.createElement("div", {
32
+ id: id,
33
+ className: [baseClassName, componentClassName, userClassName, hasError ? 'x-error' : `x-${color}`].filter(e => e).join(' '),
34
+ style: style
35
+ }, hasError ? meta.error : description);
36
+ }
37
+ return null;
38
+ };
39
+ Description.propTypes = {
40
+ /**
41
+ * The HTML id for this element
42
+ */
43
+ id: PropTypes.string,
44
+ /**
45
+ * The HTML class names for this element
46
+ */
47
+ className: PropTypes.string,
48
+ /**
49
+ * The React-written, css properties for this element.
50
+ */
51
+ style: PropTypes.objectOf(PropTypes.string),
52
+ /**
53
+ * The base color for the description
54
+ */
55
+ color: PropTypes.string,
56
+ /**
57
+ * Input description - extra description to guide a use in filling the input
58
+ */
59
+ description: PropTypes.string,
60
+ /**
61
+ * The input name (html - and Formik state)
62
+ */
63
+ name: PropTypes.string.isRequired
64
+ };
65
+ Description.defaultProps = {
66
+ color: 'metadata'
67
+ };
68
+ export default Description;
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as Description } from "./Description";
@@ -0,0 +1,10 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+
5
+
6
+ .#{bem.$base}.description {
7
+ color: var(--x);
8
+ }
9
+
10
+
@@ -0,0 +1,76 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react';
3
+ import { useInsertionEffect } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import styleNames from '@pareto-engineering/bem/exports';
6
+
7
+ // Local Definitions
8
+
9
+ const baseClassName = styleNames.base;
10
+ const componentClassName = 'form-label';
11
+
12
+ /**
13
+ * This is the component description.
14
+ */
15
+ const Label = ({
16
+ id,
17
+ className: userClassName,
18
+ style,
19
+ children,
20
+ name,
21
+ color,
22
+ optional,
23
+ as: Wrapper
24
+ // ...otherProps
25
+ }) => {
26
+ useInsertionEffect(() => {
27
+ import("./styles.scss");
28
+ }, []);
29
+ return /*#__PURE__*/React.createElement(Wrapper, {
30
+ htmlFor: Wrapper === 'label' ? name : undefined,
31
+ id: id,
32
+ className: [baseClassName, componentClassName, userClassName, `x-${color}`].filter(e => e).join(' '),
33
+ style: style
34
+ // {...otherProps}
35
+ }, children, optional && ' (Optional)');
36
+ };
37
+ Label.propTypes = {
38
+ /**
39
+ * The HTML id for this element
40
+ */
41
+ id: PropTypes.string,
42
+ /**
43
+ * The HTML class names for this element
44
+ */
45
+ className: PropTypes.string,
46
+ /**
47
+ * The React-written, css properties for this element.
48
+ */
49
+ style: PropTypes.objectOf(PropTypes.string),
50
+ /**
51
+ * The children JSX
52
+ */
53
+ children: PropTypes.node,
54
+ /**
55
+ * The name of the input label
56
+ */
57
+ name: PropTypes.string,
58
+ /**
59
+ * The html tag that acts as an input label
60
+ */
61
+ as: PropTypes.node,
62
+ /**
63
+ * The default color of the label
64
+ */
65
+ color: PropTypes.string,
66
+ /**
67
+ * Whether the input should have an optional tag
68
+ */
69
+ optional: PropTypes.bool
70
+ };
71
+ Label.defaultProps = {
72
+ as: 'label',
73
+ color: 'paragraph',
74
+ optional: false
75
+ };
76
+ export default Label;
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as Label } from "./Label";
@@ -0,0 +1,9 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@pareto-engineering/styles/src/mixins";
5
+ @use "@pareto-engineering/styles/src/globals" as *;
6
+
7
+ .#{bem.$base}.form-label {
8
+ color: var(--x);
9
+ }
@@ -0,0 +1,2 @@
1
+ export { Label as FormLabelV2 } from "./Label";
2
+ export { Description as FormDescriptionV2 } from "./Description";
@@ -2,4 +2,5 @@ export { Label as FormLabel } from "./Label";
2
2
  export { Description as FormDescription } from "./Description";
3
3
  export { Debugger as FormDebugger } from "./Debugger";
4
4
  export { InputWrapper } from "./InputWrapper";
5
- export * from "./utils";
5
+ export * from "./utils";
6
+ export * from "./V2";
@@ -0,0 +1,114 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ /* @pareto-engineering/generator-front 1.0.12 */
3
+ import * as React from 'react';
4
+ import { useInsertionEffect } from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import styleNames from '@pareto-engineering/bem/exports';
7
+ import { useField } from 'formik';
8
+ import { FormLabelV2, FormDescriptionV2 } from "../../../common";
9
+
10
+ // Local Definitions
11
+
12
+ const baseClassName = styleNames.base;
13
+ const componentClassName = 'checkbox';
14
+
15
+ /**
16
+ * This is the component description.
17
+ */
18
+ const Checkbox = ({
19
+ id,
20
+ className: userClassName,
21
+ style,
22
+ name,
23
+ label,
24
+ description,
25
+ disabled,
26
+ optional,
27
+ labelColor
28
+ // ...otherProps
29
+ }) => {
30
+ useInsertionEffect(() => {
31
+ import("./styles.scss");
32
+ }, []);
33
+ const [field] = useField({
34
+ name,
35
+ type: 'checkbox'
36
+ });
37
+ return /*#__PURE__*/React.createElement("div", {
38
+ id: id,
39
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
40
+ style: style
41
+ }, label && /*#__PURE__*/React.createElement(FormLabelV2, {
42
+ name: name,
43
+ color: labelColor,
44
+ optional: optional
45
+ // {...otherProps}
46
+ }, label), /*#__PURE__*/React.createElement("input", _extends({
47
+ id: name,
48
+ className: "input",
49
+ type: "checkbox",
50
+ disabled: disabled
51
+ }, field)), /*#__PURE__*/React.createElement(FormDescriptionV2, {
52
+ className: "s-1",
53
+ description: description,
54
+ name: name
55
+ }));
56
+ };
57
+ Checkbox.propTypes = {
58
+ /**
59
+ * The HTML id for this element
60
+ */
61
+ id: PropTypes.string,
62
+ /**
63
+ * The HTML class names for this element
64
+ */
65
+ className: PropTypes.string,
66
+ /**
67
+ * The React-written, css properties for this element.
68
+ */
69
+ style: PropTypes.objectOf(PropTypes.string),
70
+ /**
71
+ * The input name (html - and Formik state)
72
+ */
73
+ name: PropTypes.string.isRequired,
74
+ /**
75
+ * The Input description to guide the user if it's not obvious
76
+ */
77
+ description: PropTypes.string,
78
+ /**
79
+ * Whether the input should be disabled
80
+ */
81
+ disabled: PropTypes.bool,
82
+ /**
83
+ * The color of the label
84
+ */
85
+ labelColor: PropTypes.string,
86
+ /**
87
+ * The input label
88
+ */
89
+ label: PropTypes.string,
90
+ /**
91
+ * The number of columns the label should span
92
+ */
93
+ labelSpan: PropTypes.number,
94
+ /**
95
+ * The number of columns the input should span
96
+ */
97
+ inputSpan: PropTypes.number,
98
+ /**
99
+ * The number of columns the label should span on desktop
100
+ */
101
+ desktopLabelSpan: PropTypes.number,
102
+ /**
103
+ * The number of columns the input should span on desktop
104
+ */
105
+ desktopInputSpan: PropTypes.number,
106
+ /**
107
+ * Whether the input should have an optional tag
108
+ */
109
+ optional: PropTypes.bool
110
+ };
111
+ Checkbox.defaultProps = {
112
+ disabled: false
113
+ };
114
+ export default Checkbox;
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as Checkbox } from "./Checkbox";
@@ -0,0 +1,16 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@pareto-engineering/styles/src/mixins";
5
+ @use "@pareto-engineering/styles/src/globals" as *;
6
+
7
+ .#{bem.$base}.checkbox {
8
+ align-items: flex-start;
9
+ display: flex;
10
+ flex-direction: column;
11
+ justify-content: center;
12
+
13
+ > .#{bem.$base}.form-label {
14
+ margin-bottom: var(--gap);
15
+ }
16
+ }