@dev-crew-berlin/enter-js-utils 0.12.1 → 0.13.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/attendee.d.ts +3 -0
- package/dist/models/attendee.js +4 -0
- package/dist/ui/checkin-progress-bar.js +9 -9
- package/dist/ui/icons/settings-icon.d.ts +6 -0
- package/dist/ui/icons/settings-icon.js +16 -0
- package/dist/ui/icons/settings-icon.stories.d.ts +12 -0
- package/dist/ui/icons/settings-icon.stories.js +20 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/package.json +1 -1
|
@@ -60,6 +60,9 @@ export declare class Attendee {
|
|
|
60
60
|
checkinTag: string;
|
|
61
61
|
checkinId: string;
|
|
62
62
|
}): Attendee;
|
|
63
|
+
hasRsvp(args: {
|
|
64
|
+
checkinTags: string[];
|
|
65
|
+
}): boolean;
|
|
63
66
|
}
|
|
64
67
|
export declare const rawAttendee: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
65
68
|
id: import("fefe").Validator<string, import("fefe").LeafError>;
|
package/dist/models/attendee.js
CHANGED
|
@@ -4,24 +4,24 @@ import { theme } from '../lib';
|
|
|
4
4
|
export const CheckinProgressBar = props => {
|
|
5
5
|
const width = props.rsvp > 0 ? props.checkinCount / props.rsvp : 1;
|
|
6
6
|
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
-
className: _JSXStyle.dynamic([["
|
|
7
|
+
className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'checkin-progress-bar'
|
|
8
8
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9
9
|
style: {
|
|
10
10
|
width: `${width * 100}%`
|
|
11
11
|
},
|
|
12
|
-
className: _JSXStyle.dynamic([["
|
|
12
|
+
className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'progress'
|
|
13
13
|
}), /*#__PURE__*/React.createElement("div", {
|
|
14
|
-
className: _JSXStyle.dynamic([["
|
|
14
|
+
className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'number checkin-count'
|
|
15
15
|
}, props.checkinCount, /*#__PURE__*/React.createElement("label", {
|
|
16
|
-
className: _JSXStyle.dynamic([["
|
|
16
|
+
className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]])
|
|
17
17
|
}, "Checkins")), /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
className: _JSXStyle.dynamic([["
|
|
18
|
+
className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'checkin-tag-display'
|
|
19
19
|
}, props.children), /*#__PURE__*/React.createElement("div", {
|
|
20
|
-
className: _JSXStyle.dynamic([["
|
|
20
|
+
className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'number confirmations'
|
|
21
21
|
}, props.rsvp, /*#__PURE__*/React.createElement("label", {
|
|
22
|
-
className: _JSXStyle.dynamic([["
|
|
22
|
+
className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]])
|
|
23
23
|
}, "Confirmations")), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
24
|
-
id: "
|
|
24
|
+
id: "818622950",
|
|
25
25
|
dynamic: [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]
|
|
26
|
-
}, `.checkin-progress-bar.__jsx-style-dynamic-selector{position:relative;padding:0.5em 1em 0.7em;background-color:${theme.colors.enterDarkGrey};border:1px solid ${theme.colors.enterBackground};font-family:${theme.fonts.primary};color:white;display:grid;grid-template-columns:1fr auto 1fr;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;overflow:hidden;cursor:pointer;}.progress.__jsx-style-dynamic-selector{z-index:0;top:0;margin:0;padding:0;position:absolute;height:100%;background-color:${theme.colors.enterGreen};}.number.__jsx-style-dynamic-selector{z-index:1;font-weight:200;font-size:1.4em;}.confirmations.__jsx-style-dynamic-selector{text-align:right;}.number.__jsx-style-dynamic-selector label.__jsx-style-dynamic-selector{display:block;font-family:${theme.fonts.secondary};font-size:0.6rem;-webkit-letter-spacing:0.05em;-moz-letter-spacing:0.05em;-ms-letter-spacing:0.05em;letter-spacing:0.05em;text-transform:uppercase;font-weight:normal;}.checkin-tag-display.__jsx-style-dynamic-selector{z-index:1;font-size:1.3em;}`));
|
|
26
|
+
}, `.checkin-progress-bar.__jsx-style-dynamic-selector{position:relative;padding:0.5em 1em 0.7em;background-color:${theme.colors.enterDarkGrey};border:1px solid ${theme.colors.enterBackground};font-family:${theme.fonts.primary};color:white;display:grid;grid-template-columns:1fr auto 1fr;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;overflow:hidden;cursor:pointer;}.progress.__jsx-style-dynamic-selector{z-index:0;top:0;margin:0;padding:0;position:absolute;height:100%;background-color:${theme.colors.enterGreen};}.number.__jsx-style-dynamic-selector{z-index:1;font-weight:200;font-size:1.4em;}.checkin-count.__jsx-style-dynamic-selector{text-align:left;}.confirmations.__jsx-style-dynamic-selector{text-align:right;}.number.__jsx-style-dynamic-selector label.__jsx-style-dynamic-selector{display:block;font-family:${theme.fonts.secondary};font-size:0.6rem;-webkit-letter-spacing:0.05em;-moz-letter-spacing:0.05em;-ms-letter-spacing:0.05em;letter-spacing:0.05em;text-transform:uppercase;font-weight:normal;}.checkin-tag-display.__jsx-style-dynamic-selector{z-index:1;font-size:1.3em;}`));
|
|
27
27
|
};
|
|
@@ -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: "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
|
+
};
|
|
@@ -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
|
+
};
|
package/dist/ui/index.d.ts
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/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';
|