@commercetools-frontend/application-components 0.0.0-CRAFT-1791-20251006162610

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 (76) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/dist/commercetools-frontend-application-components.cjs.d.ts +2 -0
  4. package/dist/commercetools-frontend-application-components.cjs.dev.js +2303 -0
  5. package/dist/commercetools-frontend-application-components.cjs.js +7 -0
  6. package/dist/commercetools-frontend-application-components.cjs.prod.js +2108 -0
  7. package/dist/commercetools-frontend-application-components.esm.js +2236 -0
  8. package/dist/custom-views-selector-03d0524e.cjs.prod.js +245 -0
  9. package/dist/custom-views-selector-9f964e68.esm.js +245 -0
  10. package/dist/custom-views-selector-d167f024.cjs.dev.js +266 -0
  11. package/dist/declarations/src/components/custom-views/custom-view-loader/custom-view-loader.d.ts +9 -0
  12. package/dist/declarations/src/components/custom-views/custom-view-loader/index.d.ts +1 -0
  13. package/dist/declarations/src/components/custom-views/custom-views-selector/index.d.ts +2 -0
  14. package/dist/declarations/src/components/custom-views/custom-views-selector/types.d.ts +12 -0
  15. package/dist/declarations/src/components/detail-pages/custom-form-detail-page/custom-form-detail-page.d.ts +186 -0
  16. package/dist/declarations/src/components/detail-pages/custom-form-detail-page/index.d.ts +1 -0
  17. package/dist/declarations/src/components/detail-pages/form-detail-page/form-detail-page.d.ts +171 -0
  18. package/dist/declarations/src/components/detail-pages/form-detail-page/index.d.ts +1 -0
  19. package/dist/declarations/src/components/detail-pages/info-detail-page/index.d.ts +1 -0
  20. package/dist/declarations/src/components/detail-pages/info-detail-page/info-detail-page.d.ts +52 -0
  21. package/dist/declarations/src/components/detail-pages/tabular-detail-page/index.d.ts +1 -0
  22. package/dist/declarations/src/components/detail-pages/tabular-detail-page/tabular-detail-page.d.ts +191 -0
  23. package/dist/declarations/src/components/dialogs/confirmation-dialog/confirmation-dialog.d.ts +110 -0
  24. package/dist/declarations/src/components/dialogs/confirmation-dialog/index.d.ts +1 -0
  25. package/dist/declarations/src/components/dialogs/form-dialog/form-dialog.d.ts +114 -0
  26. package/dist/declarations/src/components/dialogs/form-dialog/index.d.ts +1 -0
  27. package/dist/declarations/src/components/dialogs/info-dialog/index.d.ts +1 -0
  28. package/dist/declarations/src/components/dialogs/info-dialog/info-dialog.d.ts +19 -0
  29. package/dist/declarations/src/components/drawer/drawer.d.ts +153 -0
  30. package/dist/declarations/src/components/drawer/index.d.ts +1 -0
  31. package/dist/declarations/src/components/main-pages/custom-form-main-page/custom-form-main-page.d.ts +177 -0
  32. package/dist/declarations/src/components/main-pages/custom-form-main-page/index.d.ts +1 -0
  33. package/dist/declarations/src/components/main-pages/form-main-page/form-main-page.d.ts +163 -0
  34. package/dist/declarations/src/components/main-pages/form-main-page/index.d.ts +1 -0
  35. package/dist/declarations/src/components/main-pages/info-main-page/index.d.ts +1 -0
  36. package/dist/declarations/src/components/main-pages/info-main-page/info-main-page.d.ts +38 -0
  37. package/dist/declarations/src/components/main-pages/tabular-main-page/index.d.ts +1 -0
  38. package/dist/declarations/src/components/main-pages/tabular-main-page/tabular-main-page.d.ts +177 -0
  39. package/dist/declarations/src/components/maintenance-page-layout/index.d.ts +1 -0
  40. package/dist/declarations/src/components/maintenance-page-layout/maintenance-page-layout.d.ts +15 -0
  41. package/dist/declarations/src/components/modal-pages/custom-form-modal-page/custom-form-modal-page.d.ts +166 -0
  42. package/dist/declarations/src/components/modal-pages/custom-form-modal-page/index.d.ts +1 -0
  43. package/dist/declarations/src/components/modal-pages/form-modal-page/form-modal-page.d.ts +127 -0
  44. package/dist/declarations/src/components/modal-pages/form-modal-page/index.d.ts +1 -0
  45. package/dist/declarations/src/components/modal-pages/info-modal-page/index.d.ts +1 -0
  46. package/dist/declarations/src/components/modal-pages/info-modal-page/info-modal-page.d.ts +42 -0
  47. package/dist/declarations/src/components/modal-pages/tabular-modal-page/index.d.ts +1 -0
  48. package/dist/declarations/src/components/modal-pages/tabular-modal-page/tabular-modal-page.d.ts +169 -0
  49. package/dist/declarations/src/components/modal-pages/utils/index.d.ts +1 -0
  50. package/dist/declarations/src/components/modal-pages/utils/modal-page-top-bar.d.ts +26 -0
  51. package/dist/declarations/src/components/page-content-containers/page-content-full/index.d.ts +2 -0
  52. package/dist/declarations/src/components/page-content-containers/page-content-full/page-content-full.d.ts +6 -0
  53. package/dist/declarations/src/components/page-content-containers/page-content-narrow/index.d.ts +2 -0
  54. package/dist/declarations/src/components/page-content-containers/page-content-narrow/page-content-narrow.d.ts +6 -0
  55. package/dist/declarations/src/components/page-content-containers/page-content-wide/index.d.ts +2 -0
  56. package/dist/declarations/src/components/page-content-containers/page-content-wide/page-content-wide.d.ts +9 -0
  57. package/dist/declarations/src/components/page-not-found/index.d.ts +1 -0
  58. package/dist/declarations/src/components/page-not-found/page-not-found.d.ts +5 -0
  59. package/dist/declarations/src/components/page-unauthorized/index.d.ts +1 -0
  60. package/dist/declarations/src/components/page-unauthorized/page-unauthorized.d.ts +5 -0
  61. package/dist/declarations/src/components/portals-container/index.d.ts +1 -0
  62. package/dist/declarations/src/components/portals-container/portals-container.d.ts +44 -0
  63. package/dist/declarations/src/components/project-stamp/project-stamp.d.ts +9 -0
  64. package/dist/declarations/src/components/public-page-layout/index.d.ts +7 -0
  65. package/dist/declarations/src/components/tab-header/index.d.ts +1 -0
  66. package/dist/declarations/src/components/tab-header/tab-header.d.ts +36 -0
  67. package/dist/declarations/src/hooks/use-modal-state/index.d.ts +1 -0
  68. package/dist/declarations/src/hooks/use-modal-state/use-modal-state.d.ts +6 -0
  69. package/dist/declarations/src/index.d.ts +35 -0
  70. package/dist/declarations/src/theming.d.ts +15 -0
  71. package/dist/declarations/src/version.d.ts +2 -0
  72. package/dist/public-page-layout-7d1cb99f.esm.js +94 -0
  73. package/dist/public-page-layout-b182d2dd.cjs.prod.js +94 -0
  74. package/dist/public-page-layout-b92fb7e4.cjs.dev.js +103 -0
  75. package/materials/media-queries.css +15 -0
  76. package/package.json +101 -0
@@ -0,0 +1,153 @@
1
+ import type { ReactElement, ReactNode, SyntheticEvent } from 'react';
2
+ import { type CSSObject } from '@emotion/styled';
3
+ import { type TIconProps } from '@commercetools-uikit/design-system';
4
+ type MessageDescriptor = {
5
+ id: string;
6
+ description?: string | object;
7
+ defaultMessage?: string;
8
+ };
9
+ type Label = string | MessageDescriptor;
10
+ type TDrawerSize = 10 | 20 | 30;
11
+ type TDrawerProps = {
12
+ size?: TDrawerSize;
13
+ isOpen: boolean;
14
+ onClose?: (event: SyntheticEvent) => void;
15
+ children: ReactNode;
16
+ topBarColor?: 'neutral' | 'surface';
17
+ title: string;
18
+ subtitle?: string;
19
+ zIndex?: number;
20
+ getParentSelector?: () => HTMLElement;
21
+ shouldDelayOnClose?: boolean;
22
+ afterOpenStyles?: string | CSSObject;
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<TIconProps>;
38
+ };
39
+ declare function Drawer({ size, hideControls, onPrimaryButtonClick, onSecondaryButtonClick, ...props }: TDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
40
+ declare namespace Drawer {
41
+ var displayName: string;
42
+ var FormPrimaryButton: {
43
+ ({ label, isDisabled, dataAttributes, ...props }: {
44
+ iconLeft?: ReactElement<TIconProps>;
45
+ } & {
46
+ label?: string | {
47
+ id: string;
48
+ description?: string | object;
49
+ defaultMessage?: string;
50
+ };
51
+ onClick: (event: SyntheticEvent) => void;
52
+ isDisabled?: boolean;
53
+ dataAttributes?: {
54
+ [key: string]: string;
55
+ };
56
+ children?: never;
57
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
58
+ displayName: string;
59
+ };
60
+ var FormSecondaryButton: {
61
+ ({ label, isDisabled, dataAttributes, ...props }: {
62
+ iconLeft?: ReactElement<TIconProps>;
63
+ } & {
64
+ label?: string | {
65
+ id: string;
66
+ description?: string | object;
67
+ defaultMessage?: string;
68
+ };
69
+ onClick: (event: SyntheticEvent) => void;
70
+ isDisabled?: boolean;
71
+ dataAttributes?: {
72
+ [key: string]: string;
73
+ };
74
+ children?: never;
75
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
76
+ displayName: string;
77
+ };
78
+ var Intl: {
79
+ cancel: {
80
+ id: string;
81
+ defaultMessage: string;
82
+ };
83
+ revert: {
84
+ id: string;
85
+ defaultMessage: string;
86
+ };
87
+ confirm: {
88
+ id: string;
89
+ defaultMessage: string;
90
+ };
91
+ save: {
92
+ id: string;
93
+ defaultMessage: string;
94
+ };
95
+ update: {
96
+ id: string;
97
+ defaultMessage: string;
98
+ };
99
+ create: {
100
+ id: string;
101
+ defaultMessage: string;
102
+ };
103
+ delete: {
104
+ id: string;
105
+ defaultMessage: string;
106
+ };
107
+ add: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ };
111
+ remove: {
112
+ id: string;
113
+ defaultMessage: string;
114
+ };
115
+ close: {
116
+ id: string;
117
+ defaultMessage: string;
118
+ };
119
+ edit: {
120
+ id: string;
121
+ defaultMessage: string;
122
+ };
123
+ open: {
124
+ id: string;
125
+ defaultMessage: string;
126
+ };
127
+ activate: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ };
131
+ deactivate: {
132
+ id: string;
133
+ defaultMessage: string;
134
+ };
135
+ active: {
136
+ id: string;
137
+ defaultMessage: string;
138
+ };
139
+ inactive: {
140
+ id: string;
141
+ defaultMessage: string;
142
+ };
143
+ enable: {
144
+ id: string;
145
+ defaultMessage: string;
146
+ };
147
+ disable: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ };
151
+ };
152
+ }
153
+ export default Drawer;
@@ -0,0 +1 @@
1
+ export { default } from "./drawer.js";
@@ -0,0 +1,177 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ type CustomFormMainPageProps = {
3
+ /**
4
+ * The title of the page.
5
+ */
6
+ title?: string;
7
+ /**
8
+ * The subtitle of the page.
9
+ */
10
+ subtitle?: string | ReactElement;
11
+ /**
12
+ * Replaces the title/subtitle row with a custom one (for special use cases).
13
+ */
14
+ customTitleRow?: ReactNode;
15
+ /**
16
+ * This code is used to configure which Custom Views are available for this page.
17
+ */
18
+ customViewLocatorCode?: string;
19
+ /**
20
+ * Any React node displayed as the content within the page.
21
+ */
22
+ children: ReactNode;
23
+ /**
24
+ * Any React node to be rendered as the form controls.
25
+ */
26
+ formControls?: ReactNode;
27
+ /**
28
+ * Determines if the form controls should be rendered.
29
+ */
30
+ hideControls?: boolean;
31
+ /**
32
+ * Determines whether the divider between header and content should be hidden.
33
+ * (default: false)
34
+ */
35
+ hideDivider?: boolean;
36
+ };
37
+ declare const CustomFormMainPage: {
38
+ ({ hideControls, hideDivider, ...props }: CustomFormMainPageProps): import("@emotion/react/jsx-runtime").JSX.Element;
39
+ displayName: string;
40
+ PageHeaderTitle: {
41
+ ({ titleSize, truncate, ...props }: {
42
+ title: string;
43
+ titleSize?: "big" | "small" | "medium";
44
+ truncate?: boolean;
45
+ subtitle?: string | ReactElement;
46
+ children?: never;
47
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
48
+ displayName: string;
49
+ };
50
+ FormPrimaryButton: {
51
+ ({ label, isDisabled, dataAttributes, ...props }: {
52
+ iconLeft?: ReactElement<import("@commercetools-uikit/design-system").TIconProps>;
53
+ } & {
54
+ label?: string | {
55
+ id: string;
56
+ description?: string | object;
57
+ defaultMessage?: string;
58
+ };
59
+ onClick: (event: import("react").SyntheticEvent) => void;
60
+ isDisabled?: boolean;
61
+ dataAttributes?: {
62
+ [key: string]: string;
63
+ };
64
+ children?: never;
65
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
66
+ displayName: string;
67
+ };
68
+ FormSecondaryButton: {
69
+ ({ label, isDisabled, dataAttributes, ...props }: {
70
+ iconLeft?: ReactElement<import("@commercetools-uikit/design-system").TIconProps>;
71
+ } & {
72
+ label?: string | {
73
+ id: string;
74
+ description?: string | object;
75
+ defaultMessage?: string;
76
+ };
77
+ onClick: (event: import("react").SyntheticEvent) => void;
78
+ isDisabled?: boolean;
79
+ dataAttributes?: {
80
+ [key: string]: string;
81
+ };
82
+ children?: never;
83
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
84
+ displayName: string;
85
+ };
86
+ FormDeleteButton: {
87
+ ({ label, isDisabled, dataAttributes, ...props }: {
88
+ label?: string | {
89
+ id: string;
90
+ description?: string | object;
91
+ defaultMessage?: string;
92
+ };
93
+ onClick: (event: import("react").SyntheticEvent) => void;
94
+ isDisabled?: boolean;
95
+ dataAttributes?: {
96
+ [key: string]: string;
97
+ };
98
+ children?: never;
99
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
100
+ displayName: string;
101
+ };
102
+ Intl: {
103
+ cancel: {
104
+ id: string;
105
+ defaultMessage: string;
106
+ };
107
+ revert: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ };
111
+ confirm: {
112
+ id: string;
113
+ defaultMessage: string;
114
+ };
115
+ save: {
116
+ id: string;
117
+ defaultMessage: string;
118
+ };
119
+ update: {
120
+ id: string;
121
+ defaultMessage: string;
122
+ };
123
+ create: {
124
+ id: string;
125
+ defaultMessage: string;
126
+ };
127
+ delete: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ };
131
+ add: {
132
+ id: string;
133
+ defaultMessage: string;
134
+ };
135
+ remove: {
136
+ id: string;
137
+ defaultMessage: string;
138
+ };
139
+ close: {
140
+ id: string;
141
+ defaultMessage: string;
142
+ };
143
+ edit: {
144
+ id: string;
145
+ defaultMessage: string;
146
+ };
147
+ open: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ };
151
+ activate: {
152
+ id: string;
153
+ defaultMessage: string;
154
+ };
155
+ deactivate: {
156
+ id: string;
157
+ defaultMessage: string;
158
+ };
159
+ active: {
160
+ id: string;
161
+ defaultMessage: string;
162
+ };
163
+ inactive: {
164
+ id: string;
165
+ defaultMessage: string;
166
+ };
167
+ enable: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ };
171
+ disable: {
172
+ id: string;
173
+ defaultMessage: string;
174
+ };
175
+ };
176
+ };
177
+ export default CustomFormMainPage;
@@ -0,0 +1 @@
1
+ export { default } from "./custom-form-main-page.js";
@@ -0,0 +1,163 @@
1
+ import type { ReactElement, ReactNode, SyntheticEvent } from 'react';
2
+ import type { TIconProps } from '@commercetools-uikit/design-system';
3
+ type MessageDescriptor = {
4
+ id: string;
5
+ description?: string | object;
6
+ defaultMessage?: string;
7
+ };
8
+ type Label = string | MessageDescriptor;
9
+ type FormMainPageProps = {
10
+ /**
11
+ * The title of the page.
12
+ */
13
+ title?: string;
14
+ /**
15
+ * The subtitle of the page.
16
+ */
17
+ subtitle?: string | ReactElement;
18
+ /**
19
+ * Replaces the title/subtitle row with a custom one (for special use cases)
20
+ */
21
+ customTitleRow?: ReactNode;
22
+ /**
23
+ * Any React node displayed as the content within the page.
24
+ */
25
+ children: ReactNode;
26
+ /**
27
+ * Determines if the form controls should be rendered.
28
+ */
29
+ hideControls?: boolean;
30
+ /**
31
+ * Indicates whether the primary button is deactivated or not.
32
+ */
33
+ isPrimaryButtonDisabled?: boolean;
34
+ /**
35
+ * Indicates whether the secondary button is deactivated or not.
36
+ */
37
+ isSecondaryButtonDisabled?: boolean;
38
+ /**
39
+ * Use this prop to pass `data-` attributes to the primary button
40
+ */
41
+ dataAttributesPrimaryButton?: {
42
+ [key: string]: string;
43
+ };
44
+ /**
45
+ * Use this prop to pass `data-` attributes to the secondary button.
46
+ */
47
+ dataAttributesSecondaryButton?: {
48
+ [key: string]: string;
49
+ };
50
+ /**
51
+ * `Save` | The label for the primary button as a string, or as an Intl message.
52
+ */
53
+ labelPrimaryButton?: Label;
54
+ /**
55
+ * `Cancel` | The label for the secondary button as a string, or as an Intl message.
56
+ */
57
+ labelSecondaryButton?: Label;
58
+ /**
59
+ * The Icon for the secondary button label
60
+ */
61
+ iconLeftSecondaryButton?: ReactElement<TIconProps>;
62
+ /**
63
+ * This code is used to configure which Custom Views are available for this page.
64
+ */
65
+ customViewLocatorCode?: string;
66
+ /**
67
+ * Called when the primary button is clicked.
68
+ */
69
+ onPrimaryButtonClick: (event: SyntheticEvent) => void;
70
+ /**
71
+ * Called when the secondary button is clicked.
72
+ */
73
+ onSecondaryButtonClick: (event: SyntheticEvent) => void;
74
+ };
75
+ declare const FormMainPage: {
76
+ ({ hideControls, ...props }: FormMainPageProps): import("@emotion/react/jsx-runtime").JSX.Element;
77
+ displayName: string;
78
+ PageHeaderTitle: {
79
+ ({ titleSize, truncate, ...props }: {
80
+ title: string;
81
+ titleSize?: "big" | "small" | "medium";
82
+ truncate?: boolean;
83
+ subtitle?: string | ReactElement;
84
+ children?: never;
85
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
86
+ displayName: string;
87
+ };
88
+ Intl: {
89
+ cancel: {
90
+ id: string;
91
+ defaultMessage: string;
92
+ };
93
+ revert: {
94
+ id: string;
95
+ defaultMessage: string;
96
+ };
97
+ confirm: {
98
+ id: string;
99
+ defaultMessage: string;
100
+ };
101
+ save: {
102
+ id: string;
103
+ defaultMessage: string;
104
+ };
105
+ update: {
106
+ id: string;
107
+ defaultMessage: string;
108
+ };
109
+ create: {
110
+ id: string;
111
+ defaultMessage: string;
112
+ };
113
+ delete: {
114
+ id: string;
115
+ defaultMessage: string;
116
+ };
117
+ add: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ };
121
+ remove: {
122
+ id: string;
123
+ defaultMessage: string;
124
+ };
125
+ close: {
126
+ id: string;
127
+ defaultMessage: string;
128
+ };
129
+ edit: {
130
+ id: string;
131
+ defaultMessage: string;
132
+ };
133
+ open: {
134
+ id: string;
135
+ defaultMessage: string;
136
+ };
137
+ activate: {
138
+ id: string;
139
+ defaultMessage: string;
140
+ };
141
+ deactivate: {
142
+ id: string;
143
+ defaultMessage: string;
144
+ };
145
+ active: {
146
+ id: string;
147
+ defaultMessage: string;
148
+ };
149
+ inactive: {
150
+ id: string;
151
+ defaultMessage: string;
152
+ };
153
+ enable: {
154
+ id: string;
155
+ defaultMessage: string;
156
+ };
157
+ disable: {
158
+ id: string;
159
+ defaultMessage: string;
160
+ };
161
+ };
162
+ };
163
+ export default FormMainPage;
@@ -0,0 +1 @@
1
+ export { default } from "./form-main-page.js";
@@ -0,0 +1 @@
1
+ export { default } from "./info-main-page.js";
@@ -0,0 +1,38 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ type InfoMainPageProps = {
3
+ /**
4
+ * The title of the page.
5
+ */
6
+ title?: string;
7
+ /**
8
+ * The subtitle of the page.
9
+ */
10
+ subtitle?: string | ReactElement;
11
+ /**
12
+ * Replaces the title/subtitle row with a custom one (for special use cases).
13
+ */
14
+ customTitleRow?: ReactNode;
15
+ /**
16
+ * This code is used to configure which Custom Views are available for this page.
17
+ */
18
+ customViewLocatorCode?: string;
19
+ /**
20
+ * Any React node displayed as the content within the page.
21
+ */
22
+ children: ReactNode;
23
+ };
24
+ declare const InfoMainPage: {
25
+ (props: InfoMainPageProps): import("@emotion/react/jsx-runtime").JSX.Element;
26
+ displayName: string;
27
+ PageHeaderTitle: {
28
+ ({ titleSize, truncate, ...props }: {
29
+ title: string;
30
+ titleSize?: "big" | "small" | "medium";
31
+ truncate?: boolean;
32
+ subtitle?: string | ReactElement;
33
+ children?: never;
34
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
35
+ displayName: string;
36
+ };
37
+ };
38
+ export default InfoMainPage;
@@ -0,0 +1 @@
1
+ export { default } from "./tabular-main-page.js";