@cincoders/cinnamon 0.2.1 → 0.4.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 (49) hide show
  1. package/dist/cinnamon.esm.js +97 -97
  2. package/dist/cinnamon.min.js +96 -96
  3. package/dist/cinnamon.ssr.js +98 -98
  4. package/dist/components/HamburgerButton/index.d.ts +7 -7
  5. package/dist/components/HamburgerButton/styles.d.ts +6 -6
  6. package/dist/components/SearchDropdown/index.d.ts +7 -7
  7. package/dist/components/SearchDropdown/styles.d.ts +6 -6
  8. package/dist/components/SideMenu/index.d.ts +9 -8
  9. package/dist/components/SideMenu/styles.d.ts +9 -6
  10. package/dist/components/SystemsPopup/index.d.ts +6 -8
  11. package/dist/components/SystemsPopup/styles.d.ts +5 -5
  12. package/dist/components/Toast/index.d.ts +9 -9
  13. package/dist/components/Toast/style.d.ts +3 -3
  14. package/dist/components/UserPopup/index.d.ts +10 -12
  15. package/dist/components/UserPopup/styles.d.ts +13 -13
  16. package/dist/index.d.ts +15 -14
  17. package/dist/interfaces/index.d.ts +39 -38
  18. package/dist/lib-components/Dialog/index.d.ts +13 -13
  19. package/dist/lib-components/Dialog/styles.d.ts +4 -4
  20. package/dist/lib-components/ErrorScreen/index.d.ts +11 -11
  21. package/dist/lib-components/ErrorScreen/style.d.ts +6 -6
  22. package/dist/lib-components/Footer/index.d.ts +15 -14
  23. package/dist/lib-components/Footer/styles.d.ts +13 -13
  24. package/dist/lib-components/ForbiddenPage/index.d.ts +6 -7
  25. package/dist/lib-components/ForbiddenPage/styles.d.ts +5 -5
  26. package/dist/lib-components/IconRender/index.d.ts +7 -7
  27. package/dist/lib-components/ImageInput/index.d.ts +9 -10
  28. package/dist/lib-components/ImageInput/styles.d.ts +4 -4
  29. package/dist/lib-components/Navbar/index.d.ts +24 -24
  30. package/dist/lib-components/Navbar/styles.d.ts +15 -15
  31. package/dist/lib-components/Page/index.d.ts +19 -20
  32. package/dist/lib-components/Page/styles.d.ts +2 -2
  33. package/dist/lib-components/Page/useNavbar.d.ts +30 -30
  34. package/dist/lib-components/PageWithAuth/index.d.ts +12 -0
  35. package/dist/lib-components/RequireAuth/index.d.ts +10 -10
  36. package/dist/stories/Dialog.stories.d.ts +8 -8
  37. package/dist/stories/Footer.stories.d.ts +181 -165
  38. package/dist/stories/ForbiddenPage.stories.d.ts +8 -0
  39. package/dist/stories/ImageInput.stories.d.ts +5 -0
  40. package/dist/stories/Navbar.stories.d.ts +154 -154
  41. package/dist/stories/Page.stories.d.ts +30 -30
  42. package/dist/stories/SideMenu.stories.d.ts +8 -8
  43. package/dist/stories/SystemsPopup.stories.d.ts +8 -0
  44. package/dist/stories/UserPopup.stories.d.ts +8 -0
  45. package/dist/stories/sampledata/SampleData.d.ts +6 -6
  46. package/dist/stories/utils/argTypes.d.ts +286 -271
  47. package/dist/utils/index.d.ts +1 -1
  48. package/dist/utils/keycloakUtils.d.ts +2 -2
  49. package/package.json +12 -15
@@ -1,20 +1,19 @@
1
- /// <reference types="react" />
2
- import { NavbarProps } from '../Navbar/index';
3
- import { FooterProps } from '../Footer/index';
4
- import { NavbarContextValue } from './useNavbar';
5
- interface PageProps {
6
- navbar?: NavbarProps;
7
- footer?: FooterProps;
8
- children: JSX.Element | JSX.Element[];
9
- centralized?: boolean;
10
- haveToast?: boolean;
11
- components?: {
12
- navbar?: JSX.Element;
13
- footer?: JSX.Element;
14
- toastContainer?: JSX.Element;
15
- };
16
- createNavbarContext: boolean;
17
- }
18
- export declare const NavbarContext: import("react").Context<NavbarContextValue | undefined>;
19
- export declare function Page({ navbar, footer, children, centralized, haveToast, components, createNavbarContext }: PageProps): JSX.Element;
20
- export {};
1
+ /// <reference types="react" />
2
+ import { NavbarProps } from '../Navbar/index';
3
+ import { FooterProps } from '../Footer/index';
4
+ import { NavbarContextValue } from './useNavbar';
5
+ export interface PageProps {
6
+ navbar?: NavbarProps;
7
+ footer?: FooterProps;
8
+ children: JSX.Element | JSX.Element[];
9
+ centralized?: boolean;
10
+ haveToast?: boolean;
11
+ components?: {
12
+ navbar?: JSX.Element;
13
+ footer?: JSX.Element;
14
+ toastContainer?: JSX.Element;
15
+ };
16
+ createNavbarContext: boolean;
17
+ }
18
+ export declare const NavbarContext: import("react").Context<NavbarContextValue | undefined>;
19
+ export declare function Page({ navbar, footer, children, centralized, haveToast, components, createNavbarContext }: PageProps): JSX.Element;
@@ -1,2 +1,2 @@
1
- export declare const MainDiv: import("styled-components").StyledComponent<"main", any, {}, never>;
2
- export declare const Parent: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const MainDiv: import("styled-components").StyledComponent<"main", any, {}, never>;
2
+ export declare const Parent: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,30 +1,30 @@
1
- /// <reference types="react" />
2
- import { SideMenuLink, System, User } from '@/interfaces';
3
- import { NavbarProps } from '../Navbar';
4
- import Keycloak from 'keycloak-js';
5
- export declare class NavbarContextValue implements NavbarProps {
6
- keycloakInstance?: Keycloak;
7
- logoRedirectUrl?: string;
8
- logoSrc?: string;
9
- haveSearchBar?: boolean;
10
- hiddenUser?: boolean;
11
- title?: string;
12
- h1?: boolean;
13
- searchFunction?: (searchString: string) => void;
14
- searchDropdownLabelsList?: string[];
15
- logoutFunction?: () => void;
16
- user?: User;
17
- sideMenuLinks?: SideMenuLink[];
18
- isLandingPage?: boolean;
19
- systemsList?: System[];
20
- currentSystemIconUrl?: string;
21
- children?: JSX.Element;
22
- accountManagementUrl?: string;
23
- setNavbarProps: React.Dispatch<React.SetStateAction<NavbarProps>>;
24
- constructor(navbarProps: NavbarProps, setNavbarProps: React.Dispatch<React.SetStateAction<NavbarProps>>);
25
- setTitle(newTitle: string): void;
26
- setSearchFuncion(newSearchFunction: (searchString: string) => void): void;
27
- setHaveSearchBar(newHaveSearchBar: boolean): void;
28
- setSideMenuLinks(newSideMenuLinks: SideMenuLink[]): void;
29
- }
30
- export declare const useNavbar: () => NavbarContextValue | undefined;
1
+ /// <reference types="react" />
2
+ import { SideMenuLink, System, User } from '@/interfaces';
3
+ import { NavbarProps } from '../Navbar';
4
+ import Keycloak from 'keycloak-js';
5
+ export declare class NavbarContextValue implements NavbarProps {
6
+ keycloakInstance?: Keycloak;
7
+ logoRedirectUrl?: string;
8
+ logoSrc?: string;
9
+ haveSearchBar?: boolean;
10
+ hiddenUser?: boolean;
11
+ title?: string;
12
+ h1?: boolean;
13
+ searchFunction?: (searchString: string) => void;
14
+ searchDropdownLabelsList?: string[];
15
+ logoutFunction?: () => void;
16
+ user?: User;
17
+ sideMenuLinks?: SideMenuLink[];
18
+ isLandingPage?: boolean;
19
+ systemsList?: System[];
20
+ currentSystemIconUrl?: string;
21
+ children?: JSX.Element;
22
+ accountManagementUrl?: string;
23
+ setNavbarProps: React.Dispatch<React.SetStateAction<NavbarProps>>;
24
+ constructor(navbarProps: NavbarProps, setNavbarProps: React.Dispatch<React.SetStateAction<NavbarProps>>);
25
+ setTitle(newTitle: string): void;
26
+ setSearchFuncion(newSearchFunction: (searchString: string) => void): void;
27
+ setHaveSearchBar(newHaveSearchBar: boolean): void;
28
+ setSideMenuLinks(newSideMenuLinks: SideMenuLink[]): void;
29
+ }
30
+ export declare const useNavbar: () => NavbarContextValue | undefined;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { PageProps } from '../Page';
3
+ import Keycloak from 'keycloak-js';
4
+ interface PageWithAuthProps extends PageProps {
5
+ auth: {
6
+ keycloak: Keycloak;
7
+ initialized: boolean;
8
+ permittedRoles: string[];
9
+ };
10
+ }
11
+ export declare function PageWithAuth({ auth, navbar, footer, centralized, haveToast, createNavbarContext, components, children }: PageWithAuthProps): JSX.Element;
12
+ export {};
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- import Keycloak from 'keycloak-js';
3
- interface AuthProps {
4
- keycloak: Keycloak;
5
- initialized: boolean;
6
- permittedRoles: string[];
7
- children: JSX.Element;
8
- }
9
- export declare const RequireAuth: (props: AuthProps) => React.ReactElement;
10
- export {};
1
+ /// <reference types="react" />
2
+ import Keycloak from 'keycloak-js';
3
+ interface AuthProps {
4
+ keycloak: Keycloak;
5
+ initialized: boolean;
6
+ permittedRoles: string[];
7
+ children: JSX.Element;
8
+ }
9
+ export declare const RequireAuth: (props: AuthProps) => React.ReactElement;
10
+ export {};
@@ -1,8 +1,8 @@
1
- import { DialogProps } from '../lib-components/Dialog';
2
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
3
- export default _default;
4
- export declare const DialogInformation: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
5
- export declare const DialogAlert: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
6
- export declare const DialogDecision: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
7
- export declare const DialogConfirmation: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
8
- export declare const DialogError: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
1
+ import { DialogProps } from '../lib-components/Dialog';
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
3
+ export default _default;
4
+ export declare const DialogInformation: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
5
+ export declare const DialogAlert: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
6
+ export declare const DialogDecision: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
7
+ export declare const DialogConfirmation: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
8
+ export declare const DialogError: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, DialogProps>;
@@ -1,165 +1,181 @@
1
- import './storiesGlobals.css';
2
- declare const _default: {
3
- title: string;
4
- parameters: {
5
- docs: {
6
- page: null;
7
- };
8
- };
9
- argTypes: {
10
- footerTitle: {
11
- name: string;
12
- type: {
13
- name: string;
14
- required: boolean;
15
- };
16
- description: string;
17
- control: {
18
- type: string;
19
- };
20
- table: {
21
- category: string;
22
- };
23
- };
24
- footerTelephone: {
25
- name: string;
26
- type: {
27
- name: string;
28
- required: boolean;
29
- };
30
- description: string;
31
- control: {
32
- type: string;
33
- };
34
- table: {
35
- category: string;
36
- };
37
- };
38
- footerTelephoneComplement: {
39
- name: string;
40
- type: {
41
- name: string;
42
- required: boolean;
43
- };
44
- description: string;
45
- control: {
46
- type: string;
47
- };
48
- table: {
49
- category: string;
50
- };
51
- };
52
- footerEmail: {
53
- name: string;
54
- type: {
55
- name: string;
56
- required: boolean;
57
- };
58
- description: string;
59
- control: {
60
- type: string;
61
- };
62
- table: {
63
- category: string;
64
- };
65
- };
66
- footerLink: {
67
- name: string;
68
- type: {
69
- name: string;
70
- required: boolean;
71
- };
72
- description: string;
73
- control: {
74
- type: string;
75
- };
76
- table: {
77
- category: string;
78
- };
79
- };
80
- footerTextLink: {
81
- name: string;
82
- type: {
83
- name: string;
84
- required: boolean;
85
- };
86
- description: string;
87
- control: {
88
- type: string;
89
- };
90
- table: {
91
- category: string;
92
- };
93
- };
94
- footerDescription: {
95
- name: string;
96
- type: {
97
- name: string;
98
- required: boolean;
99
- };
100
- description: string;
101
- control: {
102
- type: string;
103
- };
104
- table: {
105
- category: string;
106
- };
107
- };
108
- footerCopyrightText: {
109
- name: string;
110
- type: {
111
- name: string;
112
- required: boolean;
113
- };
114
- description: string;
115
- control: {
116
- type: string;
117
- };
118
- table: {
119
- category: string;
120
- };
121
- };
122
- footerSignatureText: {
123
- name: string;
124
- type: {
125
- name: string;
126
- required: boolean;
127
- };
128
- description: string;
129
- control: {
130
- type: string;
131
- };
132
- table: {
133
- category: string;
134
- };
135
- };
136
- footerSignatureLink: {
137
- name: string;
138
- type: {
139
- name: string;
140
- required: boolean;
141
- };
142
- description: string;
143
- control: {
144
- type: string;
145
- };
146
- table: {
147
- category: string;
148
- };
149
- };
150
- };
151
- };
152
- export default _default;
153
- export interface FooterStoryProps {
154
- footerTitle: string;
155
- footerTelephone: string;
156
- footerTelephoneComplement: string;
157
- footerEmail: string;
158
- footerLink: string;
159
- footerTextLink: string;
160
- footerDescription: string;
161
- footerCopyrightText: string;
162
- footerSignatureText: string;
163
- footerSignatureLink: string;
164
- }
165
- export declare const Footer_: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FooterStoryProps>;
1
+ import './storiesGlobals.css';
2
+ declare const _default: {
3
+ title: string;
4
+ parameters: {
5
+ docs: {
6
+ page: null;
7
+ };
8
+ };
9
+ argTypes: {
10
+ footerTitle: {
11
+ name: string;
12
+ type: {
13
+ name: string;
14
+ required: boolean;
15
+ };
16
+ description: string;
17
+ control: {
18
+ type: string;
19
+ };
20
+ table: {
21
+ category: string;
22
+ };
23
+ };
24
+ footerTelephone: {
25
+ name: string;
26
+ type: {
27
+ name: string;
28
+ required: boolean;
29
+ };
30
+ description: string;
31
+ control: {
32
+ type: string;
33
+ };
34
+ table: {
35
+ category: string;
36
+ };
37
+ };
38
+ footerTelephoneComplement: {
39
+ name: string;
40
+ type: {
41
+ name: string;
42
+ required: boolean;
43
+ };
44
+ description: string;
45
+ control: {
46
+ type: string;
47
+ };
48
+ table: {
49
+ category: string;
50
+ };
51
+ };
52
+ footerEmail: {
53
+ name: string;
54
+ type: {
55
+ name: string;
56
+ required: boolean;
57
+ };
58
+ description: string;
59
+ control: {
60
+ type: string;
61
+ };
62
+ table: {
63
+ category: string;
64
+ };
65
+ };
66
+ footerLink: {
67
+ name: string;
68
+ type: {
69
+ name: string;
70
+ required: boolean;
71
+ };
72
+ description: string;
73
+ control: {
74
+ type: string;
75
+ };
76
+ table: {
77
+ category: string;
78
+ };
79
+ };
80
+ footerTextLink: {
81
+ name: string;
82
+ type: {
83
+ name: string;
84
+ required: boolean;
85
+ };
86
+ description: string;
87
+ control: {
88
+ type: string;
89
+ };
90
+ table: {
91
+ category: string;
92
+ };
93
+ };
94
+ footerDescription: {
95
+ name: string;
96
+ type: {
97
+ name: string;
98
+ required: boolean;
99
+ };
100
+ description: string;
101
+ control: {
102
+ type: string;
103
+ };
104
+ table: {
105
+ category: string;
106
+ };
107
+ };
108
+ footerCopyrightText: {
109
+ name: string;
110
+ type: {
111
+ name: string;
112
+ required: boolean;
113
+ };
114
+ description: string;
115
+ control: {
116
+ type: string;
117
+ };
118
+ table: {
119
+ category: string;
120
+ };
121
+ };
122
+ footerSignatureText: {
123
+ name: string;
124
+ type: {
125
+ name: string;
126
+ required: boolean;
127
+ };
128
+ description: string;
129
+ control: {
130
+ type: string;
131
+ };
132
+ table: {
133
+ category: string;
134
+ };
135
+ };
136
+ footerSignatureLink: {
137
+ name: string;
138
+ type: {
139
+ name: string;
140
+ required: boolean;
141
+ };
142
+ description: string;
143
+ control: {
144
+ type: string;
145
+ };
146
+ table: {
147
+ category: string;
148
+ };
149
+ };
150
+ footerLargeFooter: {
151
+ name: string;
152
+ type: {
153
+ name: string;
154
+ required: boolean;
155
+ };
156
+ description: string;
157
+ options: boolean[];
158
+ control: {
159
+ type: string;
160
+ };
161
+ table: {
162
+ category: string;
163
+ };
164
+ };
165
+ };
166
+ };
167
+ export default _default;
168
+ export interface FooterStoryProps {
169
+ footerTitle: string;
170
+ footerTelephone: string;
171
+ footerTelephoneComplement: string;
172
+ footerEmail: string;
173
+ footerLink: string;
174
+ footerTextLink: string;
175
+ footerDescription: string;
176
+ footerCopyrightText: string;
177
+ footerSignatureText: string;
178
+ footerSignatureLink: string;
179
+ footerLargeFooter: boolean;
180
+ }
181
+ export declare const Footer_: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FooterStoryProps>;
@@ -0,0 +1,8 @@
1
+ import Keycloak from 'keycloak-js';
2
+ import { StoryFn } from '@storybook/react';
3
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
4
+ export default _default;
5
+ interface ForbbidenPageStoryProps {
6
+ keycloak: Keycloak;
7
+ }
8
+ export declare const ForbiddenPage_: StoryFn<ForbbidenPageStoryProps>;
@@ -0,0 +1,5 @@
1
+ import './storiesGlobals.css';
2
+ import { StoryFn } from '@storybook/react';
3
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
4
+ export default _default;
5
+ export declare const ImageInput_: StoryFn;