@pareto-engineering/design-system 4.0.0-alpha.62 → 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 (192) hide show
  1. package/dist/cjs/f/FormInput/FormInput.js +43 -13
  2. package/dist/cjs/f/common/V2/Description/Description.js +76 -0
  3. package/dist/cjs/f/common/V2/Description/index.js +13 -0
  4. package/dist/cjs/f/common/V2/Description/styles.scss +10 -0
  5. package/dist/cjs/f/common/V2/Label/Label.js +84 -0
  6. package/dist/cjs/f/common/V2/Label/index.js +13 -0
  7. package/dist/cjs/f/common/V2/Label/styles.scss +9 -0
  8. package/dist/cjs/f/common/V2/index.js +19 -0
  9. package/dist/cjs/f/common/index.js +12 -0
  10. package/dist/cjs/f/fields/V2/Checkbox/Checkbox.js +122 -0
  11. package/dist/cjs/f/fields/V2/Checkbox/index.js +13 -0
  12. package/dist/cjs/f/fields/V2/Checkbox/styles.scss +16 -0
  13. package/dist/cjs/f/fields/V2/ChoicesInput/ChoicesInput.js +154 -0
  14. package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/Choice.js +104 -0
  15. package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/index.js +13 -0
  16. package/dist/cjs/f/fields/V2/ChoicesInput/common/index.js +12 -0
  17. package/dist/cjs/f/fields/V2/ChoicesInput/index.js +13 -0
  18. package/dist/cjs/f/fields/V2/ChoicesInput/styles.scss +79 -0
  19. package/dist/cjs/f/fields/V2/EditorInput/EditorInput.js +197 -0
  20. package/dist/cjs/f/fields/V2/EditorInput/common/Toolbar.js +257 -0
  21. package/dist/cjs/f/fields/V2/EditorInput/common/TreeViewPlugin.js +18 -0
  22. package/dist/cjs/f/fields/V2/EditorInput/common/index.js +20 -0
  23. package/dist/cjs/f/fields/V2/EditorInput/index.js +13 -0
  24. package/dist/cjs/f/fields/V2/EditorInput/styles.scss +149 -0
  25. package/dist/cjs/f/fields/V2/LinkInput/LinkInput.js +156 -0
  26. package/dist/cjs/f/fields/V2/LinkInput/index.js +13 -0
  27. package/dist/cjs/f/fields/V2/LinkInput/styles.scss +90 -0
  28. package/dist/cjs/f/fields/V2/QueryChoices/QueryChoices.js +137 -0
  29. package/dist/cjs/f/fields/V2/QueryChoices/index.js +13 -0
  30. package/dist/cjs/f/fields/V2/QueryCombobox/QueryCombobox.js +229 -0
  31. package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +236 -0
  32. package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/index.js +13 -0
  33. package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/Menu.js +83 -0
  34. package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/index.js +13 -0
  35. package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +300 -0
  36. package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +13 -0
  37. package/dist/cjs/f/fields/V2/QueryCombobox/common/index.js +26 -0
  38. package/dist/cjs/f/fields/V2/QueryCombobox/index.js +13 -0
  39. package/dist/cjs/f/fields/V2/QueryCombobox/styles.scss +127 -0
  40. package/dist/cjs/f/fields/V2/QuerySelect/QuerySelect.js +198 -0
  41. package/dist/cjs/f/fields/V2/QuerySelect/index.js +13 -0
  42. package/dist/cjs/f/fields/V2/RatingsInput/RatingsInput.js +130 -0
  43. package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/Rating.js +117 -0
  44. package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/index.js +13 -0
  45. package/dist/cjs/f/fields/V2/RatingsInput/common/index.js +12 -0
  46. package/dist/cjs/f/fields/V2/RatingsInput/index.js +13 -0
  47. package/dist/cjs/f/fields/V2/RatingsInput/styles.scss +48 -0
  48. package/dist/cjs/f/fields/V2/SelectInput/SelectInput.js +154 -0
  49. package/dist/cjs/f/fields/V2/SelectInput/index.js +13 -0
  50. package/dist/cjs/f/fields/V2/SelectInput/styles.scss +87 -0
  51. package/dist/cjs/f/fields/V2/TextInput/TextInput.js +155 -0
  52. package/dist/cjs/f/fields/V2/TextInput/index.js +13 -0
  53. package/dist/cjs/f/fields/V2/TextInput/styles.scss +78 -0
  54. package/dist/cjs/f/fields/V2/TextareaInput/TextareaInput.js +152 -0
  55. package/dist/cjs/f/fields/V2/TextareaInput/index.js +13 -0
  56. package/dist/cjs/f/fields/V2/TextareaInput/styles.scss +53 -0
  57. package/dist/cjs/f/fields/V2/index.js +82 -0
  58. package/dist/cjs/f/fields/index.js +26 -1
  59. package/dist/es/f/FormInput/FormInput.js +33 -3
  60. package/dist/es/f/common/V2/Description/Description.js +68 -0
  61. package/dist/es/f/common/V2/Description/index.js +2 -0
  62. package/dist/es/f/common/V2/Description/styles.scss +10 -0
  63. package/dist/es/f/common/V2/Label/Label.js +76 -0
  64. package/dist/es/f/common/V2/Label/index.js +2 -0
  65. package/dist/es/f/common/V2/Label/styles.scss +9 -0
  66. package/dist/es/f/common/V2/index.js +2 -0
  67. package/dist/es/f/common/index.js +2 -1
  68. package/dist/es/f/fields/V2/Checkbox/Checkbox.js +114 -0
  69. package/dist/es/f/fields/V2/Checkbox/index.js +2 -0
  70. package/dist/es/f/fields/V2/Checkbox/styles.scss +16 -0
  71. package/dist/es/f/fields/V2/ChoicesInput/ChoicesInput.js +148 -0
  72. package/dist/es/f/fields/V2/ChoicesInput/common/Choice/Choice.js +97 -0
  73. package/dist/es/f/fields/V2/ChoicesInput/common/Choice/index.js +2 -0
  74. package/dist/es/f/fields/V2/ChoicesInput/common/index.js +1 -0
  75. package/dist/es/f/fields/V2/ChoicesInput/index.js +2 -0
  76. package/dist/es/f/fields/V2/ChoicesInput/styles.scss +79 -0
  77. package/dist/es/f/fields/V2/EditorInput/EditorInput.js +192 -0
  78. package/dist/es/f/fields/V2/EditorInput/common/Toolbar.js +246 -0
  79. package/dist/es/f/fields/V2/EditorInput/common/TreeViewPlugin.js +11 -0
  80. package/dist/es/f/fields/V2/EditorInput/common/index.js +2 -0
  81. package/dist/es/f/fields/V2/EditorInput/index.js +2 -0
  82. package/dist/es/f/fields/V2/EditorInput/styles.scss +149 -0
  83. package/dist/es/f/fields/V2/LinkInput/LinkInput.js +148 -0
  84. package/dist/es/f/fields/V2/LinkInput/index.js +2 -0
  85. package/dist/es/f/fields/V2/LinkInput/styles.scss +90 -0
  86. package/dist/es/f/fields/V2/QueryChoices/QueryChoices.js +126 -0
  87. package/dist/es/f/fields/V2/QueryChoices/index.js +2 -0
  88. package/dist/es/f/fields/V2/QueryCombobox/QueryCombobox.js +221 -0
  89. package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +229 -0
  90. package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/index.js +2 -0
  91. package/dist/es/f/fields/V2/QueryCombobox/common/Menu/Menu.js +73 -0
  92. package/dist/es/f/fields/V2/QueryCombobox/common/Menu/index.js +2 -0
  93. package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +293 -0
  94. package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +2 -0
  95. package/dist/es/f/fields/V2/QueryCombobox/common/index.js +3 -0
  96. package/dist/es/f/fields/V2/QueryCombobox/index.js +2 -0
  97. package/dist/es/f/fields/V2/QueryCombobox/styles.scss +127 -0
  98. package/dist/es/f/fields/V2/QuerySelect/QuerySelect.js +186 -0
  99. package/dist/es/f/fields/V2/QuerySelect/index.js +2 -0
  100. package/dist/es/f/fields/V2/RatingsInput/RatingsInput.js +124 -0
  101. package/dist/es/f/fields/V2/RatingsInput/common/Rating/Rating.js +109 -0
  102. package/dist/es/f/fields/V2/RatingsInput/common/Rating/index.js +2 -0
  103. package/dist/es/f/fields/V2/RatingsInput/common/index.js +1 -0
  104. package/dist/es/f/fields/V2/RatingsInput/index.js +2 -0
  105. package/dist/es/f/fields/V2/RatingsInput/styles.scss +48 -0
  106. package/dist/es/f/fields/V2/SelectInput/SelectInput.js +146 -0
  107. package/dist/es/f/fields/V2/SelectInput/index.js +2 -0
  108. package/dist/es/f/fields/V2/SelectInput/styles.scss +87 -0
  109. package/dist/es/f/fields/V2/TextInput/TextInput.js +147 -0
  110. package/dist/es/f/fields/V2/TextInput/index.js +2 -0
  111. package/dist/es/f/fields/V2/TextInput/styles.scss +78 -0
  112. package/dist/es/f/fields/V2/TextareaInput/TextareaInput.js +146 -0
  113. package/dist/es/f/fields/V2/TextareaInput/index.js +2 -0
  114. package/dist/es/f/fields/V2/TextareaInput/styles.scss +53 -0
  115. package/dist/es/f/fields/V2/index.js +11 -0
  116. package/dist/es/f/fields/index.js +2 -1
  117. package/package.json +3 -3
  118. package/src/stories/f/v2/Checkbox.stories.jsx +102 -0
  119. package/src/stories/f/v2/ChoicesInput.stories.jsx +139 -0
  120. package/src/stories/f/v2/EditorInput.stories.jsx +81 -0
  121. package/src/stories/f/v2/LinkInput.stories.jsx +93 -0
  122. package/src/stories/f/v2/QueryChoices.stories.jsx +144 -0
  123. package/src/stories/f/v2/QueryCombobox.stories.jsx +301 -0
  124. package/src/stories/f/v2/QuerySelect.stories.jsx +150 -0
  125. package/src/stories/f/v2/RatingsInput.stories.jsx +77 -0
  126. package/src/stories/f/v2/SelectInput.stories.jsx +95 -0
  127. package/src/stories/f/v2/TextInput.stories.jsx +120 -0
  128. package/src/stories/f/v2/TextareaInput.stories.jsx +107 -0
  129. package/src/stories/f/v2/__generated__/FormInputAllTaskStatusesQuery.graphql.js +122 -0
  130. package/src/stories/f/v2/__generated__/FormInputAllTeamsQuery.graphql.js +139 -0
  131. package/src/stories/f/v2/__generated__/QueryChoicesAllTaskStatusesQuery.graphql.js +122 -0
  132. package/src/stories/f/v2/__generated__/QueryComboboxAllTeamsQuery.graphql.js +139 -0
  133. package/src/stories/f/v2/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +122 -0
  134. package/src/ui/f/FormInput/FormInput.jsx +57 -12
  135. package/src/ui/f/common/V2/Description/Description.jsx +94 -0
  136. package/src/ui/f/common/V2/Description/index.js +2 -0
  137. package/src/ui/f/common/V2/Description/styles.scss +10 -0
  138. package/src/ui/f/common/V2/Label/Label.jsx +102 -0
  139. package/src/ui/f/common/V2/Label/index.js +2 -0
  140. package/src/ui/f/common/V2/Label/styles.scss +9 -0
  141. package/src/ui/f/common/V2/index.js +2 -0
  142. package/src/ui/f/common/index.js +1 -0
  143. package/src/ui/f/fields/V2/Checkbox/Checkbox.jsx +146 -0
  144. package/src/ui/f/fields/V2/Checkbox/index.js +2 -0
  145. package/src/ui/f/fields/V2/Checkbox/styles.scss +16 -0
  146. package/src/ui/f/fields/V2/ChoicesInput/ChoicesInput.jsx +183 -0
  147. package/src/ui/f/fields/V2/ChoicesInput/common/Choice/Choice.jsx +125 -0
  148. package/src/ui/f/fields/V2/ChoicesInput/common/Choice/index.js +2 -0
  149. package/src/ui/f/fields/V2/ChoicesInput/common/index.js +1 -0
  150. package/src/ui/f/fields/V2/ChoicesInput/index.js +2 -0
  151. package/src/ui/f/fields/V2/ChoicesInput/styles.scss +79 -0
  152. package/src/ui/f/fields/V2/EditorInput/EditorInput.jsx +244 -0
  153. package/src/ui/f/fields/V2/EditorInput/common/Toolbar.jsx +356 -0
  154. package/src/ui/f/fields/V2/EditorInput/common/TreeViewPlugin.jsx +16 -0
  155. package/src/ui/f/fields/V2/EditorInput/common/index.jsx +2 -0
  156. package/src/ui/f/fields/V2/EditorInput/index.js +2 -0
  157. package/src/ui/f/fields/V2/EditorInput/styles.scss +149 -0
  158. package/src/ui/f/fields/V2/LinkInput/LinkInput.jsx +187 -0
  159. package/src/ui/f/fields/V2/LinkInput/index.js +2 -0
  160. package/src/ui/f/fields/V2/LinkInput/styles.scss +90 -0
  161. package/src/ui/f/fields/V2/QueryChoices/QueryChoices.jsx +153 -0
  162. package/src/ui/f/fields/V2/QueryChoices/index.js +2 -0
  163. package/src/ui/f/fields/V2/QueryCombobox/QueryCombobox.jsx +254 -0
  164. package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/Combobox.jsx +276 -0
  165. package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/index.js +2 -0
  166. package/src/ui/f/fields/V2/QueryCombobox/common/Menu/Menu.jsx +103 -0
  167. package/src/ui/f/fields/V2/QueryCombobox/common/Menu/index.js +2 -0
  168. package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +362 -0
  169. package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +2 -0
  170. package/src/ui/f/fields/V2/QueryCombobox/common/index.js +3 -0
  171. package/src/ui/f/fields/V2/QueryCombobox/index.js +2 -0
  172. package/src/ui/f/fields/V2/QueryCombobox/styles.scss +127 -0
  173. package/src/ui/f/fields/V2/QuerySelect/QuerySelect.jsx +220 -0
  174. package/src/ui/f/fields/V2/QuerySelect/index.js +2 -0
  175. package/src/ui/f/fields/V2/RatingsInput/RatingsInput.jsx +152 -0
  176. package/src/ui/f/fields/V2/RatingsInput/common/Rating/Rating.jsx +142 -0
  177. package/src/ui/f/fields/V2/RatingsInput/common/Rating/index.js +2 -0
  178. package/src/ui/f/fields/V2/RatingsInput/common/index.js +1 -0
  179. package/src/ui/f/fields/V2/RatingsInput/index.js +2 -0
  180. package/src/ui/f/fields/V2/RatingsInput/styles.scss +48 -0
  181. package/src/ui/f/fields/V2/SelectInput/SelectInput.jsx +187 -0
  182. package/src/ui/f/fields/V2/SelectInput/index.js +2 -0
  183. package/src/ui/f/fields/V2/SelectInput/styles.scss +87 -0
  184. package/src/ui/f/fields/V2/TextInput/TextInput.jsx +192 -0
  185. package/src/ui/f/fields/V2/TextInput/index.js +2 -0
  186. package/src/ui/f/fields/V2/TextInput/styles.scss +78 -0
  187. package/src/ui/f/fields/V2/TextareaInput/TextareaInput.jsx +180 -0
  188. package/src/ui/f/fields/V2/TextareaInput/index.js +2 -0
  189. package/src/ui/f/fields/V2/TextareaInput/styles.scss +53 -0
  190. package/src/ui/f/fields/V2/index.js +11 -0
  191. package/src/ui/f/fields/index.js +1 -0
  192. package/tests/__snapshots__/Storyshots.test.js.snap +5909 -0
@@ -0,0 +1,139 @@
1
+ /**
2
+ * @flow
3
+ */
4
+
5
+ /* eslint-disable */
6
+
7
+ 'use strict';
8
+
9
+ /*::
10
+ import type { ConcreteRequest } from 'relay-runtime';
11
+ export type QueryComboboxAllTeamsQueryVariables = {|
12
+ name_Icontains?: ?string
13
+ |};
14
+ export type QueryComboboxAllTeamsQueryResponse = {|
15
+ +allTeams: ?{|
16
+ +edges: $ReadOnlyArray<?{|
17
+ +node: ?{|
18
+ +id: string,
19
+ +name: string,
20
+ |}
21
+ |}>
22
+ |}
23
+ |};
24
+ export type QueryComboboxAllTeamsQuery = {|
25
+ variables: QueryComboboxAllTeamsQueryVariables,
26
+ response: QueryComboboxAllTeamsQueryResponse,
27
+ |};
28
+ */
29
+
30
+
31
+ /*
32
+ query QueryComboboxAllTeamsQuery(
33
+ $name_Icontains: String
34
+ ) {
35
+ allTeams(name_Icontains: $name_Icontains) {
36
+ edges {
37
+ node {
38
+ id
39
+ name
40
+ }
41
+ }
42
+ }
43
+ }
44
+ */
45
+
46
+ const node/*: ConcreteRequest*/ = (function(){
47
+ var v0 = [
48
+ {
49
+ "defaultValue": null,
50
+ "kind": "LocalArgument",
51
+ "name": "name_Icontains"
52
+ }
53
+ ],
54
+ v1 = [
55
+ {
56
+ "alias": null,
57
+ "args": [
58
+ {
59
+ "kind": "Variable",
60
+ "name": "name_Icontains",
61
+ "variableName": "name_Icontains"
62
+ }
63
+ ],
64
+ "concreteType": "TeamNodeConnection",
65
+ "kind": "LinkedField",
66
+ "name": "allTeams",
67
+ "plural": false,
68
+ "selections": [
69
+ {
70
+ "alias": null,
71
+ "args": null,
72
+ "concreteType": "TeamNodeEdge",
73
+ "kind": "LinkedField",
74
+ "name": "edges",
75
+ "plural": true,
76
+ "selections": [
77
+ {
78
+ "alias": null,
79
+ "args": null,
80
+ "concreteType": "TeamNode",
81
+ "kind": "LinkedField",
82
+ "name": "node",
83
+ "plural": false,
84
+ "selections": [
85
+ {
86
+ "alias": null,
87
+ "args": null,
88
+ "kind": "ScalarField",
89
+ "name": "id",
90
+ "storageKey": null
91
+ },
92
+ {
93
+ "alias": null,
94
+ "args": null,
95
+ "kind": "ScalarField",
96
+ "name": "name",
97
+ "storageKey": null
98
+ }
99
+ ],
100
+ "storageKey": null
101
+ }
102
+ ],
103
+ "storageKey": null
104
+ }
105
+ ],
106
+ "storageKey": null
107
+ }
108
+ ];
109
+ return {
110
+ "fragment": {
111
+ "argumentDefinitions": (v0/*: any*/),
112
+ "kind": "Fragment",
113
+ "metadata": null,
114
+ "name": "QueryComboboxAllTeamsQuery",
115
+ "selections": (v1/*: any*/),
116
+ "type": "Query",
117
+ "abstractKey": null
118
+ },
119
+ "kind": "Request",
120
+ "operation": {
121
+ "argumentDefinitions": (v0/*: any*/),
122
+ "kind": "Operation",
123
+ "name": "QueryComboboxAllTeamsQuery",
124
+ "selections": (v1/*: any*/)
125
+ },
126
+ "params": {
127
+ "cacheID": "a507170c1616920d93ea7ceb061097d1",
128
+ "id": null,
129
+ "metadata": {},
130
+ "name": "QueryComboboxAllTeamsQuery",
131
+ "operationKind": "query",
132
+ "text": "query QueryComboboxAllTeamsQuery(\n $name_Icontains: String\n) {\n allTeams(name_Icontains: $name_Icontains) {\n edges {\n node {\n id\n name\n }\n }\n }\n}\n"
133
+ }
134
+ };
135
+ })();
136
+ // prettier-ignore
137
+ (node/*: any*/).hash = '243f007a2e8d0c359ad2976f1c68a472';
138
+
139
+ module.exports = node;
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @flow
3
+ */
4
+
5
+ /* eslint-disable */
6
+
7
+ 'use strict';
8
+
9
+ /*::
10
+ import type { ConcreteRequest } from 'relay-runtime';
11
+ export type QuerySelectAllTaskStatusesQueryVariables = {||};
12
+ export type QuerySelectAllTaskStatusesQueryResponse = {|
13
+ +allTaskStatuses: ?{|
14
+ +edges: $ReadOnlyArray<?{|
15
+ +node: ?{|
16
+ +id: string,
17
+ +status: string,
18
+ |}
19
+ |}>
20
+ |}
21
+ |};
22
+ export type QuerySelectAllTaskStatusesQuery = {|
23
+ variables: QuerySelectAllTaskStatusesQueryVariables,
24
+ response: QuerySelectAllTaskStatusesQueryResponse,
25
+ |};
26
+ */
27
+
28
+
29
+ /*
30
+ query QuerySelectAllTaskStatusesQuery {
31
+ allTaskStatuses {
32
+ edges {
33
+ node {
34
+ id
35
+ status
36
+ }
37
+ }
38
+ }
39
+ }
40
+ */
41
+
42
+ const node/*: ConcreteRequest*/ = (function(){
43
+ var v0 = [
44
+ {
45
+ "alias": null,
46
+ "args": null,
47
+ "concreteType": "TaskStatusNodeConnection",
48
+ "kind": "LinkedField",
49
+ "name": "allTaskStatuses",
50
+ "plural": false,
51
+ "selections": [
52
+ {
53
+ "alias": null,
54
+ "args": null,
55
+ "concreteType": "TaskStatusNodeEdge",
56
+ "kind": "LinkedField",
57
+ "name": "edges",
58
+ "plural": true,
59
+ "selections": [
60
+ {
61
+ "alias": null,
62
+ "args": null,
63
+ "concreteType": "TaskStatusNode",
64
+ "kind": "LinkedField",
65
+ "name": "node",
66
+ "plural": false,
67
+ "selections": [
68
+ {
69
+ "alias": null,
70
+ "args": null,
71
+ "kind": "ScalarField",
72
+ "name": "id",
73
+ "storageKey": null
74
+ },
75
+ {
76
+ "alias": null,
77
+ "args": null,
78
+ "kind": "ScalarField",
79
+ "name": "status",
80
+ "storageKey": null
81
+ }
82
+ ],
83
+ "storageKey": null
84
+ }
85
+ ],
86
+ "storageKey": null
87
+ }
88
+ ],
89
+ "storageKey": null
90
+ }
91
+ ];
92
+ return {
93
+ "fragment": {
94
+ "argumentDefinitions": [],
95
+ "kind": "Fragment",
96
+ "metadata": null,
97
+ "name": "QuerySelectAllTaskStatusesQuery",
98
+ "selections": (v0/*: any*/),
99
+ "type": "Query",
100
+ "abstractKey": null
101
+ },
102
+ "kind": "Request",
103
+ "operation": {
104
+ "argumentDefinitions": [],
105
+ "kind": "Operation",
106
+ "name": "QuerySelectAllTaskStatusesQuery",
107
+ "selections": (v0/*: any*/)
108
+ },
109
+ "params": {
110
+ "cacheID": "bd929dd60893f2a67f23d8cd2fb003de",
111
+ "id": null,
112
+ "metadata": {},
113
+ "name": "QuerySelectAllTaskStatusesQuery",
114
+ "operationKind": "query",
115
+ "text": "query QuerySelectAllTaskStatusesQuery {\n allTaskStatuses {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n"
116
+ }
117
+ };
118
+ })();
119
+ // prettier-ignore
120
+ (node/*: any*/).hash = '31d9d1e820e814f7cee8ef7b273074ab';
121
+
122
+ module.exports = node;
@@ -6,17 +6,28 @@ import { memo } from 'react'
6
6
  import PropTypes from 'prop-types'
7
7
 
8
8
  import {
9
- TextInput,
10
- TextareaInput,
11
- ChoicesInput,
12
- SelectInput,
13
- QueryCombobox,
14
- QuerySelect,
15
- RatingsInput,
16
- Checkbox,
17
- QueryChoices,
18
- LinkInput,
19
- EditorInput,
9
+ TextInput as TextInputV1,
10
+ TextareaInput as TextareaInputV1,
11
+ ChoicesInput as ChoicesInputV1,
12
+ SelectInput as SelectInputV1,
13
+ QueryCombobox as QueryComboboxV1,
14
+ QuerySelect as QuerySelectV1,
15
+ RatingsInput as RatingsInputV1,
16
+ Checkbox as CheckboxV1,
17
+ QueryChoices as QueryChoicesV1,
18
+ LinkInput as LinkInputV1,
19
+ EditorInput as EditorInputV1,
20
+ TextInputV2,
21
+ TextareaInputV2,
22
+ ChoicesInputV2,
23
+ SelectInputV2,
24
+ QueryComboboxV2,
25
+ QuerySelectV2,
26
+ RatingsInputV2,
27
+ CheckboxV2,
28
+ QueryChoicesV2,
29
+ LinkInputV2,
30
+ EditorInputV2,
20
31
  } from '../fields'
21
32
 
22
33
  import './styles.scss'
@@ -35,6 +46,7 @@ const FormInput = ({
35
46
  type,
36
47
  extraTypes,
37
48
  disabled,
49
+ isVersionTwo,
38
50
  ...otherProps
39
51
  }) => {
40
52
  const newClassName = [
@@ -42,6 +54,32 @@ const FormInput = ({
42
54
  componentClassName,
43
55
  ].filter(Boolean).join(' ')
44
56
 
57
+ let TextInput = TextInputV1
58
+ let TextareaInput = TextareaInputV1
59
+ let ChoicesInput = ChoicesInputV1
60
+ let SelectInput = SelectInputV1
61
+ let QueryCombobox = QueryComboboxV1
62
+ let QuerySelect = QuerySelectV1
63
+ let RatingsInput = RatingsInputV1
64
+ let Checkbox = CheckboxV1
65
+ let QueryChoices = QueryChoicesV1
66
+ let LinkInput = LinkInputV1
67
+ let EditorInput = EditorInputV1
68
+
69
+ if (isVersionTwo) {
70
+ TextInput = TextInputV2
71
+ TextareaInput = TextareaInputV2
72
+ ChoicesInput = ChoicesInputV2
73
+ SelectInput = SelectInputV2
74
+ QueryCombobox = QueryComboboxV2
75
+ QuerySelect = QuerySelectV2
76
+ RatingsInput = RatingsInputV2
77
+ Checkbox = CheckboxV2
78
+ QueryChoices = QueryChoicesV2
79
+ LinkInput = LinkInputV2
80
+ EditorInput = EditorInputV2
81
+ }
82
+
45
83
  if (type === 'textarea') {
46
84
  return (
47
85
  <TextareaInput
@@ -196,10 +234,17 @@ FormInput.propTypes = {
196
234
  * Whether the Form input input should be disabled
197
235
  */
198
236
  disabled :PropTypes.bool,
237
+
238
+ /**
239
+ * Whethe the Form input is version 2
240
+ */
241
+ isVersionTwo:PropTypes.bool,
242
+
199
243
  }
200
244
 
201
245
  FormInput.defaultProps = {
202
- disabled:false,
246
+ disabled :false,
247
+ isVersionTwo:false,
203
248
  }
204
249
 
205
250
  export default memo(FormInput)
@@ -0,0 +1,94 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useInsertionEffect } from 'react'
5
+
6
+ import { useField } from 'formik'
7
+
8
+ import PropTypes from 'prop-types'
9
+
10
+ import styleNames from '@pareto-engineering/bem/exports'
11
+
12
+ // Local Definitions
13
+
14
+ const baseClassName = styleNames.base
15
+
16
+ const componentClassName = 'description'
17
+
18
+ /**
19
+ * This is the component description.
20
+ */
21
+ const Description = ({
22
+ id,
23
+ className:userClassName,
24
+ style,
25
+ description,
26
+ name,
27
+ color,
28
+ // ...otherProps
29
+ }) => {
30
+ useInsertionEffect(() => {
31
+ import('./styles.scss')
32
+ }, [])
33
+
34
+ const [, meta] = useField(name)
35
+ const hasError = meta.touched && meta.error
36
+
37
+ if (hasError || description) {
38
+ return (
39
+ <div
40
+ id={id}
41
+ className={[
42
+ baseClassName,
43
+ componentClassName,
44
+ userClassName,
45
+ hasError ? 'x-error' : `x-${color}`,
46
+ ]
47
+ .filter((e) => e)
48
+ .join(' ')}
49
+ style={style}
50
+ >
51
+ { hasError ? meta.error : description}
52
+ </div>
53
+ )
54
+ }
55
+ return null
56
+ }
57
+
58
+ Description.propTypes = {
59
+ /**
60
+ * The HTML id for this element
61
+ */
62
+ id:PropTypes.string,
63
+
64
+ /**
65
+ * The HTML class names for this element
66
+ */
67
+ className:PropTypes.string,
68
+
69
+ /**
70
+ * The React-written, css properties for this element.
71
+ */
72
+ style:PropTypes.objectOf(PropTypes.string),
73
+
74
+ /**
75
+ * The base color for the description
76
+ */
77
+ color:PropTypes.string,
78
+
79
+ /**
80
+ * Input description - extra description to guide a use in filling the input
81
+ */
82
+ description:PropTypes.string,
83
+
84
+ /**
85
+ * The input name (html - and Formik state)
86
+ */
87
+ name:PropTypes.string.isRequired,
88
+ }
89
+
90
+ Description.defaultProps = {
91
+ color:'metadata',
92
+ }
93
+
94
+ 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,102 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useInsertionEffect } from 'react'
5
+
6
+ import PropTypes from 'prop-types'
7
+
8
+ import styleNames from '@pareto-engineering/bem/exports'
9
+
10
+ // Local Definitions
11
+
12
+ const baseClassName = styleNames.base
13
+
14
+ const componentClassName = 'form-label'
15
+
16
+ /**
17
+ * This is the component description.
18
+ */
19
+ const Label = ({
20
+ id,
21
+ className:userClassName,
22
+ style,
23
+ children,
24
+ name,
25
+ color,
26
+ optional,
27
+ as:Wrapper,
28
+ // ...otherProps
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
+
55
+ Label.propTypes = {
56
+ /**
57
+ * The HTML id for this element
58
+ */
59
+ id:PropTypes.string,
60
+
61
+ /**
62
+ * The HTML class names for this element
63
+ */
64
+ className:PropTypes.string,
65
+
66
+ /**
67
+ * The React-written, css properties for this element.
68
+ */
69
+ style:PropTypes.objectOf(PropTypes.string),
70
+
71
+ /**
72
+ * The children JSX
73
+ */
74
+ children:PropTypes.node,
75
+
76
+ /**
77
+ * The name of the input label
78
+ */
79
+ name:PropTypes.string,
80
+
81
+ /**
82
+ * The html tag that acts as an input label
83
+ */
84
+ as :PropTypes.node,
85
+ /**
86
+ * The default color of the label
87
+ */
88
+ color:PropTypes.string,
89
+
90
+ /**
91
+ * Whether the input should have an optional tag
92
+ */
93
+ optional:PropTypes.bool,
94
+ }
95
+
96
+ Label.defaultProps = {
97
+ as :'label',
98
+ color :'paragraph',
99
+ optional:false,
100
+ }
101
+
102
+ 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'
@@ -3,3 +3,4 @@ export { Description as FormDescription } from './Description'
3
3
  export { Debugger as FormDebugger } from './Debugger'
4
4
  export { InputWrapper } from './InputWrapper'
5
5
  export * from './utils'
6
+ export * from './V2'