@commercetools-uikit/collapsible-panel 19.9.0 → 19.10.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.
@@ -311,7 +311,7 @@ CollapsiblePanel.Header = CollapsiblePanelHeader$1;
311
311
  var CollapsiblePanel$1 = CollapsiblePanel;
312
312
 
313
313
  // NOTE: This string will be replaced on build time with the package version.
314
- var version = "19.9.0";
314
+ var version = "19.10.0";
315
315
 
316
316
  exports["default"] = CollapsiblePanel$1;
317
317
  exports.version = version;
@@ -248,7 +248,7 @@ CollapsiblePanel.Header = CollapsiblePanelHeader$1;
248
248
  var CollapsiblePanel$1 = CollapsiblePanel;
249
249
 
250
250
  // NOTE: This string will be replaced on build time with the package version.
251
- var version = "19.9.0";
251
+ var version = "19.10.0";
252
252
 
253
253
  exports["default"] = CollapsiblePanel$1;
254
254
  exports.version = version;
@@ -295,6 +295,6 @@ CollapsiblePanel.Header = CollapsiblePanelHeader$1;
295
295
  var CollapsiblePanel$1 = CollapsiblePanel;
296
296
 
297
297
  // NOTE: This string will be replaced on build time with the package version.
298
- var version = "19.9.0";
298
+ var version = "19.10.0";
299
299
 
300
300
  export { CollapsiblePanel$1 as default, version };
@@ -1,26 +1,94 @@
1
1
  import { ReactNode } from 'react';
2
2
  export type TCollapsiblePanel = {
3
+ /**
4
+ * An unique id for the panel header, which will also be used to generate a prefixed id for the panel content section.
5
+ * <br/>
6
+ * Read about `getPanelContentId` below for more about this.
7
+ */
3
8
  id?: string;
9
+ /**
10
+ * The title being rendered at top left of the panel
11
+ */
4
12
  header: ReactNode;
13
+ /**
14
+ * A secondary header for the panel (only pass if needed)
15
+ */
5
16
  secondaryHeader?: ReactNode;
17
+ /**
18
+ * If passed will be shown below the title as more information regarding the panel
19
+ */
6
20
  description?: string;
21
+ /**
22
+ * Allow to override the styles by passing a `className` prop.
23
+ * <br/>
24
+ * Custom styles can also be passed using the [`css` prop from emotion](https://emotion.sh/docs/css-prop#style-precedence).
25
+ */
7
26
  className?: string;
27
+ /**
28
+ * Makes the panel's header sticky in regards to the page's scroll
29
+ */
8
30
  isSticky?: boolean;
31
+ /**
32
+ * Controls at the top right part of the panel
33
+ */
9
34
  headerControls?: ReactNode;
35
+ /**
36
+ * Disables the panel and all interactions with it
37
+ */
10
38
  isDisabled?: boolean;
39
+ /**
40
+ * The actual content rendered inside the panel
41
+ */
11
42
  children?: ReactNode;
43
+ /**
44
+ * Indicates the color scheme of the panel.
45
+ */
12
46
  tone?: 'urgent' | 'primary';
47
+ /**
48
+ * Determines the background color of the panel.
49
+ */
13
50
  theme?: 'dark' | 'light';
51
+ /**
52
+ * Whenever `true` the headers and content itself
53
+ * will consume less space in that to the borders are smaller and everything has less padding
54
+ */
14
55
  condensed?: boolean;
56
+ /**
57
+ * Controls the visibility of the expansion controls on the left
58
+ */
15
59
  hideExpansionControls?: boolean;
60
+ /**
61
+ * Indicates the position of the control elements in the header component.
62
+ */
16
63
  headerControlsAlignment?: 'left' | 'right';
64
+ /**
65
+ * Indicates if the panel's content should be collapsed or shown by default.
66
+ * <br />
67
+ * Updates to this value are not respected. Only used for **uncontrolled** mode (when no`onToggle` is passed.)
68
+ */
17
69
  isDefaultClosed?: boolean;
70
+ /**
71
+ * Indicates if the panel's content should be collapsed or shown.
72
+ * <br />
73
+ * Component becomes **controlled* when this is passed.
74
+ */
18
75
  isClosed?: boolean;
76
+ /**
77
+ * function to be triggered whenever the user clicks the top area to collapse the panel's content
78
+ * <br />
79
+ * Becomes required when `isClosed` is passed.
80
+ */
19
81
  onToggle?: () => void;
82
+ /**
83
+ * Horizontal size limit of the panel.
84
+ */
20
85
  horizontalConstraint?: 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
21
86
  };
22
87
  declare const CollapsiblePanel: {
23
88
  (props: TCollapsiblePanel): import("@emotion/react/jsx-runtime").JSX.Element;
89
+ /**
90
+ * @deprecated This function is no longer supported.
91
+ */
24
92
  getPanelContentId(): string;
25
93
  displayName: string;
26
94
  defaultProps: Pick<TCollapsiblePanel, "condensed" | "theme" | "isDisabled" | "horizontalConstraint" | "headerControlsAlignment">;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/collapsible-panel",
3
3
  "description": "A panel to collapse and expand your content.",
4
- "version": "19.9.0",
4
+ "version": "19.10.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,15 +21,15 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/accessible-button": "19.9.0",
25
- "@commercetools-uikit/collapsible-motion": "19.9.0",
26
- "@commercetools-uikit/constraints": "19.9.0",
27
- "@commercetools-uikit/design-system": "19.9.0",
28
- "@commercetools-uikit/hooks": "19.9.0",
29
- "@commercetools-uikit/icons": "19.9.0",
30
- "@commercetools-uikit/spacings": "19.9.0",
31
- "@commercetools-uikit/text": "19.9.0",
32
- "@commercetools-uikit/utils": "19.9.0",
24
+ "@commercetools-uikit/accessible-button": "19.10.0",
25
+ "@commercetools-uikit/collapsible-motion": "19.10.0",
26
+ "@commercetools-uikit/constraints": "19.10.0",
27
+ "@commercetools-uikit/design-system": "19.10.0",
28
+ "@commercetools-uikit/hooks": "19.10.0",
29
+ "@commercetools-uikit/icons": "19.10.0",
30
+ "@commercetools-uikit/spacings": "19.10.0",
31
+ "@commercetools-uikit/text": "19.10.0",
32
+ "@commercetools-uikit/utils": "19.10.0",
33
33
  "@emotion/react": "^11.10.5",
34
34
  "@emotion/styled": "^11.10.5",
35
35
  "lodash": "4.17.21",