@carbon/react 1.38.0 → 1.39.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 (60) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +1391 -782
  2. package/es/components/CodeSnippet/CodeSnippet.js +9 -2
  3. package/es/components/ComboBox/ComboBox.d.ts +30 -27
  4. package/es/components/ComboBox/ComboBox.js +23 -24
  5. package/es/components/Copy/Copy.js +6 -1
  6. package/es/components/CopyButton/CopyButton.js +6 -0
  7. package/es/components/FileUploader/FileUploader.js +1 -1
  8. package/es/components/Grid/index.d.ts +1 -0
  9. package/es/components/Link/Link.d.ts +1 -1
  10. package/es/components/Link/index.d.ts +2 -2
  11. package/es/components/MultiSelect/MultiSelect.d.ts +24 -0
  12. package/es/components/MultiSelect/MultiSelect.js +26 -0
  13. package/es/components/Popover/index.d.ts +9 -5
  14. package/es/components/Popover/index.js +2 -3
  15. package/es/components/StructuredList/StructuredList.Skeleton.d.ts +32 -0
  16. package/es/components/StructuredList/StructuredList.Skeleton.js +16 -26
  17. package/es/components/StructuredList/StructuredList.d.ts +271 -0
  18. package/es/components/StructuredList/StructuredList.js +14 -33
  19. package/es/components/StructuredList/index.d.ts +8 -0
  20. package/es/components/UIShell/HeaderContainer.d.ts +1 -1
  21. package/es/components/UIShell/HeaderMenuButton.d.ts +4 -2
  22. package/es/components/UIShell/HeaderMenuItem.d.ts +1 -1
  23. package/es/components/UIShell/HeaderName.d.ts +1 -1
  24. package/es/components/UIShell/HeaderNavigation.d.ts +2 -5
  25. package/es/components/UIShell/HeaderSideNavItems.d.ts +1 -1
  26. package/es/components/UIShell/SideNav.d.ts +1 -1
  27. package/es/components/UIShell/SideNavDivider.js +2 -2
  28. package/es/components/UIShell/SkipToContent.d.ts +1 -1
  29. package/es/components/UIShell/index.d.ts +8 -8
  30. package/es/index.js +3 -2
  31. package/lib/components/CodeSnippet/CodeSnippet.js +9 -2
  32. package/lib/components/ComboBox/ComboBox.d.ts +30 -27
  33. package/lib/components/ComboBox/ComboBox.js +22 -23
  34. package/lib/components/Copy/Copy.js +6 -1
  35. package/lib/components/CopyButton/CopyButton.js +6 -0
  36. package/lib/components/FileUploader/FileUploader.js +1 -1
  37. package/lib/components/Grid/index.d.ts +1 -0
  38. package/lib/components/Link/Link.d.ts +1 -1
  39. package/lib/components/Link/index.d.ts +2 -2
  40. package/lib/components/MultiSelect/MultiSelect.d.ts +24 -0
  41. package/lib/components/MultiSelect/MultiSelect.js +26 -0
  42. package/lib/components/Popover/index.d.ts +9 -5
  43. package/lib/components/Popover/index.js +2 -3
  44. package/lib/components/StructuredList/StructuredList.Skeleton.d.ts +32 -0
  45. package/lib/components/StructuredList/StructuredList.Skeleton.js +16 -26
  46. package/lib/components/StructuredList/StructuredList.d.ts +271 -0
  47. package/lib/components/StructuredList/StructuredList.js +14 -33
  48. package/lib/components/StructuredList/index.d.ts +8 -0
  49. package/lib/components/UIShell/HeaderContainer.d.ts +1 -1
  50. package/lib/components/UIShell/HeaderMenuButton.d.ts +4 -2
  51. package/lib/components/UIShell/HeaderMenuItem.d.ts +1 -1
  52. package/lib/components/UIShell/HeaderName.d.ts +1 -1
  53. package/lib/components/UIShell/HeaderNavigation.d.ts +2 -5
  54. package/lib/components/UIShell/HeaderSideNavItems.d.ts +1 -1
  55. package/lib/components/UIShell/SideNav.d.ts +1 -1
  56. package/lib/components/UIShell/SideNavDivider.js +2 -2
  57. package/lib/components/UIShell/SkipToContent.d.ts +1 -1
  58. package/lib/components/UIShell/index.d.ts +8 -8
  59. package/lib/index.js +11 -9
  60. package/package.json +5 -6
@@ -0,0 +1,271 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { type HTMLAttributes, type ReactNode, type KeyboardEvent, type ChangeEvent, type MouseEvent } from 'react';
8
+ import PropTypes from 'prop-types';
9
+ type DivAttrs = HTMLAttributes<HTMLDivElement>;
10
+ export interface StructuredListWrapperProps extends DivAttrs {
11
+ /**
12
+ * Specify a label to be read by screen readers on the container node
13
+ */
14
+ 'aria-label'?: string;
15
+ /**
16
+ * Provide the contents of your StructuredListWrapper
17
+ */
18
+ children?: ReactNode;
19
+ /**
20
+ * Specify an optional className to be applied to the container node
21
+ */
22
+ className?: string;
23
+ /**
24
+ * Specify if structured list is condensed, default is false
25
+ */
26
+ isCondensed?: boolean;
27
+ /**
28
+ * Specify if structured list is flush, default is false
29
+ */
30
+ isFlush?: boolean;
31
+ /**
32
+ * Specify whether your StructuredListWrapper should have selections
33
+ */
34
+ selection?: boolean;
35
+ }
36
+ export declare function StructuredListWrapper(props: StructuredListWrapperProps): JSX.Element;
37
+ export declare namespace StructuredListWrapper {
38
+ var propTypes: {
39
+ /**
40
+ * Specify a label to be read by screen readers on the container node
41
+ */
42
+ "aria-label": PropTypes.Requireable<string>;
43
+ /**
44
+ * Deprecated, please use `aria-label` instead.
45
+ * Specify a label to be read by screen readers on the container note.
46
+ */
47
+ ariaLabel: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
48
+ /**
49
+ * Provide the contents of your StructuredListWrapper
50
+ */
51
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
52
+ /**
53
+ * Specify an optional className to be applied to the container node
54
+ */
55
+ className: PropTypes.Requireable<string>;
56
+ /**
57
+ * Specify if structured list is condensed, default is false
58
+ */
59
+ isCondensed: PropTypes.Requireable<boolean>;
60
+ /**
61
+ * Specify if structured list is flush, not valid for selection variant, default is false
62
+ */
63
+ isFlush: PropTypes.Requireable<boolean>;
64
+ /**
65
+ * Specify whether your StructuredListWrapper should have selections
66
+ */
67
+ selection: PropTypes.Requireable<boolean>;
68
+ };
69
+ }
70
+ export interface StructuredListHeadProps extends DivAttrs {
71
+ /**
72
+ * Provide the contents of your StructuredListHead
73
+ */
74
+ children?: ReactNode;
75
+ /**
76
+ * Specify an optional className to be applied to the node
77
+ */
78
+ className?: string;
79
+ }
80
+ export declare function StructuredListHead(props: any): JSX.Element;
81
+ export declare namespace StructuredListHead {
82
+ var propTypes: {
83
+ /**
84
+ * Provide the contents of your StructuredListHead
85
+ */
86
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
87
+ /**
88
+ * Specify an optional className to be applied to the node
89
+ */
90
+ className: PropTypes.Requireable<string>;
91
+ };
92
+ }
93
+ export interface StructuredListBodyProps extends DivAttrs {
94
+ /**
95
+ * Provide the contents of your StructuredListBody
96
+ */
97
+ children?: ReactNode;
98
+ /**
99
+ * Specify an optional className to be applied to the container node
100
+ */
101
+ className?: string;
102
+ head?: boolean;
103
+ /**
104
+ * Provide a handler that is invoked on the key down event for the control
105
+ */
106
+ onKeyDown?(event: KeyboardEvent): void;
107
+ }
108
+ export declare function StructuredListBody(props: StructuredListBodyProps): JSX.Element;
109
+ export declare namespace StructuredListBody {
110
+ var propTypes: {
111
+ /**
112
+ * Provide the contents of your StructuredListBody
113
+ */
114
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
115
+ /**
116
+ * Specify an optional className to be applied to the container node
117
+ */
118
+ className: PropTypes.Requireable<string>;
119
+ head: PropTypes.Requireable<boolean>;
120
+ /**
121
+ * Provide a handler that is invoked on the key down event for the control
122
+ */
123
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
124
+ };
125
+ }
126
+ export interface StructuredListRowProps extends DivAttrs {
127
+ /**
128
+ * Provide the contents of your StructuredListRow
129
+ */
130
+ children?: ReactNode;
131
+ /**
132
+ * Specify an optional className to be applied to the container node
133
+ */
134
+ className?: string;
135
+ /**
136
+ * Specify whether your StructuredListRow should be used as a header row
137
+ */
138
+ head?: boolean;
139
+ /**
140
+ * Provide a handler that is invoked on the click
141
+ */
142
+ onClick?(event: MouseEvent): void;
143
+ /**
144
+ * Provide a handler that is invoked on the key down event for the control
145
+ */
146
+ onKeyDown?(event: KeyboardEvent): void;
147
+ }
148
+ export declare function StructuredListRow(props: StructuredListRowProps): JSX.Element;
149
+ export declare namespace StructuredListRow {
150
+ var propTypes: {
151
+ /**
152
+ * Provide the contents of your StructuredListRow
153
+ */
154
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
155
+ /**
156
+ * Specify an optional className to be applied to the container node
157
+ */
158
+ className: PropTypes.Requireable<string>;
159
+ /**
160
+ * Specify whether your StructuredListRow should be used as a header row
161
+ */
162
+ head: PropTypes.Requireable<boolean>;
163
+ /**
164
+ * Specify whether a `<label>` should be used
165
+ */
166
+ label: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
167
+ /**
168
+ * Provide a handler that is invoked on the click
169
+ */
170
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
171
+ /**
172
+ * Provide a handler that is invoked on the key down event for the control,
173
+ */
174
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
175
+ };
176
+ }
177
+ export interface StructuredListInputProps extends DivAttrs {
178
+ /**
179
+ * Specify an optional className to be applied to the input
180
+ */
181
+ className?: string;
182
+ /**
183
+ * Specify a custom `id` for the input
184
+ */
185
+ id?: string;
186
+ /**
187
+ * Provide a `name` for the input
188
+ */
189
+ name?: string;
190
+ /**
191
+ * Provide an optional hook that is called each time the input is updated
192
+ */
193
+ onChange?(event: ChangeEvent<HTMLInputElement>): void;
194
+ /**
195
+ * Provide a `title` for the input
196
+ */
197
+ title?: string;
198
+ }
199
+ export declare function StructuredListInput(props: StructuredListInputProps): JSX.Element;
200
+ export declare namespace StructuredListInput {
201
+ var propTypes: {
202
+ /**
203
+ * Specify an optional className to be applied to the input
204
+ */
205
+ className: PropTypes.Requireable<string>;
206
+ /**
207
+ * Specify whether the underlying input should be checked by default
208
+ */
209
+ defaultChecked: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
210
+ /**
211
+ * Specify a custom `id` for the input
212
+ */
213
+ id: PropTypes.Requireable<string>;
214
+ /**
215
+ * Provide a `name` for the input
216
+ */
217
+ name: PropTypes.Requireable<string>;
218
+ /**
219
+ * Provide an optional hook that is called each time the input is updated
220
+ */
221
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
222
+ /**
223
+ * Provide a `title` for the input
224
+ */
225
+ title: PropTypes.Requireable<string>;
226
+ /**
227
+ * Specify the value of the input
228
+ */
229
+ value: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
230
+ };
231
+ }
232
+ export interface StructuredListCellProps extends DivAttrs {
233
+ /**
234
+ * Provide the contents of your StructuredListCell
235
+ */
236
+ children?: ReactNode;
237
+ /**
238
+ * Specify an optional className to be applied to the container node
239
+ */
240
+ className?: string;
241
+ /**
242
+ * Specify whether your StructuredListCell should be used as a header cell
243
+ */
244
+ head?: boolean;
245
+ /**
246
+ * Specify whether your StructuredListCell should have text wrapping
247
+ */
248
+ noWrap?: boolean;
249
+ }
250
+ export declare function StructuredListCell(props: StructuredListCellProps): JSX.Element;
251
+ export declare namespace StructuredListCell {
252
+ var propTypes: {
253
+ /**
254
+ * Provide the contents of your StructuredListCell
255
+ */
256
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
257
+ /**
258
+ * Specify an optional className to be applied to the container node
259
+ */
260
+ className: PropTypes.Requireable<string>;
261
+ /**
262
+ * Specify whether your StructuredListCell should be used as a header cell
263
+ */
264
+ head: PropTypes.Requireable<boolean>;
265
+ /**
266
+ * Specify whether your StructuredListCell should have text wrapping
267
+ */
268
+ noWrap: PropTypes.Requireable<boolean>;
269
+ };
270
+ }
271
+ export {};
@@ -30,18 +30,19 @@ function StructuredListWrapper(props) {
30
30
  children,
31
31
  selection,
32
32
  className,
33
- ['aria-label']: ariaLabel,
33
+ ['aria-label']: ariaLabel = 'Structured list section',
34
+ // @ts-expect-error: Deprecated prop
34
35
  ariaLabel: deprecatedAriaLabel,
35
36
  isCondensed,
36
37
  isFlush,
37
38
  ...other
38
39
  } = props;
39
40
  const prefix = usePrefix.usePrefix();
40
- const classes = cx__default["default"](`${prefix}--structured-list`, className, {
41
+ const classes = cx__default["default"](`${prefix}--structured-list`, {
41
42
  [`${prefix}--structured-list--selection`]: selection,
42
43
  [`${prefix}--structured-list--condensed`]: isCondensed,
43
44
  [`${prefix}--structured-list--flush`]: isFlush && !selection
44
- });
45
+ }, className);
45
46
  const [selectedRow, setSelectedRow] = React__default["default"].useState(null);
46
47
  return /*#__PURE__*/React__default["default"].createElement(GridSelectedRowStateContext.Provider, {
47
48
  value: selectedRow
@@ -85,12 +86,6 @@ StructuredListWrapper.propTypes = {
85
86
  */
86
87
  selection: PropTypes__default["default"].bool
87
88
  };
88
- StructuredListWrapper.defaultProps = {
89
- selection: false,
90
- isCondensed: false,
91
- isFlush: false,
92
- ['aria-label']: 'Structured list section'
93
- };
94
89
  function StructuredListHead(props) {
95
90
  const {
96
91
  children,
@@ -142,9 +137,6 @@ StructuredListBody.propTypes = {
142
137
  */
143
138
  onKeyDown: PropTypes__default["default"].func
144
139
  };
145
- StructuredListBody.defaultProps = {
146
- onKeyDown: () => {}
147
- };
148
140
  const GridRowContext = /*#__PURE__*/React__default["default"].createContext(null);
149
141
  function StructuredListRow(props) {
150
142
  const {
@@ -163,11 +155,11 @@ function StructuredListRow(props) {
163
155
  const value = {
164
156
  id
165
157
  };
166
- const classes = cx__default["default"](`${prefix}--structured-list-row`, className, {
158
+ const classes = cx__default["default"](`${prefix}--structured-list-row`, {
167
159
  [`${prefix}--structured-list-row--header-row`]: head,
168
160
  [`${prefix}--structured-list-row--focused-within`]: hasFocusWithin,
169
161
  [`${prefix}--structured-list-row--selected`]: selectedRow === id
170
- });
162
+ }, className);
171
163
  return head ? /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
172
164
  role: "row"
173
165
  }, other, {
@@ -181,9 +173,9 @@ function StructuredListRow(props) {
181
173
  }, other, {
182
174
  role: "row",
183
175
  className: classes,
184
- onClick: () => {
185
- setSelectedRow(id);
186
- onClick && onClick();
176
+ onClick: event => {
177
+ setSelectedRow?.(id);
178
+ onClick && onClick(event);
187
179
  },
188
180
  onFocus: () => {
189
181
  setHasFocusWithin(true);
@@ -214,7 +206,7 @@ StructuredListRow.propTypes = {
214
206
  */
215
207
  label: deprecate["default"](PropTypes__default["default"].bool, `\nThe \`label\` prop is no longer needed and will be removed in the next major version of Carbon.`),
216
208
  /**
217
- * Provide a handler that is invoked on the click,
209
+ * Provide a handler that is invoked on the click
218
210
  */
219
211
  onClick: PropTypes__default["default"].func,
220
212
  /**
@@ -222,10 +214,6 @@ StructuredListRow.propTypes = {
222
214
  */
223
215
  onKeyDown: PropTypes__default["default"].func
224
216
  };
225
- StructuredListRow.defaultProps = {
226
- head: false,
227
- onKeyDown: () => {}
228
- };
229
217
  function StructuredListInput(props) {
230
218
  const defaultId = useId.useId('structureListInput');
231
219
  const {
@@ -244,10 +232,10 @@ function StructuredListInput(props) {
244
232
  return /*#__PURE__*/React__default["default"].createElement("input", _rollupPluginBabelHelpers["extends"]({}, other, {
245
233
  type: "radio",
246
234
  tabIndex: 0,
247
- checked: row && row.id === selectedRow,
235
+ checked: !!row && row.id === selectedRow,
248
236
  value: row?.id ?? '',
249
237
  onChange: event => {
250
- setSelectedRow(event.target.value);
238
+ setSelectedRow?.(event.target.value);
251
239
  onChange && onChange(event);
252
240
  },
253
241
  id: id ?? defaultId,
@@ -286,9 +274,6 @@ StructuredListInput.propTypes = {
286
274
  */
287
275
  value: deprecate["default"](PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number]).isRequired, `\nThe prop \`value\` will be removed in the next major version of Carbon.`)
288
276
  };
289
- StructuredListInput.defaultProps = {
290
- title: 'title'
291
- };
292
277
  function StructuredListCell(props) {
293
278
  const {
294
279
  children,
@@ -298,11 +283,11 @@ function StructuredListCell(props) {
298
283
  ...other
299
284
  } = props;
300
285
  const prefix = usePrefix.usePrefix();
301
- const classes = cx__default["default"](className, {
286
+ const classes = cx__default["default"]({
302
287
  [`${prefix}--structured-list-th`]: head,
303
288
  [`${prefix}--structured-list-td`]: !head,
304
289
  [`${prefix}--structured-list-content--nowrap`]: noWrap
305
- });
290
+ }, className);
306
291
  if (head) {
307
292
  return /*#__PURE__*/React__default["default"].createElement("span", _rollupPluginBabelHelpers["extends"]({
308
293
  className: classes,
@@ -332,10 +317,6 @@ StructuredListCell.propTypes = {
332
317
  */
333
318
  noWrap: PropTypes__default["default"].bool
334
319
  };
335
- StructuredListCell.defaultProps = {
336
- head: false,
337
- noWrap: false
338
- };
339
320
 
340
321
  exports.StructuredListBody = StructuredListBody;
341
322
  exports.StructuredListCell = StructuredListCell;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export * from './StructuredList';
8
+ export { default as StructuredListSkeleton, type StructuredListSkeletonProps, } from './StructuredList.Skeleton';
@@ -10,7 +10,7 @@ interface HeaderContainerRenderProps {
10
10
  isSideNavExpanded: boolean;
11
11
  onClickSideNavExpand: () => void;
12
12
  }
13
- interface HeaderContainerProps {
13
+ export interface HeaderContainerProps {
14
14
  isSideNavExpanded?: boolean;
15
15
  render: React.ComponentType<HeaderContainerRenderProps>;
16
16
  }
@@ -7,7 +7,7 @@
7
7
  import { type ComponentProps } from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  type HeaderMenuButtonBaseProps = Omit<ComponentProps<'button'>, 'title' | 'type'>;
10
- interface HeaderMenuButtonProps extends HeaderMenuButtonBaseProps {
10
+ export interface HeaderMenuButtonProps extends HeaderMenuButtonBaseProps {
11
11
  'aria-label'?: string;
12
12
  'aria-labelledby'?: string;
13
13
  className?: string;
@@ -74,7 +74,9 @@ declare namespace HeaderMenuButton {
74
74
  fill(value: string, start?: number | undefined, end?: number | undefined): [key: string];
75
75
  copyWithin(target: number, start: number, end?: number | undefined): [key: string];
76
76
  entries(): IterableIterator<[number, string]>;
77
- keys(): IterableIterator<number>;
77
+ keys(): IterableIterator<number>; /**
78
+ * Specify whether the menu button is collapsible.
79
+ */
78
80
  values(): IterableIterator<string>;
79
81
  includes(searchElement: string, fromIndex?: number | undefined): boolean;
80
82
  flatMap<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[];
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { type ComponentProps, type ForwardedRef, type ReactNode, ElementType, WeakValidationMap } from 'react';
8
8
  import { LinkProps } from './Link';
9
- type HeaderMenuItemProps<E extends ElementType> = LinkProps<E> & {
9
+ export type HeaderMenuItemProps<E extends ElementType> = LinkProps<E> & {
10
10
  className?: string | undefined;
11
11
  isActive?: boolean | undefined;
12
12
  isCurrentPage?: boolean | undefined;
@@ -7,7 +7,7 @@
7
7
  import { type ElementType } from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import { type LinkProps } from './Link';
10
- type HeaderNameProps<E extends ElementType> = LinkProps<E> & {
10
+ export type HeaderNameProps<E extends ElementType> = LinkProps<E> & {
11
11
  prefix?: string | undefined;
12
12
  };
13
13
  declare function HeaderName<E extends ElementType = 'a'>({ children, className: customClassName, prefix, ...rest }: HeaderNameProps<E>): JSX.Element;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { type ComponentProps } from 'react';
8
8
  import PropTypes from 'prop-types';
9
- type HeaderNavigationProps = ComponentProps<'nav'>;
9
+ export type HeaderNavigationProps = ComponentProps<'nav'>;
10
10
  declare function HeaderNavigation({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, children, className: customClassName, ...rest }: HeaderNavigationProps): JSX.Element;
11
11
  declare namespace HeaderNavigation {
12
12
  var propTypes: {
@@ -61,10 +61,7 @@ declare namespace HeaderNavigation {
61
61
  includes(searchElement: string, fromIndex?: number | undefined): boolean;
62
62
  flatMap<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[];
63
63
  flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
64
- at(index: number): string | undefined; /**
65
- * Provide valid children of HeaderNavigation, for example `HeaderMenuItem`
66
- * or `HeaderMenu`
67
- */
64
+ at(index: number): string | undefined;
68
65
  [Symbol.iterator](): IterableIterator<string>;
69
66
  [Symbol.unscopables](): {
70
67
  copyWithin: boolean;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { type ReactNode } from 'react';
8
8
  import PropTypes from 'prop-types';
9
- interface HeaderSideNavItemsProps {
9
+ export interface HeaderSideNavItemsProps {
10
10
  className?: string | undefined;
11
11
  children?: ReactNode;
12
12
  hasDivider?: boolean | undefined;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React, { type ComponentProps, type FocusEvent, type KeyboardEvent, type MouseEventHandler } from 'react';
8
- interface SideNavProps extends ComponentProps<'nav'> {
8
+ export interface SideNavProps extends ComponentProps<'nav'> {
9
9
  expanded?: boolean | undefined;
10
10
  defaultExpanded?: boolean | undefined;
11
11
  isChildOfHeader?: boolean | undefined;
@@ -20,6 +20,7 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
20
20
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
21
21
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
22
22
 
23
+ var _hr;
23
24
  function SideNavDivider(_ref) {
24
25
  let {
25
26
  className
@@ -27,9 +28,8 @@ function SideNavDivider(_ref) {
27
28
  const prefix = usePrefix.usePrefix();
28
29
  const classNames = cx__default["default"](`${prefix}--side-nav__divider`, className);
29
30
  return /*#__PURE__*/React__default["default"].createElement("li", {
30
- role: "separator",
31
31
  className: classNames
32
- });
32
+ }, _hr || (_hr = /*#__PURE__*/React__default["default"].createElement("hr", null)));
33
33
  }
34
34
  SideNavDivider.propTypes = {
35
35
  /**
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { ComponentProps } from 'react';
8
8
  import PropTypes from 'prop-types';
9
- type SkipToContentProps = Omit<ComponentProps<'a'>, 'children'> & {
9
+ export type SkipToContentProps = Omit<ComponentProps<'a'>, 'children'> & {
10
10
  children?: string | undefined;
11
11
  };
12
12
  declare function SkipToContent({ children, className: customClassName, href, tabIndex, ...rest }: SkipToContentProps): JSX.Element;
@@ -6,21 +6,21 @@
6
6
  */
7
7
  export { default as Content } from './Content';
8
8
  export { default as Header } from './Header';
9
- export { default as HeaderContainer } from './HeaderContainer';
9
+ export { default as HeaderContainer, type HeaderContainerProps, } from './HeaderContainer';
10
10
  export { default as HeaderGlobalAction } from './HeaderGlobalAction';
11
11
  export { default as HeaderGlobalBar } from './HeaderGlobalBar';
12
12
  export { default as HeaderMenu } from './HeaderMenu';
13
- export { default as HeaderMenuButton } from './HeaderMenuButton';
14
- export { default as HeaderMenuItem } from './HeaderMenuItem';
15
- export { default as HeaderName } from './HeaderName';
16
- export { default as HeaderNavigation } from './HeaderNavigation';
13
+ export { default as HeaderMenuButton, type HeaderMenuButtonProps, } from './HeaderMenuButton';
14
+ export { default as HeaderMenuItem, type HeaderMenuItemProps, } from './HeaderMenuItem';
15
+ export { default as HeaderName, type HeaderNameProps } from './HeaderName';
16
+ export { default as HeaderNavigation, type HeaderNavigationProps, } from './HeaderNavigation';
17
17
  export { default as HeaderPanel } from './HeaderPanel';
18
- export { default as HeaderSideNavItems } from './HeaderSideNavItems';
18
+ export { default as HeaderSideNavItems, type HeaderSideNavItemsProps, } from './HeaderSideNavItems';
19
19
  export { default as Switcher } from './Switcher';
20
20
  export { default as SwitcherItem } from './SwitcherItem';
21
21
  export { default as SwitcherDivider } from './SwitcherDivider';
22
- export { default as SkipToContent } from './SkipToContent';
23
- export { default as SideNav } from './SideNav';
22
+ export { default as SkipToContent, type SkipToContentProps, } from './SkipToContent';
23
+ export { default as SideNav, type SideNavProps } from './SideNav';
24
24
  export { default as SideNavDetails } from './SideNavDetails';
25
25
  export { default as SideNavDivider } from './SideNavDivider';
26
26
  export { default as SideNavFooter } from './SideNavFooter';
package/lib/index.js CHANGED
@@ -54,6 +54,7 @@ var Grid = require('./components/Grid/Grid.js');
54
54
  var Row = require('./components/Grid/Row.js');
55
55
  var Column = require('./components/Grid/Column.js');
56
56
  var ColumnHang = require('./components/Grid/ColumnHang.js');
57
+ var GridContext = require('./components/Grid/GridContext.js');
57
58
  var Icon_Skeleton = require('./components/Icon/Icon.Skeleton.js');
58
59
  var index$6 = require('./components/IdPrefix/index.js');
59
60
  var Link = require('./components/Link/Link.js');
@@ -79,6 +80,8 @@ var SelectItemGroup = require('./components/SelectItemGroup/SelectItemGroup.js')
79
80
  var SkeletonPlaceholder = require('./components/SkeletonPlaceholder/SkeletonPlaceholder.js');
80
81
  var SkeletonText = require('./components/SkeletonText/SkeletonText.js');
81
82
  var index$9 = require('./components/Slider/index.js');
83
+ var StructuredList = require('./components/StructuredList/StructuredList.js');
84
+ var StructuredList_Skeleton = require('./components/StructuredList/StructuredList.Skeleton.js');
82
85
  var Tabs = require('./components/Tabs/Tabs.js');
83
86
  var TabContent = require('./components/TabContent/TabContent.js');
84
87
  var Tabs_Skeleton = require('./components/Tabs/Tabs.Skeleton.js');
@@ -218,8 +221,6 @@ var RadioTile = require('./components/RadioTile/RadioTile.js');
218
221
  var SecondaryButton = require('./components/SecondaryButton/SecondaryButton.js');
219
222
  var SkeletonIcon = require('./components/SkeletonIcon/SkeletonIcon.js');
220
223
  var Slider_Skeleton = require('./components/Slider/Slider.Skeleton.js');
221
- var StructuredList_Skeleton = require('./components/StructuredList/StructuredList.Skeleton.js');
222
- var StructuredList = require('./components/StructuredList/StructuredList.js');
223
224
  var Switch = require('./components/Switch/Switch.js');
224
225
  var IconSwitch = require('./components/Switch/IconSwitch.js');
225
226
  var Stack = require('./components/Stack/Stack.js');
@@ -274,6 +275,7 @@ exports.Grid = Grid.Grid;
274
275
  exports.Row = Row["default"];
275
276
  exports.Column = Column["default"];
276
277
  exports.ColumnHang = ColumnHang.ColumnHang;
278
+ exports.GridSettings = GridContext.GridSettings;
277
279
  exports.IconSkeleton = Icon_Skeleton["default"];
278
280
  exports.IdPrefix = index$6.IdPrefix;
279
281
  exports.Link = Link["default"];
@@ -303,6 +305,13 @@ exports.SelectItemGroup = SelectItemGroup["default"];
303
305
  exports.SkeletonPlaceholder = SkeletonPlaceholder["default"];
304
306
  exports.SkeletonText = SkeletonText["default"];
305
307
  exports.Slider = index$9["default"];
308
+ exports.StructuredListBody = StructuredList.StructuredListBody;
309
+ exports.StructuredListCell = StructuredList.StructuredListCell;
310
+ exports.StructuredListHead = StructuredList.StructuredListHead;
311
+ exports.StructuredListInput = StructuredList.StructuredListInput;
312
+ exports.StructuredListRow = StructuredList.StructuredListRow;
313
+ exports.StructuredListWrapper = StructuredList.StructuredListWrapper;
314
+ exports.StructuredListSkeleton = StructuredList_Skeleton["default"];
306
315
  exports.IconTab = Tabs.IconTab;
307
316
  exports.Tab = Tabs.Tab;
308
317
  exports.TabList = Tabs.TabList;
@@ -470,13 +479,6 @@ exports.RadioTile = RadioTile["default"];
470
479
  exports.SecondaryButton = SecondaryButton["default"];
471
480
  exports.SkeletonIcon = SkeletonIcon["default"];
472
481
  exports.SliderSkeleton = Slider_Skeleton["default"];
473
- exports.StructuredListSkeleton = StructuredList_Skeleton["default"];
474
- exports.StructuredListBody = StructuredList.StructuredListBody;
475
- exports.StructuredListCell = StructuredList.StructuredListCell;
476
- exports.StructuredListHead = StructuredList.StructuredListHead;
477
- exports.StructuredListInput = StructuredList.StructuredListInput;
478
- exports.StructuredListRow = StructuredList.StructuredListRow;
479
- exports.StructuredListWrapper = StructuredList.StructuredListWrapper;
480
482
  exports.Switch = Switch["default"];
481
483
  exports.IconSwitch = IconSwitch["default"];
482
484
  exports.Stack = Stack.Stack;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/react",
3
3
  "description": "React components for the Carbon Design System",
4
- "version": "1.38.0",
4
+ "version": "1.39.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -47,13 +47,13 @@
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.18.3",
49
49
  "@carbon/feature-flags": "^0.16.0",
50
- "@carbon/icons-react": "^11.27.0",
50
+ "@carbon/icons-react": "^11.28.0",
51
51
  "@carbon/layout": "^11.19.0",
52
- "@carbon/styles": "^1.38.0",
52
+ "@carbon/styles": "^1.39.0",
53
53
  "@carbon/telemetry": "0.1.0",
54
54
  "classnames": "2.3.2",
55
55
  "copy-to-clipboard": "^3.3.1",
56
- "downshift": "8.1.0",
56
+ "downshift": "8.2.0",
57
57
  "flatpickr": "4.6.9",
58
58
  "invariant": "^2.2.3",
59
59
  "lodash.debounce": "^4.0.8",
@@ -117,7 +117,6 @@
117
117
  "rimraf": "^5.0.0",
118
118
  "rollup": "^2.79.1",
119
119
  "rollup-plugin-strip-banner": "^3.0.0",
120
- "rtlcss": "^4.0.0",
121
120
  "sass": "^1.51.0",
122
121
  "sass-loader": "^13.0.0",
123
122
  "storybook": "^7.1.0",
@@ -139,5 +138,5 @@
139
138
  "**/*.scss",
140
139
  "**/*.css"
141
140
  ],
142
- "gitHead": "33f414ff39064f1c432898ab8204b89b7b02cfb4"
141
+ "gitHead": "7c151d929564f2cf414f3a0fef4a5fc888242fae"
143
142
  }