@dev-crew-berlin/enter-js-utils 0.14.1 → 0.14.2

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.
@@ -11,10 +11,10 @@ export declare class FieldGroups {
11
11
  getLabelForField(fieldKey: string, language: string): string;
12
12
  }
13
13
  export declare const fieldGroup: import("fefe").Validator<import("fefe").ObjectResult<{
14
- title: import("fefe").Validator<string | Dictionary<string>, import("fefe").FefeError> & {
14
+ title: import("fefe").Validator<string | Dictionary<string> | null, import("fefe").FefeError> & {
15
15
  optional: true;
16
16
  };
17
- class: import("fefe").Validator<string, import("fefe").FefeError> & {
17
+ class: import("fefe").Validator<string | null, import("fefe").FefeError> & {
18
18
  optional: true;
19
19
  };
20
20
  questions: import("fefe").Validator<(import("fefe").ObjectResult<{
@@ -112,18 +112,18 @@ export declare const fieldGroup: import("fefe").Validator<import("fefe").ObjectR
112
112
  class: import("fefe").Validator<string | null, import("fefe").FefeError>;
113
113
  type: import("fefe").Validator<"dropdown", import("fefe").LeafError>;
114
114
  }>)[], import("fefe").FefeError>;
115
- info: import("fefe").Validator<string | Dictionary<string>, import("fefe").FefeError> & {
115
+ info: import("fefe").Validator<string | Dictionary<string> | null, import("fefe").FefeError> & {
116
116
  optional: true;
117
117
  };
118
- if: import("fefe").Validator<string, import("fefe").FefeError> & {
118
+ if: import("fefe").Validator<string | null, import("fefe").FefeError> & {
119
119
  optional: true;
120
120
  };
121
121
  }>, import("fefe").FefeError>;
122
122
  declare const rawFieldGroupList: import("fefe").Validator<import("fefe").ObjectResult<{
123
- title: import("fefe").Validator<string | Dictionary<string>, import("fefe").FefeError> & {
123
+ title: import("fefe").Validator<string | Dictionary<string> | null, import("fefe").FefeError> & {
124
124
  optional: true;
125
125
  };
126
- class: import("fefe").Validator<string, import("fefe").FefeError> & {
126
+ class: import("fefe").Validator<string | null, import("fefe").FefeError> & {
127
127
  optional: true;
128
128
  };
129
129
  questions: import("fefe").Validator<(import("fefe").ObjectResult<{
@@ -221,18 +221,18 @@ declare const rawFieldGroupList: import("fefe").Validator<import("fefe").ObjectR
221
221
  class: import("fefe").Validator<string | null, import("fefe").FefeError>;
222
222
  type: import("fefe").Validator<"dropdown", import("fefe").LeafError>;
223
223
  }>)[], import("fefe").FefeError>;
224
- info: import("fefe").Validator<string | Dictionary<string>, import("fefe").FefeError> & {
224
+ info: import("fefe").Validator<string | Dictionary<string> | null, import("fefe").FefeError> & {
225
225
  optional: true;
226
226
  };
227
- if: import("fefe").Validator<string, import("fefe").FefeError> & {
227
+ if: import("fefe").Validator<string | null, import("fefe").FefeError> & {
228
228
  optional: true;
229
229
  };
230
230
  }>[], import("fefe").FefeError>;
231
231
  export declare const parseFieldGroup: import("../lib").APIValidator<import("fefe").ObjectResult<{
232
- title: import("fefe").Validator<string | Dictionary<string>, import("fefe").FefeError> & {
232
+ title: import("fefe").Validator<string | Dictionary<string> | null, import("fefe").FefeError> & {
233
233
  optional: true;
234
234
  };
235
- class: import("fefe").Validator<string, import("fefe").FefeError> & {
235
+ class: import("fefe").Validator<string | null, import("fefe").FefeError> & {
236
236
  optional: true;
237
237
  };
238
238
  questions: import("fefe").Validator<(import("fefe").ObjectResult<{
@@ -330,18 +330,18 @@ export declare const parseFieldGroup: import("../lib").APIValidator<import("fefe
330
330
  class: import("fefe").Validator<string | null, import("fefe").FefeError>;
331
331
  type: import("fefe").Validator<"dropdown", import("fefe").LeafError>;
332
332
  }>)[], import("fefe").FefeError>;
333
- info: import("fefe").Validator<string | Dictionary<string>, import("fefe").FefeError> & {
333
+ info: import("fefe").Validator<string | Dictionary<string> | null, import("fefe").FefeError> & {
334
334
  optional: true;
335
335
  };
336
- if: import("fefe").Validator<string, import("fefe").FefeError> & {
336
+ if: import("fefe").Validator<string | null, import("fefe").FefeError> & {
337
337
  optional: true;
338
338
  };
339
339
  }>>;
340
340
  export declare const parseRawFieldGroupList: import("../lib").APIValidator<import("fefe").ObjectResult<{
341
- title: import("fefe").Validator<string | Dictionary<string>, import("fefe").FefeError> & {
341
+ title: import("fefe").Validator<string | Dictionary<string> | null, import("fefe").FefeError> & {
342
342
  optional: true;
343
343
  };
344
- class: import("fefe").Validator<string, import("fefe").FefeError> & {
344
+ class: import("fefe").Validator<string | null, import("fefe").FefeError> & {
345
345
  optional: true;
346
346
  };
347
347
  questions: import("fefe").Validator<(import("fefe").ObjectResult<{
@@ -439,10 +439,10 @@ export declare const parseRawFieldGroupList: import("../lib").APIValidator<impor
439
439
  class: import("fefe").Validator<string | null, import("fefe").FefeError>;
440
440
  type: import("fefe").Validator<"dropdown", import("fefe").LeafError>;
441
441
  }>)[], import("fefe").FefeError>;
442
- info: import("fefe").Validator<string | Dictionary<string>, import("fefe").FefeError> & {
442
+ info: import("fefe").Validator<string | Dictionary<string> | null, import("fefe").FefeError> & {
443
443
  optional: true;
444
444
  };
445
- if: import("fefe").Validator<string, import("fefe").FefeError> & {
445
+ if: import("fefe").Validator<string | null, import("fefe").FefeError> & {
446
446
  optional: true;
447
447
  };
448
448
  }>[]>;
@@ -1,7 +1,7 @@
1
1
  import { array, object, string, optional, union } from 'fefe';
2
2
  import { apiValidator, success } from '../lib';
3
3
  import { field } from './field';
4
- import { dictionary } from './_helpers';
4
+ import { dictionary, maybe } from './_helpers';
5
5
  export class FieldGroups {
6
6
  constructor(rawFieldGroupList) {
7
7
  this.groups = rawFieldGroupList;
@@ -28,11 +28,11 @@ export class FieldGroups {
28
28
 
29
29
  }
30
30
  export const fieldGroup = object({
31
- title: optional(union(string(), dictionary(string()))),
32
- class: optional(string()),
31
+ title: optional(maybe(union(string(), dictionary(string())))),
32
+ class: optional(maybe(string())),
33
33
  questions: array(field),
34
- info: optional(union(string(), dictionary(string()))),
35
- if: optional(string())
34
+ info: optional(maybe(union(string(), dictionary(string())))),
35
+ if: optional(maybe(string()))
36
36
  }, {
37
37
  allowExcessProperties: true
38
38
  });
@@ -0,0 +1,6 @@
1
+ import { FunctionComponent } from 'react';
2
+ declare type Props = {
3
+ color?: string;
4
+ };
5
+ export declare const SettingsIcon: FunctionComponent<Props>;
6
+ export {};
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { colors } from '../../lib/theme';
3
+ export const SettingsIcon = ({
4
+ color = colors.enterDarkGrey
5
+ }) => {
6
+ return /*#__PURE__*/React.createElement("svg", {
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: "100%",
9
+ height: "auto",
10
+ viewBox: "0 0 19 20"
11
+ }, /*#__PURE__*/React.createElement("path", {
12
+ fill: color,
13
+ fillRule: "evenodd",
14
+ d: "M17.168 10.226c0 1.105.619 1.989 1.812 2.74-.177.619-.442 1.237-.751 1.856-1.06-.265-2.077.088-3.093 1.016-.796.884-1.06 1.9-.751 3.093-.619.265-1.238.574-1.9.795-.707-1.237-1.724-1.855-3.005-1.855s-2.298.618-3.005 1.855c-.662-.22-1.281-.53-1.9-.795.31-1.237.045-2.253-.75-3.093-.796-.795-1.857-1.06-3.094-.751A30.225 30.225 0 0 1-.02 13.23c1.237-.795 1.856-1.812 1.856-3.005 0-1.104-.619-2.032-1.856-2.783.31-.884.574-1.503.751-1.856 1.149.265 2.165-.088 3.093-1.016.796-.84 1.06-1.856.751-3.093.663-.31 1.282-.575 1.9-.752C7.182 1.92 8.2 2.538 9.48 2.538s2.298-.619 3.005-1.812c.618.177 1.237.442 1.9.752-.31 1.193-.045 2.209.75 3.093 1.017.928 2.033 1.281 3.094 1.016.31.618.574 1.237.751 1.856-1.193.75-1.812 1.679-1.812 2.783m-7.688 4.11c1.149 0 2.12-.398 2.916-1.193.796-.796 1.193-1.768 1.193-2.917 0-1.148-.397-2.12-1.193-2.96-.795-.795-1.767-1.193-2.916-1.193s-2.12.398-2.916 1.193c-.796.84-1.193 1.812-1.193 2.96 0 1.15.397 2.121 1.193 2.917.795.795 1.767 1.193 2.916 1.193"
15
+ }));
16
+ };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.FunctionComponent<{
4
+ color?: string | undefined;
5
+ }>>;
6
+ export default _default;
7
+ export declare const Basic: ComponentStory<React.FunctionComponent<{
8
+ color?: string | undefined;
9
+ }>>;
10
+ export declare const White: ComponentStory<React.FunctionComponent<{
11
+ color?: string | undefined;
12
+ }>>;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { SettingsIcon } from './settings-icon';
3
+ export default {
4
+ title: 'Icons/Settings',
5
+ component: SettingsIcon
6
+ };
7
+
8
+ const Template = args => /*#__PURE__*/React.createElement(SettingsIcon, args);
9
+
10
+ export const Basic = Template.bind({});
11
+ Basic.args = {};
12
+ export const White = Template.bind({});
13
+ White.parameters = {
14
+ backgrounds: {
15
+ default: 'dark'
16
+ }
17
+ };
18
+ White.args = {
19
+ color: '#fff'
20
+ };
@@ -1,6 +1,7 @@
1
1
  export { Input } from './form-elements/input';
2
2
  export { Label } from './form-elements/label';
3
3
  export { SegmentedControl } from './form-elements/segmented-control';
4
+ export { SettingsIcon } from './icons/settings-icon';
4
5
  export { Button } from './button';
5
6
  export { CheckinCountIndicator } from './checkin-count-indicator';
6
7
  export { CheckinProgressBar } from './checkin-progress-bar';
package/dist/ui/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export { Input } from './form-elements/input';
2
2
  export { Label } from './form-elements/label';
3
3
  export { SegmentedControl } from './form-elements/segmented-control';
4
+ export { SettingsIcon } from './icons/settings-icon';
4
5
  export { Button } from './button';
5
6
  export { CheckinCountIndicator } from './checkin-count-indicator';
6
7
  export { CheckinProgressBar } from './checkin-progress-bar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",