@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,12 +1,7 @@
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
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { AddGuestIcon } from './add-guest-icon';
3
+ declare const meta: Meta<typeof AddGuestIcon>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof AddGuestIcon>;
6
+ export declare const Basic: Story;
7
+ export declare const White: Story;
@@ -1,18 +1,17 @@
1
- import React from 'react';
2
1
  import { AddGuestIcon } from './add-guest-icon';
3
- export default {
2
+ const meta = {
4
3
  title: 'Icons/Add Guest',
5
4
  component: AddGuestIcon
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(AddGuestIcon, 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
+ color: '#fff'
14
16
  }
15
- };
16
- White.args = {
17
- color: '#fff'
18
17
  };
@@ -1,15 +1,7 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FunctionComponent<{
4
- color?: string | undefined;
5
- rotateDeg: number;
6
- }>>;
7
- export default _default;
8
- export declare const Basic: ComponentStory<React.FunctionComponent<{
9
- color?: string | undefined;
10
- rotateDeg: number;
11
- }>>;
12
- export declare const White: ComponentStory<React.FunctionComponent<{
13
- color?: string | undefined;
14
- rotateDeg: number;
15
- }>>;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { CaretIcon } from './caret-icon';
3
+ declare const meta: Meta<typeof CaretIcon>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof CaretIcon>;
6
+ export declare const Basic: Story;
7
+ export declare const White: Story;
@@ -1,18 +1,17 @@
1
- import React from 'react';
2
1
  import { CaretIcon } from './caret-icon';
3
- export default {
2
+ const meta = {
4
3
  title: 'Icons/Caret',
5
4
  component: CaretIcon
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(CaretIcon, 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
+ color: '#fff'
14
16
  }
15
- };
16
- White.args = {
17
- color: '#fff'
18
17
  };
@@ -1,12 +1,7 @@
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
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { FilterIcon } from './filter-icon';
3
+ declare const meta: Meta<typeof FilterIcon>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof FilterIcon>;
6
+ export declare const Basic: Story;
7
+ export declare const White: Story;
@@ -1,18 +1,17 @@
1
- import React from 'react';
2
1
  import { FilterIcon } from './filter-icon';
3
- export default {
2
+ const meta = {
4
3
  title: 'Icons/Filter',
5
4
  component: FilterIcon
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(FilterIcon, 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
+ color: '#fff'
14
16
  }
15
- };
16
- White.args = {
17
- color: '#fff'
18
17
  };
@@ -1,12 +1,7 @@
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
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { SearchIcon } from './search-icon';
3
+ declare const meta: Meta<typeof SearchIcon>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof SearchIcon>;
6
+ export declare const Basic: Story;
7
+ export declare const White: Story;
@@ -1,18 +1,17 @@
1
- import React from 'react';
2
1
  import { SearchIcon } from './search-icon';
3
- export default {
2
+ const meta = {
4
3
  title: 'Icons/Search',
5
4
  component: SearchIcon
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(SearchIcon, 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
+ color: '#fff'
14
16
  }
15
- };
16
- White.args = {
17
- color: '#fff'
18
17
  };
@@ -1,12 +1,7 @@
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
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { SettingsIcon } from './settings-icon';
3
+ declare const meta: Meta<typeof SettingsIcon>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof SettingsIcon>;
6
+ export declare const Basic: Story;
7
+ export declare const White: Story;
@@ -1,18 +1,17 @@
1
- import React from 'react';
2
1
  import { SettingsIcon } from './settings-icon';
3
- export default {
2
+ const meta = {
4
3
  title: 'Icons/Settings',
5
4
  component: SettingsIcon
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(SettingsIcon, 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
+ color: '#fff'
14
16
  }
15
- };
16
- White.args = {
17
- color: '#fff'
18
17
  };
@@ -1,15 +1,7 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FunctionComponent<{
4
- color?: string | undefined;
5
- ascending: boolean;
6
- }>>;
7
- export default _default;
8
- export declare const Basic: ComponentStory<React.FunctionComponent<{
9
- color?: string | undefined;
10
- ascending: boolean;
11
- }>>;
12
- export declare const White: ComponentStory<React.FunctionComponent<{
13
- color?: string | undefined;
14
- ascending: boolean;
15
- }>>;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { SortListIcon } from './sort-list-icon';
3
+ declare const meta: Meta<typeof SortListIcon>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof SortListIcon>;
6
+ export declare const Basic: Story;
7
+ export declare const White: Story;
@@ -1,18 +1,17 @@
1
- import React from 'react';
2
1
  import { SortListIcon } from './sort-list-icon';
3
- export default {
2
+ const meta = {
4
3
  title: 'Icons/Sort List',
5
4
  component: SortListIcon
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(SortListIcon, 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
+ color: '#fff'
14
16
  }
15
- };
16
- White.args = {
17
- color: '#fff'
18
17
  };
package/dist/ui/tag.js CHANGED
@@ -1,12 +1,12 @@
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 Tag = props => {
6
6
  return /*#__PURE__*/React.createElement("div", {
7
- className: _JSXStyle.dynamic([["2407016309", [theme.fonts.primary, theme.colors.enterDarkGrey, theme.colors.enterGrey]]]) + " " + 'tag'
7
+ className: _JSXStyle.dynamic([["3070421237", [fonts.primary, colors.enterDarkGrey, colors.enterGrey]]]) + " " + 'tag'
8
8
  }, props.children, /*#__PURE__*/React.createElement(_JSXStyle, {
9
- id: "2407016309",
10
- dynamic: [theme.fonts.primary, theme.colors.enterDarkGrey, theme.colors.enterGrey]
11
- }, `.tag.__jsx-style-dynamic-selector{font-family:${theme.fonts.primary};font-size:0.8em;color:${theme.colors.enterDarkGrey};text-transform:uppercase;display:inline-block;background-color:transparent;border-radius:2px;border:1px solid ${theme.colors.enterGrey};padding:2px 8px;margin:0 0 0.5em 0.5em;word-wrap:anywhere;}`));
9
+ id: "3070421237",
10
+ dynamic: [fonts.primary, colors.enterDarkGrey, colors.enterGrey]
11
+ }, `.tag.__jsx-style-dynamic-selector{font-family:${fonts.primary};font-size:0.8em;color:${colors.enterDarkGrey};text-transform:uppercase;display:inline-block;background-color:transparent;border-radius:2px;border:1px solid ${colors.enterGrey};padding:2px 8px;margin:0 0 0.5em 0.5em;word-wrap:anywhere;}`));
12
12
  };
@@ -1,9 +1,6 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FunctionComponent<{
4
- children: React.ReactNode;
5
- }>>;
6
- export default _default;
7
- export declare const Basic: ComponentStory<React.FunctionComponent<{
8
- children: React.ReactNode;
9
- }>>;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Tag } from './tag';
3
+ declare const meta: Meta<typeof Tag>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof Tag>;
6
+ export declare const Basic: Story;
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
1
  import { Tag } from './tag';
3
- export default {
2
+ const meta = {
4
3
  title: 'Tag',
5
4
  component: Tag
6
5
  };
7
- const Template = args => /*#__PURE__*/React.createElement(Tag, args);
8
- export const Basic = Template.bind({});
9
- Basic.args = {
10
- children: 'my tag'
6
+ export default meta;
7
+ export const Basic = {
8
+ args: {
9
+ children: 'my tag'
10
+ }
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.72.0",
3
+ "version": "0.80.0",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",
@@ -20,8 +20,8 @@
20
20
  "build": "rm -r dist & babel src --extensions '.ts','.tsx' -d dist && tsc -d",
21
21
  "lint": "eslint src/ --ext .ts",
22
22
  "test": "echo \"Error: no test specified\" && exit 1",
23
- "storybook": "start-storybook -p 6006",
24
- "build-storybook": "build-storybook",
23
+ "storybook": "storybook dev -p 6006",
24
+ "build-storybook": "storybook build",
25
25
  "generate-client": "openapi-typescript https://api.enter.events/openapi.json --output src/generated/api-schema.ts --empty-objects-unknown --export-type"
26
26
  },
27
27
  "lint-staged": {
@@ -38,19 +38,20 @@
38
38
  },
39
39
  "homepage": "https://gitlab.com/dcb-enter/js-utils#readme",
40
40
  "devDependencies": {
41
- "@babel/cli": "^7.17.10",
42
- "@babel/core": "^7.18.5",
43
- "@babel/preset-env": "^7.18.2",
44
- "@babel/preset-react": "^7.17.12",
45
- "@babel/preset-typescript": "^7.17.12",
46
- "@storybook/addon-actions": "^6.5.15",
47
- "@storybook/addon-essentials": "^6.5.15",
48
- "@storybook/addon-interactions": "^6.5.15",
49
- "@storybook/addon-links": "^6.5.15",
50
- "@storybook/builder-webpack4": "^6.5.15",
51
- "@storybook/manager-webpack4": "^6.5.15",
52
- "@storybook/react": "^6.5.15",
53
- "@storybook/testing-library": "^0.0.13",
41
+ "@babel/cli": "^7.25.7",
42
+ "@babel/core": "^7.25.8",
43
+ "@babel/preset-env": "^7.25.8",
44
+ "@babel/preset-react": "^7.25.7",
45
+ "@babel/preset-typescript": "^7.25.7",
46
+ "@storybook/addon-actions": "^8.3.5",
47
+ "@storybook/addon-essentials": "^8.3.5",
48
+ "@storybook/addon-interactions": "^8.3.5",
49
+ "@storybook/addon-links": "^8.3.5",
50
+ "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
51
+ "@storybook/nextjs": "^8.3.5",
52
+ "@storybook/react": "^8.3.5",
53
+ "@storybook/react-webpack5": "^8.3.5",
54
+ "@storybook/test": "^8.3.5",
54
55
  "@types/cookie": "^0.6.0",
55
56
  "@types/jws": "^3.2.9",
56
57
  "@types/node": "^17.0.38",
@@ -75,7 +76,7 @@
75
76
  "dependencies": {
76
77
  "cookie": "^0.6.0",
77
78
  "jws": "^4.0.0",
78
- "styled-jsx": "^5.0.2",
79
+ "styled-jsx": "^5.1.6",
79
80
  "uuid": "^9.0.0"
80
81
  }
81
82
  }