@commercetools-frontend/application-components 22.12.0 → 22.13.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 (24) hide show
  1. package/dist/commercetools-frontend-application-components.cjs.dev.js +366 -256
  2. package/dist/commercetools-frontend-application-components.cjs.prod.js +269 -185
  3. package/dist/commercetools-frontend-application-components.esm.js +367 -257
  4. package/dist/declarations/src/components/detail-pages/custom-form-detail-page/custom-form-detail-page.d.ts +2 -2
  5. package/dist/declarations/src/components/detail-pages/form-detail-page/form-detail-page.d.ts +2 -2
  6. package/dist/declarations/src/components/detail-pages/info-detail-page/info-detail-page.d.ts +2 -2
  7. package/dist/declarations/src/components/detail-pages/tabular-detail-page/tabular-detail-page.d.ts +2 -2
  8. package/dist/declarations/src/components/drawer/drawer.d.ts +180 -0
  9. package/dist/declarations/src/components/drawer/index.d.ts +1 -0
  10. package/dist/declarations/src/components/internals/page-header-title.d.ts +2 -1
  11. package/dist/declarations/src/components/main-pages/custom-form-main-page/custom-form-main-page.d.ts +2 -2
  12. package/dist/declarations/src/components/main-pages/form-main-page/form-main-page.d.ts +2 -2
  13. package/dist/declarations/src/components/main-pages/info-main-page/info-main-page.d.ts +2 -2
  14. package/dist/declarations/src/components/main-pages/tabular-main-page/tabular-main-page.d.ts +2 -2
  15. package/dist/declarations/src/components/modal-pages/internals/modal-page-top-bar.d.ts +7 -1
  16. package/dist/declarations/src/components/modal-pages/internals/modal-page.d.ts +3 -1
  17. package/dist/declarations/src/components/modal-pages/internals/modal-page.styles.d.ts +22 -4
  18. package/dist/declarations/src/index.d.ts +1 -1
  19. package/package.json +9 -9
  20. package/dist/declarations/src/components/custom-views/custom-panel/custom-panel.d.ts +0 -9
  21. package/dist/declarations/src/components/custom-views/custom-panel/index.d.ts +0 -1
  22. package/dist/{public-page-layout-0e1daa2e.cjs.prod.js → public-page-layout-295bf2b5.cjs.prod.js} +2 -2
  23. package/dist/{public-page-layout-82978d93.esm.js → public-page-layout-c0dbc038.esm.js} +2 -2
  24. package/dist/{public-page-layout-4e26387d.cjs.dev.js → public-page-layout-e590ce5b.cjs.dev.js} +2 -2
@@ -23,7 +23,7 @@ declare const CustomFormDetailPage: {
23
23
  PageHeaderTitle: {
24
24
  (props: {
25
25
  title: string;
26
- titleSize: "big" | "small";
26
+ titleSize: "big" | "small" | "medium";
27
27
  truncate: boolean;
28
28
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
29
29
  children?: undefined;
@@ -31,7 +31,7 @@ declare const CustomFormDetailPage: {
31
31
  displayName: string;
32
32
  defaultProps: Pick<{
33
33
  title: string;
34
- titleSize: "big" | "small";
34
+ titleSize: "big" | "small" | "medium";
35
35
  truncate: boolean;
36
36
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
37
37
  children?: undefined;
@@ -35,7 +35,7 @@ declare const FormDetailPage: {
35
35
  PageHeaderTitle: {
36
36
  (props: {
37
37
  title: string;
38
- titleSize: "big" | "small";
38
+ titleSize: "big" | "small" | "medium";
39
39
  truncate: boolean;
40
40
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
41
41
  children?: undefined;
@@ -43,7 +43,7 @@ declare const FormDetailPage: {
43
43
  displayName: string;
44
44
  defaultProps: Pick<{
45
45
  title: string;
46
- titleSize: "big" | "small";
46
+ titleSize: "big" | "small" | "medium";
47
47
  truncate: boolean;
48
48
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
49
49
  children?: undefined;
@@ -20,7 +20,7 @@ declare const InfoDetailPage: {
20
20
  PageHeaderTitle: {
21
21
  (props: {
22
22
  title: string;
23
- titleSize: "big" | "small";
23
+ titleSize: "big" | "small" | "medium";
24
24
  truncate: boolean;
25
25
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
26
26
  children?: undefined;
@@ -28,7 +28,7 @@ declare const InfoDetailPage: {
28
28
  displayName: string;
29
29
  defaultProps: Pick<{
30
30
  title: string;
31
- titleSize: "big" | "small";
31
+ titleSize: "big" | "small" | "medium";
32
32
  truncate: boolean;
33
33
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
34
34
  children?: undefined;
@@ -116,7 +116,7 @@ declare const TabularDetailPage: {
116
116
  PageHeaderTitle: {
117
117
  (props: {
118
118
  title: string;
119
- titleSize: "big" | "small";
119
+ titleSize: "big" | "small" | "medium";
120
120
  truncate: boolean;
121
121
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
122
122
  children?: undefined;
@@ -124,7 +124,7 @@ declare const TabularDetailPage: {
124
124
  displayName: string;
125
125
  defaultProps: Pick<{
126
126
  title: string;
127
- titleSize: "big" | "small";
127
+ titleSize: "big" | "small" | "medium";
128
128
  truncate: boolean;
129
129
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
130
130
  children?: undefined;
@@ -0,0 +1,180 @@
1
+ import type { ReactElement, ReactNode, SyntheticEvent } from 'react';
2
+ import { type CSSObject } from '@emotion/styled';
3
+ type MessageDescriptor = {
4
+ id: string;
5
+ description?: string | object;
6
+ defaultMessage?: string;
7
+ };
8
+ type Label = string | MessageDescriptor;
9
+ type TDrawerSize = 10 | 20 | 30;
10
+ type TDrawerProps = {
11
+ size: TDrawerSize;
12
+ isOpen: boolean;
13
+ onClose?: (event: SyntheticEvent) => void;
14
+ children: ReactNode;
15
+ topBarColor?: 'neutral' | 'surface';
16
+ title: string;
17
+ subtitle?: string;
18
+ zIndex?: number;
19
+ getParentSelector?: () => HTMLElement;
20
+ shouldDelayOnClose?: boolean;
21
+ afterOpenStyles?: string | CSSObject;
22
+ customViewLocatorCode?: string;
23
+ hideControls?: boolean;
24
+ formControls?: ReactNode;
25
+ isPrimaryButtonDisabled?: boolean;
26
+ isSecondaryButtonDisabled?: boolean;
27
+ dataAttributesPrimaryButton?: {
28
+ [key: string]: string;
29
+ };
30
+ dataAttributesSecondaryButton?: {
31
+ [key: string]: string;
32
+ };
33
+ labelPrimaryButton?: Label;
34
+ labelSecondaryButton?: Label;
35
+ onPrimaryButtonClick: (event: SyntheticEvent) => void;
36
+ onSecondaryButtonClick: (event: SyntheticEvent) => void;
37
+ iconLeftSecondaryButton?: ReactElement;
38
+ };
39
+ declare function Drawer(props: TDrawerProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
40
+ declare namespace Drawer {
41
+ var displayName: string;
42
+ var defaultProps: Pick<TDrawerProps, "size" | "onSecondaryButtonClick" | "onPrimaryButtonClick" | "hideControls">;
43
+ var FormPrimaryButton: {
44
+ (props: {
45
+ label: string | {
46
+ id: string;
47
+ description?: string | object | undefined;
48
+ defaultMessage?: string | undefined;
49
+ };
50
+ onClick: (event: SyntheticEvent<Element, Event>) => void;
51
+ isDisabled: boolean;
52
+ dataAttributes: {
53
+ [key: string]: string;
54
+ };
55
+ children?: undefined;
56
+ }): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
57
+ displayName: string;
58
+ defaultProps: Pick<{
59
+ label: string | {
60
+ id: string;
61
+ description?: string | object | undefined;
62
+ defaultMessage?: string | undefined;
63
+ };
64
+ onClick: (event: SyntheticEvent<Element, Event>) => void;
65
+ isDisabled: boolean;
66
+ dataAttributes: {
67
+ [key: string]: string;
68
+ };
69
+ children?: undefined;
70
+ }, "label" | "isDisabled" | "dataAttributes">;
71
+ };
72
+ var FormSecondaryButton: {
73
+ (props: {
74
+ iconLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
75
+ } & {
76
+ label: string | {
77
+ id: string;
78
+ description?: string | object | undefined;
79
+ defaultMessage?: string | undefined;
80
+ };
81
+ onClick: (event: SyntheticEvent<Element, Event>) => void;
82
+ isDisabled: boolean;
83
+ dataAttributes: {
84
+ [key: string]: string;
85
+ };
86
+ children?: undefined;
87
+ }): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
88
+ displayName: string;
89
+ defaultProps: Pick<{
90
+ iconLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
91
+ } & {
92
+ label: string | {
93
+ id: string;
94
+ description?: string | object | undefined;
95
+ defaultMessage?: string | undefined;
96
+ };
97
+ onClick: (event: SyntheticEvent<Element, Event>) => void;
98
+ isDisabled: boolean;
99
+ dataAttributes: {
100
+ [key: string]: string;
101
+ };
102
+ children?: undefined;
103
+ }, "label" | "isDisabled" | "dataAttributes">;
104
+ };
105
+ var Intl: {
106
+ cancel: {
107
+ id: string;
108
+ defaultMessage: string;
109
+ };
110
+ revert: {
111
+ id: string;
112
+ defaultMessage: string;
113
+ };
114
+ confirm: {
115
+ id: string;
116
+ defaultMessage: string;
117
+ };
118
+ save: {
119
+ id: string;
120
+ defaultMessage: string;
121
+ };
122
+ update: {
123
+ id: string;
124
+ defaultMessage: string;
125
+ };
126
+ create: {
127
+ id: string;
128
+ defaultMessage: string;
129
+ };
130
+ delete: {
131
+ id: string;
132
+ defaultMessage: string;
133
+ };
134
+ add: {
135
+ id: string;
136
+ defaultMessage: string;
137
+ };
138
+ remove: {
139
+ id: string;
140
+ defaultMessage: string;
141
+ };
142
+ close: {
143
+ id: string;
144
+ defaultMessage: string;
145
+ };
146
+ edit: {
147
+ id: string;
148
+ defaultMessage: string;
149
+ };
150
+ open: {
151
+ id: string;
152
+ defaultMessage: string;
153
+ };
154
+ activate: {
155
+ id: string;
156
+ defaultMessage: string;
157
+ };
158
+ deactivate: {
159
+ id: string;
160
+ defaultMessage: string;
161
+ };
162
+ active: {
163
+ id: string;
164
+ defaultMessage: string;
165
+ };
166
+ inactive: {
167
+ id: string;
168
+ defaultMessage: string;
169
+ };
170
+ enable: {
171
+ id: string;
172
+ defaultMessage: string;
173
+ };
174
+ disable: {
175
+ id: string;
176
+ defaultMessage: string;
177
+ };
178
+ };
179
+ }
180
+ export default Drawer;
@@ -0,0 +1 @@
1
+ export { default } from './drawer';
@@ -1,7 +1,8 @@
1
1
  import { type ReactElement } from 'react';
2
+ type TTitleSize = 'big' | 'medium' | 'small';
2
3
  type Props = {
3
4
  title: string;
4
- titleSize: 'big' | 'small';
5
+ titleSize: TTitleSize;
5
6
  truncate: boolean;
6
7
  subtitle?: string | ReactElement;
7
8
  children?: never;
@@ -16,7 +16,7 @@ declare const CustomFormMainPage: {
16
16
  PageHeaderTitle: {
17
17
  (props: {
18
18
  title: string;
19
- titleSize: "big" | "small";
19
+ titleSize: "big" | "small" | "medium";
20
20
  truncate: boolean;
21
21
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
22
22
  children?: undefined;
@@ -24,7 +24,7 @@ declare const CustomFormMainPage: {
24
24
  displayName: string;
25
25
  defaultProps: Pick<{
26
26
  title: string;
27
- titleSize: "big" | "small";
27
+ titleSize: "big" | "small" | "medium";
28
28
  truncate: boolean;
29
29
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
30
30
  children?: undefined;
@@ -33,7 +33,7 @@ declare const FormMainPage: {
33
33
  PageHeaderTitle: {
34
34
  (props: {
35
35
  title: string;
36
- titleSize: "big" | "small";
36
+ titleSize: "big" | "small" | "medium";
37
37
  truncate: boolean;
38
38
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
39
39
  children?: undefined;
@@ -41,7 +41,7 @@ declare const FormMainPage: {
41
41
  displayName: string;
42
42
  defaultProps: Pick<{
43
43
  title: string;
44
- titleSize: "big" | "small";
44
+ titleSize: "big" | "small" | "medium";
45
45
  truncate: boolean;
46
46
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
47
47
  children?: undefined;
@@ -12,7 +12,7 @@ declare const InfoMainPage: {
12
12
  PageHeaderTitle: {
13
13
  (props: {
14
14
  title: string;
15
- titleSize: "big" | "small";
15
+ titleSize: "big" | "small" | "medium";
16
16
  truncate: boolean;
17
17
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
18
18
  children?: undefined;
@@ -20,7 +20,7 @@ declare const InfoMainPage: {
20
20
  displayName: string;
21
21
  defaultProps: Pick<{
22
22
  title: string;
23
- titleSize: "big" | "small";
23
+ titleSize: "big" | "small" | "medium";
24
24
  truncate: boolean;
25
25
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
26
26
  children?: undefined;
@@ -108,7 +108,7 @@ declare const TabularMainPage: {
108
108
  PageHeaderTitle: {
109
109
  (props: {
110
110
  title: string;
111
- titleSize: "big" | "small";
111
+ titleSize: "big" | "small" | "medium";
112
112
  truncate: boolean;
113
113
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
114
114
  children?: undefined;
@@ -116,7 +116,7 @@ declare const TabularMainPage: {
116
116
  displayName: string;
117
117
  defaultProps: Pick<{
118
118
  title: string;
119
- titleSize: "big" | "small";
119
+ titleSize: "big" | "small" | "medium";
120
120
  truncate: boolean;
121
121
  subtitle?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
122
122
  children?: undefined;
@@ -1,4 +1,10 @@
1
- import { type SyntheticEvent } from 'react';
1
+ import { type SyntheticEvent, type ReactElement } from 'react';
2
+ import { type TSecondaryButtonIconProps } from '@commercetools-uikit/secondary-icon-button';
3
+ type TLargeIconWrapperProps = {
4
+ children: ReactElement;
5
+ size?: TSecondaryButtonIconProps['size'];
6
+ };
7
+ export declare const LargeIconWrapper: (props: TLargeIconWrapperProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
2
8
  type MessageDescriptor = {
3
9
  id: string;
4
10
  description?: string | object;
@@ -7,6 +7,7 @@ type MessageDescriptor = {
7
7
  defaultMessage?: string;
8
8
  };
9
9
  type Label = string | MessageDescriptor;
10
+ export type TModalPageSize = 10 | 20 | 30 | 'scale';
10
11
  type Props = {
11
12
  level?: number;
12
13
  title: string;
@@ -23,7 +24,8 @@ type Props = {
23
24
  currentPathLabel?: string;
24
25
  previousPathLabel?: Label;
25
26
  hidePathLabel?: boolean;
26
- size?: 'small' | 'large';
27
+ size: TModalPageSize;
28
+ hideTopBar?: boolean;
27
29
  };
28
30
  declare const ModalPage: {
29
31
  (props: Props): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
@@ -1,13 +1,31 @@
1
1
  import { type SerializedStyles } from '@emotion/react';
2
- export declare const TRANSITION_DURATION = 200;
2
+ import type { TModalPageSize } from './modal-page';
3
3
  type StyleProps = {
4
4
  zIndex?: number;
5
- size?: 'small' | 'large';
5
+ size: TModalPageSize;
6
6
  };
7
- export declare const getContainerStyles: (_props: StyleProps) => SerializedStyles;
7
+ export declare const stylesBySize: {
8
+ '10': {
9
+ width: string;
10
+ transitionTime: number;
11
+ };
12
+ '20': {
13
+ width: string;
14
+ transitionTime: number;
15
+ };
16
+ '30': {
17
+ width: string;
18
+ transitionTime: number;
19
+ };
20
+ scale: {
21
+ width: string;
22
+ transitionTime: number;
23
+ };
24
+ };
25
+ export declare const getContainerStyles: (props: StyleProps) => SerializedStyles;
8
26
  export declare const getOverlayStyles: (props: StyleProps) => SerializedStyles;
9
27
  export declare const getAfterOpenContainerAnimation: () => SerializedStyles;
10
28
  export declare const getAfterOpenOverlayAnimation: () => SerializedStyles;
11
- export declare const getBeforeCloseContainerAnimation: () => SerializedStyles;
29
+ export declare const getBeforeCloseContainerAnimation: (props: StyleProps) => SerializedStyles;
12
30
  export declare const getBeforeCloseOverlayAnimation: () => SerializedStyles;
13
31
  export {};
@@ -25,7 +25,7 @@ export { default as PageContentWide } from './components/page-content-containers
25
25
  export type { TPageContentWide } from './components/page-content-containers/page-content-wide';
26
26
  export { default as PageContentFull } from './components/page-content-containers/page-content-full';
27
27
  export type { TPageContentFull } from './components/page-content-containers/page-content-full';
28
- export { default as CustomPanel } from './components/custom-views/custom-panel';
28
+ export { default as Drawer } from './components/drawer';
29
29
  export { default as CustomViewLoader } from './components/custom-views/custom-view-loader';
30
30
  export { default as CustomViewsSelector } from './components/custom-views/custom-views-selector';
31
31
  export { default as PortalsContainer } from './components/portals-container';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-components",
3
- "version": "22.12.0",
3
+ "version": "22.13.0",
4
4
  "description": "Generic components for building Merchant Center applications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -36,14 +36,14 @@
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.22.15",
38
38
  "@babel/runtime-corejs3": "^7.22.15",
39
- "@commercetools-frontend/actions-global": "22.12.0",
40
- "@commercetools-frontend/application-config": "22.12.0",
41
- "@commercetools-frontend/application-shell-connectors": "22.12.0",
42
- "@commercetools-frontend/assets": "22.12.0",
43
- "@commercetools-frontend/constants": "22.12.0",
44
- "@commercetools-frontend/i18n": "22.12.0",
45
- "@commercetools-frontend/l10n": "22.12.0",
46
- "@commercetools-frontend/sentry": "22.12.0",
39
+ "@commercetools-frontend/actions-global": "22.13.0",
40
+ "@commercetools-frontend/application-config": "22.13.0",
41
+ "@commercetools-frontend/application-shell-connectors": "22.13.0",
42
+ "@commercetools-frontend/assets": "22.13.0",
43
+ "@commercetools-frontend/constants": "22.13.0",
44
+ "@commercetools-frontend/i18n": "22.13.0",
45
+ "@commercetools-frontend/l10n": "22.13.0",
46
+ "@commercetools-frontend/sentry": "22.13.0",
47
47
  "@commercetools-uikit/card": "^16.7.3",
48
48
  "@commercetools-uikit/constraints": "^16.7.3",
49
49
  "@commercetools-uikit/design-system": "^16.7.3",
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- type TCustomPanelProps = {
3
- title: string;
4
- size: 'small' | 'large';
5
- onClose: () => void;
6
- children: ReactNode;
7
- };
8
- declare function CustomPanel(props: TCustomPanelProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
9
- export default CustomPanel;
@@ -1 +0,0 @@
1
- export { default } from './custom-panel';
@@ -40,9 +40,9 @@ require('@commercetools-frontend/sentry');
40
40
  require('@commercetools-uikit/constraints');
41
41
  require('@commercetools-frontend/actions-global');
42
42
  require('@commercetools-frontend/application-shell-connectors');
43
- require('@flopflip/react-broadcast');
44
- require('@commercetools-uikit/flat-button');
45
43
  require('@commercetools-uikit/icon-button');
44
+ require('@commercetools-uikit/flat-button');
45
+ require('@flopflip/react-broadcast');
46
46
  require('@babel/runtime-corejs3/core-js-stable/instance/find');
47
47
  require('@babel/runtime-corejs3/core-js-stable/object/entries');
48
48
  require('@commercetools-frontend/assets/images/page-not-found.svg');
@@ -38,9 +38,9 @@ import '@commercetools-frontend/sentry';
38
38
  import '@commercetools-uikit/constraints';
39
39
  import '@commercetools-frontend/actions-global';
40
40
  import '@commercetools-frontend/application-shell-connectors';
41
- import '@flopflip/react-broadcast';
42
- import '@commercetools-uikit/flat-button';
43
41
  import '@commercetools-uikit/icon-button';
42
+ import '@commercetools-uikit/flat-button';
43
+ import '@flopflip/react-broadcast';
44
44
  import '@babel/runtime-corejs3/core-js-stable/instance/find';
45
45
  import '@babel/runtime-corejs3/core-js-stable/object/entries';
46
46
  import '@commercetools-frontend/assets/images/page-not-found.svg';
@@ -40,9 +40,9 @@ require('@commercetools-frontend/sentry');
40
40
  require('@commercetools-uikit/constraints');
41
41
  require('@commercetools-frontend/actions-global');
42
42
  require('@commercetools-frontend/application-shell-connectors');
43
- require('@flopflip/react-broadcast');
44
- require('@commercetools-uikit/flat-button');
45
43
  require('@commercetools-uikit/icon-button');
44
+ require('@commercetools-uikit/flat-button');
45
+ require('@flopflip/react-broadcast');
46
46
  require('@babel/runtime-corejs3/core-js-stable/instance/find');
47
47
  require('@babel/runtime-corejs3/core-js-stable/object/entries');
48
48
  require('@commercetools-frontend/assets/images/page-not-found.svg');