@dev-crew-berlin/enter-js-utils 0.72.0 → 0.80.0

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 (67) hide show
  1. package/README.md +1 -1
  2. package/dist/generated/api-schema.d.ts +136 -18
  3. package/dist/lib/result.js +0 -1
  4. package/dist/models/attendee.d.ts +16 -15
  5. package/dist/models/attendee.js +43 -25
  6. package/dist/models/branch.d.ts +9 -0
  7. package/dist/models/branch.js +7 -0
  8. package/dist/models/checkin-counter.d.ts +2 -0
  9. package/dist/models/checkin-counter.js +1 -0
  10. package/dist/models/checkin.d.ts +5 -2
  11. package/dist/models/checkin.js +4 -1
  12. package/dist/models/checkins.d.ts +2 -2
  13. package/dist/models/checkins.js +6 -6
  14. package/dist/models/event.d.ts +1 -0
  15. package/dist/models/field.d.ts +9 -0
  16. package/dist/models/index.d.ts +3 -0
  17. package/dist/models/index.js +1 -0
  18. package/dist/models/instance.d.ts +2 -1
  19. package/dist/models/instance.js +6 -3
  20. package/dist/models/rsvp.d.ts +3 -2
  21. package/dist/models/rsvp.js +7 -4
  22. package/dist/ui/button.js +7 -6
  23. package/dist/ui/button.stories.d.ts +16 -59
  24. package/dist/ui/button.stories.js +66 -54
  25. package/dist/ui/checkin-count-indicator.stories.d.ts +14 -84
  26. package/dist/ui/checkin-count-indicator.stories.js +60 -52
  27. package/dist/ui/checkin-progress-bar.js +11 -11
  28. package/dist/ui/checkin-progress-bar.stories.d.ts +12 -59
  29. package/dist/ui/checkin-progress-bar.stories.js +45 -39
  30. package/dist/ui/companion-info.js +6 -6
  31. package/dist/ui/companion-info.stories.d.ts +8 -44
  32. package/dist/ui/companion-info.stories.js +29 -27
  33. package/dist/ui/enter-logo.js +2 -2
  34. package/dist/ui/enter-logo.stories.d.ts +7 -12
  35. package/dist/ui/enter-logo.stories.js +11 -12
  36. package/dist/ui/form-elements/input.js +6 -6
  37. package/dist/ui/form-elements/input.stories.d.ts +8 -15
  38. package/dist/ui/form-elements/input.stories.js +26 -24
  39. package/dist/ui/form-elements/label.js +6 -6
  40. package/dist/ui/form-elements/label.stories.d.ts +6 -5
  41. package/dist/ui/form-elements/label.stories.js +6 -6
  42. package/dist/ui/form-elements/search-input.js +10 -10
  43. package/dist/ui/form-elements/search-input.stories.d.ts +7 -18
  44. package/dist/ui/form-elements/search-input.stories.js +18 -17
  45. package/dist/ui/form-elements/segmented-control.js +8 -8
  46. package/dist/ui/form-elements/segmented-control.stories.d.ts +6 -17
  47. package/dist/ui/form-elements/segmented-control.stories.js +7 -7
  48. package/dist/ui/guest-card.d.ts +2 -1
  49. package/dist/ui/guest-card.js +17 -16
  50. package/dist/ui/guest-card.stories.d.ts +14 -124
  51. package/dist/ui/guest-card.stories.js +93 -76
  52. package/dist/ui/icons/add-guest-icon.stories.d.ts +7 -12
  53. package/dist/ui/icons/add-guest-icon.stories.js +11 -12
  54. package/dist/ui/icons/caret-icon.stories.d.ts +7 -15
  55. package/dist/ui/icons/caret-icon.stories.js +11 -12
  56. package/dist/ui/icons/filter-icon.stories.d.ts +7 -12
  57. package/dist/ui/icons/filter-icon.stories.js +11 -12
  58. package/dist/ui/icons/search-icon.stories.d.ts +7 -12
  59. package/dist/ui/icons/search-icon.stories.js +11 -12
  60. package/dist/ui/icons/settings-icon.stories.d.ts +7 -12
  61. package/dist/ui/icons/settings-icon.stories.js +11 -12
  62. package/dist/ui/icons/sort-list-icon.stories.d.ts +7 -15
  63. package/dist/ui/icons/sort-list-icon.stories.js +11 -12
  64. package/dist/ui/tag.js +5 -5
  65. package/dist/ui/tag.stories.d.ts +6 -9
  66. package/dist/ui/tag.stories.js +6 -6
  67. package/package.json +18 -17
@@ -1,27 +1,27 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  import React from 'react';
3
- import { theme } from '../lib';
3
+ import { colors, fonts } from '../lib/theme';
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([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'checkin-progress-bar'
7
+ className: _JSXStyle.dynamic([["2740901718", [colors.enterDarkGrey, colors.enterBackground, fonts.primary, colors.enterGreen, 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([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'progress'
12
+ className: _JSXStyle.dynamic([["2740901718", [colors.enterDarkGrey, colors.enterBackground, fonts.primary, colors.enterGreen, fonts.secondary]]]) + " " + 'progress'
13
13
  }), /*#__PURE__*/React.createElement("div", {
14
- className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'number checkin-count'
14
+ className: _JSXStyle.dynamic([["2740901718", [colors.enterDarkGrey, colors.enterBackground, fonts.primary, colors.enterGreen, fonts.secondary]]]) + " " + 'number checkin-count'
15
15
  }, props.checkinCount, /*#__PURE__*/React.createElement("label", {
16
- className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]])
16
+ className: _JSXStyle.dynamic([["2740901718", [colors.enterDarkGrey, colors.enterBackground, fonts.primary, colors.enterGreen, fonts.secondary]]])
17
17
  }, props.leftLabel || 'Checkins')), /*#__PURE__*/React.createElement("div", {
18
- className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'checkin-tag-display'
18
+ className: _JSXStyle.dynamic([["2740901718", [colors.enterDarkGrey, colors.enterBackground, fonts.primary, colors.enterGreen, fonts.secondary]]]) + " " + 'checkin-tag-display'
19
19
  }, props.children), /*#__PURE__*/React.createElement("div", {
20
- className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'number confirmations'
20
+ className: _JSXStyle.dynamic([["2740901718", [colors.enterDarkGrey, colors.enterBackground, fonts.primary, colors.enterGreen, fonts.secondary]]]) + " " + 'number confirmations'
21
21
  }, props.rsvp, /*#__PURE__*/React.createElement("label", {
22
- className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]])
22
+ className: _JSXStyle.dynamic([["2740901718", [colors.enterDarkGrey, colors.enterBackground, fonts.primary, colors.enterGreen, fonts.secondary]]])
23
23
  }, props.rightLabel || 'Confirmations')), /*#__PURE__*/React.createElement(_JSXStyle, {
24
- id: "818622950",
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;}.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;}`));
24
+ id: "2740901718",
25
+ dynamic: [colors.enterDarkGrey, colors.enterBackground, fonts.primary, colors.enterGreen, fonts.secondary]
26
+ }, `.checkin-progress-bar.__jsx-style-dynamic-selector{position:relative;padding:0.5em 1em 0.7em;background-color:${colors.enterDarkGrey};border:1px solid ${colors.enterBackground};font-family:${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:${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:${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
  };
@@ -1,59 +1,12 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FunctionComponent<{
4
- checkinCount: number;
5
- rsvp: number;
6
- children?: React.ReactNode;
7
- leftLabel?: string | undefined;
8
- rightLabel?: string | undefined;
9
- }>>;
10
- export default _default;
11
- export declare const Basic: ComponentStory<React.FunctionComponent<{
12
- checkinCount: number;
13
- rsvp: number;
14
- children?: React.ReactNode;
15
- leftLabel?: string | undefined;
16
- rightLabel?: string | undefined;
17
- }>>;
18
- export declare const WithoutTagName: ComponentStory<React.FunctionComponent<{
19
- checkinCount: number;
20
- rsvp: number;
21
- children?: React.ReactNode;
22
- leftLabel?: string | undefined;
23
- rightLabel?: string | undefined;
24
- }>>;
25
- export declare const NoCheckins: ComponentStory<React.FunctionComponent<{
26
- checkinCount: number;
27
- rsvp: number;
28
- children?: React.ReactNode;
29
- leftLabel?: string | undefined;
30
- rightLabel?: string | undefined;
31
- }>>;
32
- export declare const AllCheckinsComplete: ComponentStory<React.FunctionComponent<{
33
- checkinCount: number;
34
- rsvp: number;
35
- children?: React.ReactNode;
36
- leftLabel?: string | undefined;
37
- rightLabel?: string | undefined;
38
- }>>;
39
- export declare const MoreCheckinsThanExpected: ComponentStory<React.FunctionComponent<{
40
- checkinCount: number;
41
- rsvp: number;
42
- children?: React.ReactNode;
43
- leftLabel?: string | undefined;
44
- rightLabel?: string | undefined;
45
- }>>;
46
- export declare const NoRSVP: ComponentStory<React.FunctionComponent<{
47
- checkinCount: number;
48
- rsvp: number;
49
- children?: React.ReactNode;
50
- leftLabel?: string | undefined;
51
- rightLabel?: string | undefined;
52
- }>>;
53
- export declare const CustomLabels: ComponentStory<React.FunctionComponent<{
54
- checkinCount: number;
55
- rsvp: number;
56
- children?: React.ReactNode;
57
- leftLabel?: string | undefined;
58
- rightLabel?: string | undefined;
59
- }>>;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { CheckinProgressBar } from './checkin-progress-bar';
3
+ declare const meta: Meta<typeof CheckinProgressBar>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof CheckinProgressBar>;
6
+ export declare const Basic: Story;
7
+ export declare const WithoutTagName: Story;
8
+ export declare const NoCheckins: Story;
9
+ export declare const AllCheckinsComplete: Story;
10
+ export declare const MoreCheckinsThanExpected: Story;
11
+ export declare const NoRSVP: Story;
12
+ export declare const CustomLabels: Story;
@@ -1,50 +1,56 @@
1
- import React from 'react';
2
1
  import { CheckinProgressBar } from './checkin-progress-bar';
3
- export default {
2
+ const meta = {
4
3
  title: 'Checkin progress bar',
5
4
  component: CheckinProgressBar
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(CheckinProgressBar, args);
8
- export const Basic = Template.bind({});
9
- Basic.args = {
10
- rsvp: 250,
11
- checkinCount: 200,
12
- children: 'Dinner'
6
+ export default meta;
7
+ export const Basic = {
8
+ args: {
9
+ rsvp: 250,
10
+ checkinCount: 200,
11
+ children: 'Dinner'
12
+ }
13
13
  };
14
- export const WithoutTagName = Template.bind({});
15
- WithoutTagName.args = {
16
- rsvp: 250,
17
- checkinCount: 200
14
+ export const WithoutTagName = {
15
+ args: {
16
+ rsvp: 250,
17
+ checkinCount: 200
18
+ }
18
19
  };
19
- export const NoCheckins = Template.bind({});
20
- NoCheckins.args = {
21
- rsvp: 250,
22
- checkinCount: 0,
23
- children: 'Dinner'
20
+ export const NoCheckins = {
21
+ args: {
22
+ rsvp: 250,
23
+ checkinCount: 0,
24
+ children: 'Dinner'
25
+ }
24
26
  };
25
- export const AllCheckinsComplete = Template.bind({});
26
- AllCheckinsComplete.args = {
27
- rsvp: 250,
28
- checkinCount: 250,
29
- children: 'Dinner'
27
+ export const AllCheckinsComplete = {
28
+ args: {
29
+ rsvp: 250,
30
+ checkinCount: 250,
31
+ children: 'Dinner'
32
+ }
30
33
  };
31
- export const MoreCheckinsThanExpected = Template.bind({});
32
- MoreCheckinsThanExpected.args = {
33
- rsvp: 250,
34
- checkinCount: 400,
35
- children: 'Dinner'
34
+ export const MoreCheckinsThanExpected = {
35
+ args: {
36
+ rsvp: 250,
37
+ checkinCount: 400,
38
+ children: 'Dinner'
39
+ }
36
40
  };
37
- export const NoRSVP = Template.bind({});
38
- NoRSVP.args = {
39
- rsvp: 0,
40
- checkinCount: 200,
41
- children: 'Dinner'
41
+ export const NoRSVP = {
42
+ args: {
43
+ rsvp: 0,
44
+ checkinCount: 200,
45
+ children: 'Dinner'
46
+ }
42
47
  };
43
- export const CustomLabels = Template.bind({});
44
- CustomLabels.args = {
45
- rsvp: 200,
46
- checkinCount: 125,
47
- children: 'Dinner',
48
- leftLabel: 'Present',
49
- rightLabel: 'Guests'
48
+ export const CustomLabels = {
49
+ args: {
50
+ rsvp: 200,
51
+ checkinCount: 125,
52
+ children: 'Dinner',
53
+ leftLabel: 'Present',
54
+ rightLabel: 'Guests'
55
+ }
50
56
  };
@@ -1,17 +1,17 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  import React from 'react';
3
3
  import 'styled-jsx';
4
- import { theme } from '../lib';
4
+ import { colors, fonts } from '../lib/theme';
5
5
  export const CompanionInfo = props => {
6
6
  if (!props.companionStatus.isCompanion) return null;
7
7
  const mainGuest = props.findMainGuest ? props.findMainGuest(props.companionStatus.mainGuestId) : undefined;
8
8
  const mainGuestName = mainGuest ? props.formatName(mainGuest) : undefined;
9
9
  return /*#__PURE__*/React.createElement("p", {
10
- className: _JSXStyle.dynamic([["353274210", [theme.colors.enterMediumGrey, theme.fonts.primary, theme.colors.enterDarkGrey]]]) + " " + 'companion-info'
10
+ className: _JSXStyle.dynamic([["21346984", [colors.enterMediumGrey, fonts.primary, colors.enterDarkGrey]]]) + " " + 'companion-info'
11
11
  }, mainGuestName ? /*#__PURE__*/React.createElement(React.Fragment, null, "companion of ", /*#__PURE__*/React.createElement("span", {
12
- className: _JSXStyle.dynamic([["353274210", [theme.colors.enterMediumGrey, theme.fonts.primary, theme.colors.enterDarkGrey]]]) + " " + 'companion-name'
12
+ className: _JSXStyle.dynamic([["21346984", [colors.enterMediumGrey, fonts.primary, colors.enterDarkGrey]]]) + " " + 'companion-name'
13
13
  }, mainGuestName)) : /*#__PURE__*/React.createElement(React.Fragment, null, "companion"), /*#__PURE__*/React.createElement(_JSXStyle, {
14
- id: "353274210",
15
- dynamic: [theme.colors.enterMediumGrey, theme.fonts.primary, theme.colors.enterDarkGrey]
16
- }, `.companion-info.__jsx-style-dynamic-selector{margin:-0.5em 0 0.4em;color:${theme.colors.enterMediumGrey};font-family:${theme.fonts.primary};}.companion-name.__jsx-style-dynamic-selector{color:${theme.colors.enterDarkGrey};}`));
14
+ id: "21346984",
15
+ dynamic: [colors.enterMediumGrey, fonts.primary, colors.enterDarkGrey]
16
+ }, `.companion-info.__jsx-style-dynamic-selector{margin:-0.5em 0 0.4em;color:${colors.enterMediumGrey};font-family:${fonts.primary};}.companion-name.__jsx-style-dynamic-selector{color:${colors.enterDarkGrey};}`));
17
17
  };
@@ -1,44 +1,8 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- import { Attendee } from '../models';
4
- declare const _default: ComponentMeta<React.FunctionComponent<{
5
- companionStatus: {
6
- isCompanion: false;
7
- } | {
8
- isCompanion: true;
9
- mainGuestId: string;
10
- };
11
- formatName: (attendee: Attendee) => string;
12
- findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
13
- }>>;
14
- export default _default;
15
- export declare const WithMainGuestFound: ComponentStory<React.FunctionComponent<{
16
- companionStatus: {
17
- isCompanion: false;
18
- } | {
19
- isCompanion: true;
20
- mainGuestId: string;
21
- };
22
- formatName: (attendee: Attendee) => string;
23
- findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
24
- }>>;
25
- export declare const WithoutMainGuest: ComponentStory<React.FunctionComponent<{
26
- companionStatus: {
27
- isCompanion: false;
28
- } | {
29
- isCompanion: true;
30
- mainGuestId: string;
31
- };
32
- formatName: (attendee: Attendee) => string;
33
- findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
34
- }>>;
35
- export declare const NotACompanion: ComponentStory<React.FunctionComponent<{
36
- companionStatus: {
37
- isCompanion: false;
38
- } | {
39
- isCompanion: true;
40
- mainGuestId: string;
41
- };
42
- formatName: (attendee: Attendee) => string;
43
- findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
44
- }>>;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { CompanionInfo } from './companion-info';
3
+ declare const meta: Meta<typeof CompanionInfo>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof CompanionInfo>;
6
+ export declare const WithMainGuestFound: Story;
7
+ export declare const WithoutMainGuest: Story;
8
+ export declare const NotACompanion: Story;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import { CompanionInfo } from './companion-info';
3
2
  import { Attendee } from '../models';
4
- export default {
3
+ const meta = {
5
4
  title: 'Companion Info',
6
5
  component: CompanionInfo,
7
6
  argTypes: {
@@ -10,6 +9,7 @@ export default {
10
9
  }
11
10
  }
12
11
  };
12
+ export default meta;
13
13
  const mainGuest = new Attendee({
14
14
  id: 'my-attendee',
15
15
  language: 'de',
@@ -32,34 +32,36 @@ const mainGuest = new Attendee({
32
32
  deleted: false,
33
33
  payment: null
34
34
  });
35
- const Template = args => /*#__PURE__*/React.createElement(CompanionInfo, args);
36
- export const WithMainGuestFound = Template.bind({});
37
- WithMainGuestFound.args = {
38
- companionStatus: {
39
- isCompanion: true,
40
- mainGuestId: 'my-attendee'
41
- },
42
- findMainGuest: () => mainGuest,
43
- formatName(attendee) {
44
- return attendee.userdata.name?.toString() ?? '';
35
+ export const WithMainGuestFound = {
36
+ args: {
37
+ companionStatus: {
38
+ isCompanion: true,
39
+ mainGuestId: 'my-attendee'
40
+ },
41
+ findMainGuest: () => mainGuest,
42
+ formatName(attendee) {
43
+ return attendee.getFieldValueString('name');
44
+ }
45
45
  }
46
46
  };
47
- export const WithoutMainGuest = Template.bind({});
48
- WithoutMainGuest.args = {
49
- companionStatus: {
50
- isCompanion: true,
51
- mainGuestId: 'my-attendee'
52
- },
53
- formatName(attendee) {
54
- return attendee.userdata.name?.toString() ?? '';
47
+ export const WithoutMainGuest = {
48
+ args: {
49
+ companionStatus: {
50
+ isCompanion: true,
51
+ mainGuestId: 'my-attendee'
52
+ },
53
+ formatName(attendee) {
54
+ return attendee.getFieldValueString('name');
55
+ }
55
56
  }
56
57
  };
57
- export const NotACompanion = Template.bind({});
58
- NotACompanion.args = {
59
- companionStatus: {
60
- isCompanion: false
61
- },
62
- formatName(attendee) {
63
- return attendee.userdata.name?.toString() ?? '';
58
+ export const NotACompanion = {
59
+ args: {
60
+ companionStatus: {
61
+ isCompanion: false
62
+ },
63
+ formatName(attendee) {
64
+ return attendee.getFieldValueString('name');
65
+ }
64
66
  }
65
67
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { theme } from '../lib';
2
+ import { colors } from '../lib/theme';
3
3
  export const EnterLogo = props => {
4
- const color = props.white ? 'white' : theme.colors.enterRed;
4
+ const color = props.white ? 'white' : colors.enterRed;
5
5
  return /*#__PURE__*/React.createElement("svg", {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  width: "100%",
@@ -1,12 +1,7 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FunctionComponent<{
4
- white?: boolean | undefined;
5
- }>>;
6
- export default _default;
7
- export declare const Basic: ComponentStory<React.FunctionComponent<{
8
- white?: boolean | undefined;
9
- }>>;
10
- export declare const White: ComponentStory<React.FunctionComponent<{
11
- white?: boolean | undefined;
12
- }>>;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { EnterLogo } from './enter-logo';
3
+ declare const meta: Meta<typeof EnterLogo>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof EnterLogo>;
6
+ export declare const Basic: Story;
7
+ export declare const White: Story;
@@ -1,18 +1,17 @@
1
- import React from 'react';
2
1
  import { EnterLogo } from './enter-logo';
3
- export default {
2
+ const meta = {
4
3
  title: 'Enter Logo',
5
4
  component: EnterLogo
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(EnterLogo, args);
8
- export const Basic = Template.bind({});
9
- Basic.args = {};
10
- export const White = Template.bind({});
11
- White.parameters = {
12
- backgrounds: {
13
- default: 'dark'
6
+ export default meta;
7
+ export const Basic = {};
8
+ export const White = {
9
+ parameters: {
10
+ backgrounds: {
11
+ default: 'dark'
12
+ }
13
+ },
14
+ args: {
15
+ white: true
14
16
  }
15
- };
16
- White.args = {
17
- white: true
18
17
  };
@@ -1,7 +1,7 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
- 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
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  import React from 'react';
4
- import { theme } from '../../lib';
4
+ import { colors, fonts } from '../../lib/theme';
5
5
  import { Label } from './label';
6
6
  export const Input = ({
7
7
  label,
@@ -12,9 +12,9 @@ export const Input = ({
12
12
  htmlFor: id
13
13
  }, label), /*#__PURE__*/React.createElement("input", _extends({}, props, {
14
14
  id: id,
15
- className: _JSXStyle.dynamic([["3631038054", [theme.fonts.primary, theme.colors.enterDarkGrey, theme.colors.enterMediumGrey, theme.colors.enterRed]]]) + " " + (props && props.className != null && props.className || "")
15
+ className: _JSXStyle.dynamic([["3038467672", [fonts.primary, colors.enterDarkGrey, colors.enterMediumGrey, colors.enterRed]]]) + " " + (props && props.className != null && props.className || "")
16
16
  })), /*#__PURE__*/React.createElement(_JSXStyle, {
17
- id: "3631038054",
18
- dynamic: [theme.fonts.primary, theme.colors.enterDarkGrey, theme.colors.enterMediumGrey, theme.colors.enterRed]
19
- }, `input.__jsx-style-dynamic-selector{font-family:${theme.fonts.primary};font-size:1.1em;display:block;width:100%;padding:0.2em 0;margin-bottom:1.1em;border:none;outline:none;background-color:transparent;color:${theme.colors.enterDarkGrey};border-bottom:1px solid ${theme.colors.enterMediumGrey};border-radius:0;-webkit-transition:border-color 0.2s;transition:border-color 0.2s;}input.__jsx-style-dynamic-selector:focus{border-color:${theme.colors.enterRed};}`));
17
+ id: "3038467672",
18
+ dynamic: [fonts.primary, colors.enterDarkGrey, colors.enterMediumGrey, colors.enterRed]
19
+ }, `input.__jsx-style-dynamic-selector{font-family:${fonts.primary};font-size:1.1em;display:block;width:100%;padding:0.2em 0;margin-bottom:1.1em;border:none;outline:none;background-color:transparent;color:${colors.enterDarkGrey};border-bottom:1px solid ${colors.enterMediumGrey};border-radius:0;-webkit-transition:border-color 0.2s;transition:border-color 0.2s;}input.__jsx-style-dynamic-selector:focus{border-color:${colors.enterRed};}`));
20
20
  };
@@ -1,15 +1,8 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FunctionComponent<React.InputHTMLAttributes<HTMLInputElement> & {
4
- label: string;
5
- }>>;
6
- export default _default;
7
- export declare const Basic: ComponentStory<React.FunctionComponent<React.InputHTMLAttributes<HTMLInputElement> & {
8
- label: string;
9
- }>>;
10
- export declare const NumberInput: ComponentStory<React.FunctionComponent<React.InputHTMLAttributes<HTMLInputElement> & {
11
- label: string;
12
- }>>;
13
- export declare const WithValue: ComponentStory<React.FunctionComponent<React.InputHTMLAttributes<HTMLInputElement> & {
14
- label: string;
15
- }>>;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Input } from './input';
3
+ declare const meta: Meta<typeof Input>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof Input>;
6
+ export declare const Basic: Story;
7
+ export declare const NumberInput: Story;
8
+ export declare const WithValue: Story;
@@ -1,31 +1,33 @@
1
- import React from 'react';
2
1
  import { Input } from './input';
3
- export default {
2
+ const meta = {
4
3
  title: 'Form Elements/Input',
5
4
  component: Input
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(Input, args);
8
- export const Basic = Template.bind({});
9
- Basic.args = {
10
- type: 'text',
11
- label: 'Text input',
12
- placeholder: 'Enter text here',
13
- value: '',
14
- onClick: () => undefined
6
+ export default meta;
7
+ export const Basic = {
8
+ args: {
9
+ type: 'text',
10
+ label: 'Text input',
11
+ placeholder: 'Enter text here',
12
+ value: '',
13
+ onClick: () => undefined
14
+ }
15
15
  };
16
- export const NumberInput = Template.bind({});
17
- NumberInput.args = {
18
- type: 'number',
19
- label: 'Number input',
20
- placeholder: 'Enter number here',
21
- value: '',
22
- onClick: () => undefined
16
+ export const NumberInput = {
17
+ args: {
18
+ type: 'number',
19
+ label: 'Number input',
20
+ placeholder: 'Enter number here',
21
+ value: '',
22
+ onClick: () => undefined
23
+ }
23
24
  };
24
- export const WithValue = Template.bind({});
25
- WithValue.args = {
26
- type: 'text',
27
- label: 'Text input',
28
- placeholder: 'Enter text here',
29
- value: 'Text value',
30
- onClick: () => undefined
25
+ export const WithValue = {
26
+ args: {
27
+ type: 'text',
28
+ label: 'Text input',
29
+ placeholder: 'Enter text here',
30
+ value: 'Text value',
31
+ onClick: () => undefined
32
+ }
31
33
  };
@@ -1,12 +1,12 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
- 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
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  import React from 'react';
4
- import { theme } from '../../lib';
4
+ import { colors, fonts } from '../../lib/theme';
5
5
  export const Label = props => {
6
6
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("label", _extends({}, props, {
7
- className: _JSXStyle.dynamic([["1848048607", [theme.fonts.secondary, theme.colors.enterDarkGrey]]]) + " " + (props && props.className != null && props.className || "")
7
+ className: _JSXStyle.dynamic([["1684173836", [fonts.secondary, colors.enterDarkGrey]]]) + " " + (props && props.className != null && props.className || "")
8
8
  }), props.children), /*#__PURE__*/React.createElement(_JSXStyle, {
9
- id: "1848048607",
10
- dynamic: [theme.fonts.secondary, theme.colors.enterDarkGrey]
11
- }, `label.__jsx-style-dynamic-selector{display:block;font-family:${theme.fonts.secondary};font-weight:400;font-size:0.9em;color:${theme.colors.enterDarkGrey};-webkit-letter-spacing:0.05em;-moz-letter-spacing:0.05em;-ms-letter-spacing:0.05em;letter-spacing:0.05em;margin-bottom:0.6em;}`));
9
+ id: "1684173836",
10
+ dynamic: [fonts.secondary, colors.enterDarkGrey]
11
+ }, `label.__jsx-style-dynamic-selector{display:block;font-family:${fonts.secondary};font-weight:400;font-size:0.9em;color:${colors.enterDarkGrey};-webkit-letter-spacing:0.05em;-moz-letter-spacing:0.05em;-ms-letter-spacing:0.05em;letter-spacing:0.05em;margin-bottom:0.6em;}`));
12
12
  };
@@ -1,5 +1,6 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FunctionComponent<React.LabelHTMLAttributes<HTMLLabelElement>>>;
4
- export default _default;
5
- export declare const Basic: ComponentStory<React.FunctionComponent<React.LabelHTMLAttributes<HTMLLabelElement>>>;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Label } from './label';
3
+ declare const meta: Meta<typeof Label>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof Label>;
6
+ export declare const Basic: Story;
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
1
  import { Label } from './label';
3
- export default {
2
+ const meta = {
4
3
  title: 'Form Elements/Label',
5
4
  component: Label
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(Label, args);
8
- export const Basic = Template.bind({});
9
- Basic.args = {
10
- children: 'Label text'
6
+ export default meta;
7
+ export const Basic = {
8
+ args: {
9
+ children: 'Label text'
10
+ }
11
11
  };