@dev-crew-berlin/enter-js-utils 0.13.1 → 0.14.1
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/models/user.d.ts +2 -0
- package/dist/models/user.js +2 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -1
- package/package.json +1 -1
- package/dist/ui/icons/settings-icon.d.ts +0 -6
- package/dist/ui/icons/settings-icon.js +0 -16
- package/dist/ui/icons/settings-icon.stories.d.ts +0 -12
- package/dist/ui/icons/settings-icon.stories.js +0 -20
package/dist/models/user.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ValidatorReturnType } from 'fefe';
|
|
2
2
|
export declare const user: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
3
3
|
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
4
|
+
admin: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
4
5
|
timeout: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
5
6
|
userdata: (value: unknown) => import("fefe").Result<import("./_helpers").Dictionary<unknown>, import("fefe").FefeError>;
|
|
6
7
|
permissions: import("fefe").Validator<import("./_helpers").Dictionary<string[]>, import("fefe").FefeError> & {
|
|
@@ -10,6 +11,7 @@ export declare const user: import("fefe").Validator<import("fefe").ObjectResult<
|
|
|
10
11
|
export declare type User = ValidatorReturnType<typeof user>;
|
|
11
12
|
export declare const parseUser: import("../lib").APIValidator<import("fefe").ObjectResult<{
|
|
12
13
|
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
14
|
+
admin: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
13
15
|
timeout: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
14
16
|
userdata: (value: unknown) => import("fefe").Result<import("./_helpers").Dictionary<unknown>, import("fefe").FefeError>;
|
|
15
17
|
permissions: import("fefe").Validator<import("./_helpers").Dictionary<string[]>, import("fefe").FefeError> & {
|
package/dist/models/user.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { array, number, object, string, optional } from 'fefe';
|
|
1
|
+
import { array, number, object, string, optional, boolean, defaultTo } from 'fefe';
|
|
2
2
|
import { apiValidator } from '../lib';
|
|
3
3
|
import { unknown, dictionary } from './_helpers';
|
|
4
4
|
export const user = object({
|
|
5
5
|
name: string(),
|
|
6
|
+
admin: defaultTo(boolean(), false),
|
|
6
7
|
timeout: number(),
|
|
7
8
|
userdata: dictionary(unknown()),
|
|
8
9
|
permissions: optional(dictionary(array(string())))
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
export { Button } from './button';
|
|
6
5
|
export { CheckinCountIndicator } from './checkin-count-indicator';
|
|
7
6
|
export { CheckinProgressBar } from './checkin-progress-bar';
|
package/dist/ui/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
export { Button } from './button';
|
|
6
5
|
export { CheckinCountIndicator } from './checkin-count-indicator';
|
|
7
6
|
export { CheckinProgressBar } from './checkin-progress-bar';
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
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: "100%",
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
}>>;
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
};
|