@carbon/react 1.30.0 → 1.31.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.
- package/es/components/Accordion/Accordion.js +3 -1
- package/es/components/AspectRatio/AspectRatio.d.ts +67 -0
- package/es/components/AspectRatio/AspectRatio.js +2 -2
- package/es/components/AspectRatio/index.d.ts +7 -0
- package/es/components/Button/Button.js +6 -1
- package/es/components/Checkbox/Checkbox.js +2 -2
- package/es/components/CodeSnippet/CodeSnippet.js +1 -0
- package/es/components/ComboButton/index.js +6 -5
- package/es/components/ContainedList/ContainedList.js +12 -4
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +6 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +10 -1
- package/es/components/CopyButton/CopyButton.js +8 -2
- package/es/components/DataTable/DataTable.js +8 -2
- package/es/components/DataTable/Table.d.ts +6 -1
- package/es/components/DataTable/Table.js +78 -3
- package/es/components/DataTable/TableHeader.js +2 -1
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +1 -2
- package/es/components/DataTableSkeleton/index.d.ts +9 -0
- package/es/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +6 -2
- package/es/components/FileUploader/FileUploaderButton.js +2 -1
- package/es/components/IconButton/index.js +10 -2
- package/es/components/Layout/index.js +118 -0
- package/es/components/Link/Link.d.ts +53 -0
- package/es/components/Link/Link.js +4 -3
- package/es/components/Link/index.d.ts +9 -0
- package/es/components/ListBox/ListBoxPropTypes.d.ts +1 -1
- package/es/components/Menu/MenuItem.js +2 -1
- package/es/components/MenuButton/index.js +7 -4
- package/es/components/OverflowMenu/index.js +9 -1
- package/es/components/OverflowMenu/next/index.js +98 -0
- package/es/components/OverflowMenuV2/index.js +15 -73
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +0 -1
- package/es/components/Search/Search.d.ts +4 -0
- package/es/components/Search/Search.js +8 -2
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/Tabs/Tabs.js +5 -1
- package/es/components/Tag/Tag.js +2 -0
- package/es/components/TextArea/TextArea.Skeleton.js +1 -2
- package/es/components/TextArea/TextArea.js +1 -2
- package/es/components/TextArea/index.d.ts +10 -0
- package/es/components/TextInput/PasswordInput.js +1 -2
- package/es/components/TextInput/TextInput.Skeleton.js +1 -2
- package/es/components/TextInput/TextInput.js +5 -4
- package/es/components/TextInput/index.d.ts +4 -0
- package/es/components/TimePicker/TimePicker.d.ts +8 -0
- package/es/components/TimePicker/TimePicker.js +26 -6
- package/es/components/Tooltip/Tooltip.js +4 -2
- package/es/components/UIShell/HeaderMenuItem.d.ts +22 -0
- package/es/components/UIShell/HeaderMenuItem.js +4 -3
- package/es/components/UIShell/HeaderPanel.js +3 -11
- package/es/components/UIShell/Link.d.ts +48 -0
- package/es/components/UIShell/Link.js +30 -19
- package/es/components/UIShell/SideNav.d.ts +2 -1
- package/es/components/UIShell/SideNav.js +25 -7
- package/es/index.d.ts +21 -20
- package/es/index.js +30 -28
- package/lib/components/Accordion/Accordion.js +3 -1
- package/lib/components/AspectRatio/AspectRatio.d.ts +67 -0
- package/lib/components/AspectRatio/AspectRatio.js +2 -2
- package/lib/components/AspectRatio/index.d.ts +7 -0
- package/lib/components/Button/Button.js +6 -1
- package/lib/components/Checkbox/Checkbox.js +2 -2
- package/lib/components/CodeSnippet/CodeSnippet.js +1 -0
- package/lib/components/ComboButton/index.js +6 -5
- package/lib/components/ContainedList/ContainedList.js +12 -4
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +6 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +10 -1
- package/lib/components/CopyButton/CopyButton.js +8 -2
- package/lib/components/DataTable/DataTable.js +8 -2
- package/lib/components/DataTable/Table.d.ts +6 -1
- package/lib/components/DataTable/Table.js +78 -2
- package/lib/components/DataTable/TableHeader.js +2 -1
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +1 -2
- package/lib/components/DataTableSkeleton/index.d.ts +9 -0
- package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +6 -2
- package/lib/components/FileUploader/FileUploaderButton.js +2 -1
- package/lib/components/IconButton/index.js +10 -2
- package/lib/components/Layout/index.js +129 -0
- package/lib/components/Link/Link.d.ts +53 -0
- package/lib/components/Link/Link.js +4 -3
- package/lib/components/Link/index.d.ts +9 -0
- package/lib/components/ListBox/ListBoxPropTypes.d.ts +1 -1
- package/lib/components/Menu/MenuItem.js +2 -1
- package/lib/components/MenuButton/index.js +7 -4
- package/lib/components/OverflowMenu/index.js +13 -1
- package/lib/components/OverflowMenu/next/index.js +108 -0
- package/lib/components/OverflowMenuV2/index.js +14 -74
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +0 -1
- package/lib/components/Search/Search.d.ts +4 -0
- package/lib/components/Search/Search.js +8 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Tabs/Tabs.js +5 -1
- package/lib/components/Tag/Tag.js +2 -0
- package/lib/components/TextArea/TextArea.Skeleton.js +1 -2
- package/lib/components/TextArea/TextArea.js +1 -2
- package/lib/components/TextArea/index.d.ts +10 -0
- package/lib/components/TextInput/PasswordInput.js +1 -2
- package/lib/components/TextInput/TextInput.Skeleton.js +1 -2
- package/lib/components/TextInput/TextInput.js +5 -4
- package/lib/components/TextInput/index.d.ts +4 -0
- package/lib/components/TimePicker/TimePicker.d.ts +8 -0
- package/lib/components/TimePicker/TimePicker.js +26 -6
- package/lib/components/Tooltip/Tooltip.js +4 -2
- package/lib/components/UIShell/HeaderMenuItem.d.ts +22 -0
- package/lib/components/UIShell/HeaderMenuItem.js +3 -2
- package/lib/components/UIShell/HeaderPanel.js +3 -11
- package/lib/components/UIShell/Link.d.ts +48 -0
- package/lib/components/UIShell/Link.js +29 -18
- package/lib/components/UIShell/SideNav.d.ts +2 -1
- package/lib/components/UIShell/SideNav.js +24 -6
- package/lib/index.d.ts +21 -20
- package/lib/index.js +92 -89
- package/package.json +10 -9
- /package/es/components/{Layout → LayoutDirection}/LayoutDirection.js +0 -0
- /package/es/components/{Layout → LayoutDirection}/LayoutDirectionContext.js +0 -0
- /package/es/components/{Layout → LayoutDirection}/useLayoutDirection.js +0 -0
- /package/lib/components/{Layout → LayoutDirection}/LayoutDirection.js +0 -0
- /package/lib/components/{Layout → LayoutDirection}/LayoutDirectionContext.js +0 -0
- /package/lib/components/{Layout → LayoutDirection}/useLayoutDirection.js +0 -0
package/es/index.js
CHANGED
|
@@ -6,46 +6,53 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import './feature-flags.js';
|
|
9
|
+
export { default as AspectRatio } from './components/AspectRatio/AspectRatio.js';
|
|
9
10
|
export { default as Checkbox } from './components/Checkbox/Checkbox.js';
|
|
10
11
|
export { default as CheckboxSkeleton } from './components/Checkbox/Checkbox.Skeleton.js';
|
|
11
12
|
export { ClassPrefix } from './components/ClassPrefix/index.js';
|
|
13
|
+
export { ComboButton } from './components/ComboButton/index.js';
|
|
12
14
|
export { default as ContentSwitcher } from './components/ContentSwitcher/index.js';
|
|
13
15
|
import './components/DataTable/index.js';
|
|
16
|
+
export { default as DataTableSkeleton } from './components/DataTableSkeleton/DataTableSkeleton.js';
|
|
14
17
|
export { default as DatePicker } from './components/DatePicker/DatePicker.js';
|
|
15
18
|
export { default as DatePickerSkeleton } from './components/DatePicker/DatePicker.Skeleton.js';
|
|
16
19
|
export { default as Dropdown } from './components/Dropdown/Dropdown.js';
|
|
17
20
|
export { default as DropdownSkeleton } from './components/Dropdown/Dropdown.Skeleton.js';
|
|
18
|
-
export { default as Form } from './components/Form/Form.js';
|
|
19
21
|
export { default as FluidForm } from './components/FluidForm/FluidForm.js';
|
|
20
22
|
export { FormContext } from './components/FluidForm/FormContext.js';
|
|
23
|
+
export { default as Form } from './components/Form/Form.js';
|
|
21
24
|
export { FlexGrid } from './components/Grid/FlexGrid.js';
|
|
22
25
|
export { Grid } from './components/Grid/Grid.js';
|
|
23
26
|
export { default as Row } from './components/Grid/Row.js';
|
|
24
27
|
export { default as Column } from './components/Grid/Column.js';
|
|
25
28
|
export { ColumnHang } from './components/Grid/ColumnHang.js';
|
|
29
|
+
export { default as IconSkeleton } from './components/Icon/Icon.Skeleton.js';
|
|
26
30
|
export { IdPrefix } from './components/IdPrefix/index.js';
|
|
31
|
+
export { default as Link } from './components/Link/Link.js';
|
|
27
32
|
export { default as ListItem } from './components/ListItem/ListItem.js';
|
|
33
|
+
export { MenuButton } from './components/MenuButton/index.js';
|
|
28
34
|
export { default as OrderedList } from './components/OrderedList/OrderedList.js';
|
|
29
35
|
export { default as OverflowMenu } from './components/OverflowMenu/index.js';
|
|
36
|
+
export { default as PaginationSkeleton } from './components/Pagination/Pagination.Skeleton.js';
|
|
37
|
+
export { default as RadioButtonSkeleton } from './components/RadioButton/RadioButton.Skeleton.js';
|
|
30
38
|
export { default as Search } from './components/Search/Search.js';
|
|
31
39
|
export { default as SearchSkeleton } from './components/Search/Search.Skeleton.js';
|
|
32
40
|
export { default as Slider } from './components/Slider/index.js';
|
|
33
|
-
export { default as TileGroup } from './components/TileGroup/index.js';
|
|
34
|
-
export { Toggletip, ToggletipActions, ToggletipButton, ToggletipContent, ToggletipLabel } from './components/Toggletip/index.js';
|
|
35
|
-
export { default as UnorderedList } from './components/UnorderedList/UnorderedList.js';
|
|
36
|
-
export { default as PaginationSkeleton } from './components/Pagination/Pagination.Skeleton.js';
|
|
37
|
-
export { default as RadioButtonSkeleton } from './components/RadioButton/RadioButton.Skeleton.js';
|
|
38
41
|
export { default as TagSkeleton } from './components/Tag/Tag.Skeleton.js';
|
|
42
|
+
export { default as TextArea } from './components/TextArea/TextArea.js';
|
|
43
|
+
export { default as TextAreaSkeleton } from './components/TextArea/TextArea.Skeleton.js';
|
|
44
|
+
import './components/TextInput/index.js';
|
|
45
|
+
export { default as TileGroup } from './components/TileGroup/index.js';
|
|
39
46
|
export { default as ToggleSkeleton } from './components/Toggle/Toggle.Skeleton.js';
|
|
40
47
|
export { default as ToggleSmallSkeleton } from './components/ToggleSmall/ToggleSmall.Skeleton.js';
|
|
41
|
-
export {
|
|
48
|
+
export { Toggletip, ToggletipActions, ToggletipButton, ToggletipContent, ToggletipLabel } from './components/Toggletip/index.js';
|
|
49
|
+
export { default as UnorderedList } from './components/UnorderedList/UnorderedList.js';
|
|
42
50
|
export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags } from './components/FeatureFlags/index.js';
|
|
43
51
|
export { Heading, Section } from './components/Heading/index.js';
|
|
44
52
|
export { IconButton } from './components/IconButton/index.js';
|
|
45
53
|
export { Layer, useLayer } from './components/Layer/index.js';
|
|
54
|
+
export { Layout as unstable_Layout } from './components/Layout/index.js';
|
|
46
55
|
export { OverflowMenuV2 as unstable_OverflowMenuV2 } from './components/OverflowMenuV2/index.js';
|
|
47
|
-
export { ComboButton as unstable_ComboButton } from './components/ComboButton/index.js';
|
|
48
|
-
export { MenuButton as unstable_MenuButton } from './components/MenuButton/index.js';
|
|
49
56
|
export { Popover, PopoverContent } from './components/Popover/index.js';
|
|
50
57
|
export { HStack, VStack } from './components/Stack/index.js';
|
|
51
58
|
export { DefinitionTooltip } from './components/Tooltip/DefinitionTooltip.js';
|
|
@@ -54,7 +61,6 @@ import './components/Text/index.js';
|
|
|
54
61
|
export { GlobalTheme, Theme, ThemeContext, useTheme } from './components/Theme/index.js';
|
|
55
62
|
export { PrefixContext, usePrefix } from './internal/usePrefix.js';
|
|
56
63
|
export { useIdPrefix } from './internal/useIdPrefix.js';
|
|
57
|
-
export { default as unstable_useContextMenu } from './components/ContextMenu/useContextMenu.js';
|
|
58
64
|
export { default as unstable__FluidDatePickerSkeleton } from './components/FluidDatePicker/FluidDatePicker.Skeleton.js';
|
|
59
65
|
export { default as unstable__FluidTextArea } from './components/FluidTextArea/FluidTextArea.js';
|
|
60
66
|
export { default as unstable__FluidTextAreaSkeleton } from './components/FluidTextArea/FluidTextArea.Skeleton.js';
|
|
@@ -65,16 +71,17 @@ export { default as unstable_Pagination } from './components/Pagination/experime
|
|
|
65
71
|
export { default as AccordionItem } from './components/Accordion/AccordionItem.js';
|
|
66
72
|
export { default as AccordionSkeleton } from './components/Accordion/Accordion.Skeleton.js';
|
|
67
73
|
export { default as Accordion } from './components/Accordion/Accordion.js';
|
|
68
|
-
export { default as AspectRatio } from './components/AspectRatio/AspectRatio.js';
|
|
69
74
|
export { default as BreadcrumbSkeleton } from './components/Breadcrumb/Breadcrumb.Skeleton.js';
|
|
70
75
|
export { default as CheckboxGroup } from './components/CheckboxGroup/CheckboxGroup.js';
|
|
71
76
|
export { default as CodeSnippetSkeleton } from './components/CodeSnippet/CodeSnippet.Skeleton.js';
|
|
72
77
|
export { default as CodeSnippet } from './components/CodeSnippet/CodeSnippet.js';
|
|
73
78
|
export { default as ContainedListItem } from './components/ContainedList/ContainedListItem/ContainedListItem.js';
|
|
74
79
|
export { default as ContainedList } from './components/ContainedList/ContainedList.js';
|
|
80
|
+
export { default as useContextMenu } from './components/ContextMenu/useContextMenu.js';
|
|
75
81
|
export { default as Copy } from './components/Copy/Copy.js';
|
|
76
82
|
export { default as CopyButton } from './components/CopyButton/CopyButton.js';
|
|
77
83
|
export { default as ErrorBoundary } from './components/ErrorBoundary/ErrorBoundary.js';
|
|
84
|
+
export { default as ExpandableSearch } from './components/ExpandableSearch/ExpandableSearch.js';
|
|
78
85
|
export { default as Filename } from './components/FileUploader/Filename.js';
|
|
79
86
|
export { default as FileUploaderSkeleton } from './components/FileUploader/FileUploader.Skeleton.js';
|
|
80
87
|
export { default as FileUploaderButton } from './components/FileUploader/FileUploaderButton.js';
|
|
@@ -88,8 +95,9 @@ export { default as Loading } from './components/Loading/Loading.js';
|
|
|
88
95
|
export { default as ModalWrapper } from './components/ModalWrapper/ModalWrapper.js';
|
|
89
96
|
export { default as NumberInputSkeleton } from './components/NumberInput/NumberInput.Skeleton.js';
|
|
90
97
|
export { default as ProgressIndicatorSkeleton } from './components/ProgressIndicator/ProgressIndicator.Skeleton.js';
|
|
91
|
-
export { default as ExpandableSearch } from './components/ExpandableSearch/ExpandableSearch.js';
|
|
92
98
|
export { default as TabsSkeleton } from './components/Tabs/Tabs.Skeleton.js';
|
|
99
|
+
export { default as TextInputSkeleton } from './components/TextInput/TextInput.Skeleton.js';
|
|
100
|
+
export { default as TextInput } from './components/TextInput/TextInput.js';
|
|
93
101
|
export { Toggle } from './components/Toggle/Toggle.js';
|
|
94
102
|
export { default as TreeNode } from './components/TreeView/TreeNode.js';
|
|
95
103
|
export { default as TreeView } from './components/TreeView/TreeView.js';
|
|
@@ -118,10 +126,8 @@ export { default as unstable__FluidSelectSkeleton } from './components/FluidSele
|
|
|
118
126
|
export { default as unstable__FluidTimePicker } from './components/FluidTimePicker/FluidTimePicker.js';
|
|
119
127
|
export { default as unstable__FluidTimePickerSkeleton } from './components/FluidTimePicker/FluidTimePicker.Skeleton.js';
|
|
120
128
|
export { default as unstable__FluidTimePickerSelect } from './components/FluidTimePickerSelect/FluidTimePickerSelect.js';
|
|
121
|
-
export { LayoutDirection as unstable_LayoutDirection } from './components/
|
|
122
|
-
export { useLayoutDirection as unstable_useLayoutDirection } from './components/
|
|
123
|
-
export { Menu as unstable_Menu } from './components/Menu/Menu.js';
|
|
124
|
-
export { MenuItem as unstable_MenuItem, MenuItemDivider as unstable_MenuItemDivider, MenuItemGroup as unstable_MenuItemGroup, MenuItemRadioGroup as unstable_MenuItemRadioGroup, MenuItemSelectable as unstable_MenuItemSelectable } from './components/Menu/MenuItem.js';
|
|
129
|
+
export { LayoutDirection as unstable_LayoutDirection } from './components/LayoutDirection/LayoutDirection.js';
|
|
130
|
+
export { useLayoutDirection as unstable_useLayoutDirection } from './components/LayoutDirection/useLayoutDirection.js';
|
|
125
131
|
export { Text as unstable_Text } from './components/Text/Text.js';
|
|
126
132
|
export { TextDirection as unstable_TextDirection } from './components/Text/TextDirection.js';
|
|
127
133
|
export { default as Breadcrumb } from './components/Breadcrumb/Breadcrumb.js';
|
|
@@ -159,7 +165,8 @@ export { default as DatePickerInput } from './components/DatePickerInput/DatePic
|
|
|
159
165
|
export { ErrorBoundaryContext } from './components/ErrorBoundary/ErrorBoundaryContext.js';
|
|
160
166
|
export { default as FilterableMultiSelect } from './components/MultiSelect/FilterableMultiSelect.js';
|
|
161
167
|
export { default as FormGroup } from './components/FormGroup/FormGroup.js';
|
|
162
|
-
export {
|
|
168
|
+
export { Menu } from './components/Menu/Menu.js';
|
|
169
|
+
export { MenuItem, MenuItemDivider, MenuItemGroup, MenuItemRadioGroup, MenuItemSelectable } from './components/Menu/MenuItem.js';
|
|
163
170
|
export { default as Modal } from './components/Modal/Modal.js';
|
|
164
171
|
export { default as MultiSelect } from './components/MultiSelect/MultiSelect.js';
|
|
165
172
|
export { ActionableNotification, InlineNotification, NotificationActionButton, NotificationButton, ToastNotification } from './components/Notification/Notification.js';
|
|
@@ -173,31 +180,26 @@ export { default as PrimaryButton } from './components/PrimaryButton/PrimaryButt
|
|
|
173
180
|
export { ProgressIndicator, ProgressStep } from './components/ProgressIndicator/ProgressIndicator.js';
|
|
174
181
|
export { default as RadioButton } from './components/RadioButton/RadioButton.js';
|
|
175
182
|
export { default as RadioButtonGroup } from './components/RadioButtonGroup/RadioButtonGroup.js';
|
|
183
|
+
export { default as RadioTile } from './components/RadioTile/RadioTile.js';
|
|
176
184
|
export { default as SecondaryButton } from './components/SecondaryButton/SecondaryButton.js';
|
|
177
185
|
export { default as SelectSkeleton } from './components/Select/Select.Skeleton.js';
|
|
178
186
|
export { default as Select } from './components/Select/Select.js';
|
|
179
187
|
export { default as SelectItem } from './components/SelectItem/SelectItem.js';
|
|
180
188
|
export { default as SelectItemGroup } from './components/SelectItemGroup/SelectItemGroup.js';
|
|
181
|
-
export { default as
|
|
182
|
-
export { default as
|
|
189
|
+
export { default as SkeletonIcon } from './components/SkeletonIcon/SkeletonIcon.js';
|
|
190
|
+
export { default as SkeletonPlaceholder } from './components/SkeletonPlaceholder/SkeletonPlaceholder.js';
|
|
191
|
+
export { default as SkeletonText } from './components/SkeletonText/SkeletonText.js';
|
|
183
192
|
export { default as SliderSkeleton } from './components/Slider/Slider.Skeleton.js';
|
|
184
193
|
export { default as StructuredListSkeleton } from './components/StructuredList/StructuredList.Skeleton.js';
|
|
185
194
|
export { StructuredListBody, StructuredListCell, StructuredListHead, StructuredListInput, StructuredListRow, StructuredListWrapper } from './components/StructuredList/StructuredList.js';
|
|
195
|
+
export { default as Switch } from './components/Switch/Switch.js';
|
|
196
|
+
export { default as IconSwitch } from './components/Switch/IconSwitch.js';
|
|
186
197
|
export { IconTab, Tab, TabList, TabPanel, TabPanels, Tabs } from './components/Tabs/Tabs.js';
|
|
187
198
|
export { default as TabContent } from './components/TabContent/TabContent.js';
|
|
188
199
|
export { default as Tag, types } from './components/Tag/Tag.js';
|
|
189
|
-
export { default as TextAreaSkeleton } from './components/TextArea/TextArea.Skeleton.js';
|
|
190
|
-
export { default as TextArea } from './components/TextArea/TextArea.js';
|
|
191
|
-
export { default as TextInputSkeleton } from './components/TextInput/TextInput.Skeleton.js';
|
|
192
|
-
export { default as TextInput } from './components/TextInput/TextInput.js';
|
|
193
200
|
export { ClickableTile, ExpandableTile, SelectableTile, Tile, TileAboveTheFoldContent, TileBelowTheFoldContent } from './components/Tile/Tile.js';
|
|
194
|
-
export { default as RadioTile } from './components/RadioTile/RadioTile.js';
|
|
195
201
|
export { default as TimePicker } from './components/TimePicker/TimePicker.js';
|
|
196
202
|
export { default as TimePickerSelect } from './components/TimePickerSelect/TimePickerSelect.js';
|
|
197
|
-
export { default as SkeletonText } from './components/SkeletonText/SkeletonText.js';
|
|
198
|
-
export { default as SkeletonPlaceholder } from './components/SkeletonPlaceholder/SkeletonPlaceholder.js';
|
|
199
|
-
export { default as SkeletonIcon } from './components/SkeletonIcon/SkeletonIcon.js';
|
|
200
|
-
export { default as DataTableSkeleton } from './components/DataTableSkeleton/DataTableSkeleton.js';
|
|
201
203
|
export { default as Content } from './components/UIShell/Content.js';
|
|
202
204
|
export { default as Header } from './components/UIShell/Header.js';
|
|
203
205
|
export { default as HeaderGlobalAction } from './components/UIShell/HeaderGlobalAction.js';
|
|
@@ -28,13 +28,15 @@ function Accordion(_ref) {
|
|
|
28
28
|
className: customClassName,
|
|
29
29
|
disabled = false,
|
|
30
30
|
isFlush = false,
|
|
31
|
-
size
|
|
31
|
+
size,
|
|
32
32
|
...rest
|
|
33
33
|
} = _ref;
|
|
34
34
|
const prefix = usePrefix.usePrefix();
|
|
35
35
|
const className = cx__default["default"](`${prefix}--accordion`, customClassName, {
|
|
36
36
|
[`${prefix}--accordion--${align}`]: align,
|
|
37
37
|
[`${prefix}--accordion--${size}`]: size,
|
|
38
|
+
// TODO: V12 - Remove this class
|
|
39
|
+
[`${prefix}--layout--size-${size}`]: size,
|
|
38
40
|
[`${prefix}--accordion--flush`]: isFlush && align !== 'start'
|
|
39
41
|
});
|
|
40
42
|
return /*#__PURE__*/React__default["default"].createElement("ul", _rollupPluginBabelHelpers["extends"]({
|
|
@@ -0,0 +1,67 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
8
|
+
import { PropsWithChildren, ReactHTML } from 'react';
|
|
9
|
+
interface AspectRatioProps {
|
|
10
|
+
/**
|
|
11
|
+
* Provide a custom component or string to be rendered as
|
|
12
|
+
* the outermost node of the component. This is useful if you want
|
|
13
|
+
* to deviate from the default `div` tag, where you could specify
|
|
14
|
+
* `section` or `article` instead.
|
|
15
|
+
*
|
|
16
|
+
* ```jsx
|
|
17
|
+
* <AspectRatio as="article">My content</AspectRatio>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
as?: keyof ReactHTML;
|
|
21
|
+
/**
|
|
22
|
+
* Specify a class name for the outermost node
|
|
23
|
+
* of the component.
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Specify the ratio to be used by the aspect ratio
|
|
28
|
+
* container. This will determine what aspect ratio your content
|
|
29
|
+
* will be displayed in.
|
|
30
|
+
*/
|
|
31
|
+
ratio?: '1x1' | '2x3' | '3x2' | '3x4' | '4x3' | '1x2' | '2x1' | '9x16' | '16x9';
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The AspectRatio component provides a `ratio` prop that will be used to
|
|
35
|
+
* specify the aspect ratio that the children you provide will be displayed in.
|
|
36
|
+
* This is often useful alongside our grid components, or for media assets like
|
|
37
|
+
* images or videos.
|
|
38
|
+
*/
|
|
39
|
+
declare const AspectRatio: {
|
|
40
|
+
({ as: BaseComponent, className: containerClassName, children, ratio, ...rest }: PropsWithChildren<AspectRatioProps>): JSX.Element;
|
|
41
|
+
propTypes: {
|
|
42
|
+
/**
|
|
43
|
+
* Provide a custom component or string to be rendered as the outermost node
|
|
44
|
+
* of the component. This is useful if you want to deviate from the default
|
|
45
|
+
* `div` tag, where you could specify `section` or `article` instead.
|
|
46
|
+
*
|
|
47
|
+
* ```jsx
|
|
48
|
+
* <AspectRatio as="article">My content</AspectRatio>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
52
|
+
/**
|
|
53
|
+
* Specify the content that will be placed in the aspect ratio
|
|
54
|
+
*/
|
|
55
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
56
|
+
/**
|
|
57
|
+
* Specify a class name for the outermost node of the component
|
|
58
|
+
*/
|
|
59
|
+
className: PropTypes.Requireable<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Specify the ratio to be used by the aspect ratio container. This will
|
|
62
|
+
* determine what aspect ratio your content will be displayed in.
|
|
63
|
+
*/
|
|
64
|
+
ratio: PropTypes.Requireable<string>;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export default AspectRatio;
|
|
@@ -27,7 +27,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
27
27
|
* This is often useful alongside our grid components, or for media assets like
|
|
28
28
|
* images or videos.
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
const AspectRatio = _ref => {
|
|
31
31
|
let {
|
|
32
32
|
as: BaseComponent = 'div',
|
|
33
33
|
className: containerClassName,
|
|
@@ -40,7 +40,7 @@ function AspectRatio(_ref) {
|
|
|
40
40
|
return /*#__PURE__*/React__default["default"].createElement(BaseComponent, _rollupPluginBabelHelpers["extends"]({
|
|
41
41
|
className: className
|
|
42
42
|
}, rest), children);
|
|
43
|
-
}
|
|
43
|
+
};
|
|
44
44
|
AspectRatio.propTypes = {
|
|
45
45
|
/**
|
|
46
46
|
* Provide a custom component or string to be rendered as the outermost node
|
|
@@ -44,7 +44,7 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef(function Button
|
|
|
44
44
|
onMouseEnter,
|
|
45
45
|
onMouseLeave,
|
|
46
46
|
renderIcon: ButtonImageElement,
|
|
47
|
-
size
|
|
47
|
+
size,
|
|
48
48
|
tabIndex,
|
|
49
49
|
tooltipAlignment = 'center',
|
|
50
50
|
tooltipPosition = 'top',
|
|
@@ -63,9 +63,14 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef(function Button
|
|
|
63
63
|
const buttonClasses = cx__default["default"](className, {
|
|
64
64
|
[`${prefix}--btn`]: true,
|
|
65
65
|
[`${prefix}--btn--sm`]: size === 'sm' && !isExpressive,
|
|
66
|
+
// TODO: V12 - Remove this class
|
|
66
67
|
[`${prefix}--btn--md`]: size === 'md' && !isExpressive,
|
|
68
|
+
// TODO: V12 - Remove this class
|
|
67
69
|
[`${prefix}--btn--xl`]: size === 'xl',
|
|
70
|
+
// TODO: V12 - Remove this class
|
|
68
71
|
[`${prefix}--btn--2xl`]: size === '2xl',
|
|
72
|
+
// TODO: V12 - Remove this class
|
|
73
|
+
[`${prefix}--layout--size-${size}`]: size,
|
|
69
74
|
[`${prefix}--btn--${kind}`]: kind,
|
|
70
75
|
[`${prefix}--btn--disabled`]: disabled,
|
|
71
76
|
[`${prefix}--btn--expressive`]: isExpressive,
|
|
@@ -77,8 +77,8 @@ const Checkbox = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
77
77
|
className: `${prefix}--checkbox`,
|
|
78
78
|
id: id,
|
|
79
79
|
ref: el => {
|
|
80
|
-
if (el
|
|
81
|
-
el.indeterminate = indeterminate;
|
|
80
|
+
if (el) {
|
|
81
|
+
el.indeterminate = indeterminate ?? false;
|
|
82
82
|
}
|
|
83
83
|
if (typeof ref === 'function') {
|
|
84
84
|
ref(el);
|
|
@@ -211,6 +211,7 @@ function CodeSnippet(_ref) {
|
|
|
211
211
|
}), hasRightOverflow && type !== 'multi' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
212
212
|
className: `${prefix}--snippet__overflow-indicator--right`
|
|
213
213
|
}), !hideCopyButton && /*#__PURE__*/React__default["default"].createElement(CopyButton["default"], {
|
|
214
|
+
size: type === 'multi' ? 'sm' : 'md',
|
|
214
215
|
disabled: disabled,
|
|
215
216
|
onClick: handleCopyClick,
|
|
216
217
|
feedback: feedback,
|
|
@@ -44,7 +44,7 @@ const ComboButton = /*#__PURE__*/React__default["default"].forwardRef(function C
|
|
|
44
44
|
label,
|
|
45
45
|
onClick,
|
|
46
46
|
size = 'lg',
|
|
47
|
-
|
|
47
|
+
tooltipAlignment,
|
|
48
48
|
translateWithId: t = defaultTranslateWithId,
|
|
49
49
|
...rest
|
|
50
50
|
} = _ref;
|
|
@@ -86,7 +86,8 @@ const ComboButton = /*#__PURE__*/React__default["default"].forwardRef(function C
|
|
|
86
86
|
const triggerClasses = cx__default["default"](`${prefix}--combo-button__trigger`);
|
|
87
87
|
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
|
88
88
|
className: containerClasses,
|
|
89
|
-
ref: ref
|
|
89
|
+
ref: ref,
|
|
90
|
+
"aria-owns": open ? id : null
|
|
90
91
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91
92
|
className: primaryActionClasses
|
|
92
93
|
}, /*#__PURE__*/React__default["default"].createElement(Button["default"], {
|
|
@@ -98,12 +99,12 @@ const ComboButton = /*#__PURE__*/React__default["default"].forwardRef(function C
|
|
|
98
99
|
label: t('carbon.combo-button.additional-actions'),
|
|
99
100
|
size: size,
|
|
100
101
|
disabled: disabled,
|
|
101
|
-
align:
|
|
102
|
+
align: tooltipAlignment,
|
|
102
103
|
"aria-haspopup": true,
|
|
103
104
|
"aria-expanded": open,
|
|
104
105
|
onClick: handleTriggerClick,
|
|
105
106
|
onMouseDown: handleTriggerMousedown,
|
|
106
|
-
"aria-
|
|
107
|
+
"aria-controls": open ? id : null
|
|
107
108
|
}, _ChevronDown || (_ChevronDown = /*#__PURE__*/React__default["default"].createElement(iconsReact.ChevronDown, null))), /*#__PURE__*/React__default["default"].createElement(Menu.Menu, {
|
|
108
109
|
ref: menuRef,
|
|
109
110
|
id: id,
|
|
@@ -144,7 +145,7 @@ ComboButton.propTypes = {
|
|
|
144
145
|
/**
|
|
145
146
|
* Specify how the trigger tooltip should be aligned.
|
|
146
147
|
*/
|
|
147
|
-
|
|
148
|
+
tooltipAlignment: PropTypes__default["default"].oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right']),
|
|
148
149
|
/**
|
|
149
150
|
* Optional method that takes in a message id and returns an
|
|
150
151
|
* internationalized string.
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var PropTypes = require('prop-types');
|
|
14
14
|
var cx = require('classnames');
|
|
15
|
+
var index = require('../Layout/index.js');
|
|
15
16
|
var useId = require('../../internal/useId.js');
|
|
16
17
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
18
|
|
|
@@ -53,13 +54,16 @@ function ContainedList(_ref) {
|
|
|
53
54
|
isInset,
|
|
54
55
|
kind = variants[0],
|
|
55
56
|
label,
|
|
56
|
-
size
|
|
57
|
+
size
|
|
57
58
|
} = _ref;
|
|
58
59
|
const labelId = `${useId.useId('contained-list')}-header`;
|
|
59
60
|
const prefix = usePrefix.usePrefix();
|
|
60
61
|
const classes = cx__default["default"](`${prefix}--contained-list`, {
|
|
61
|
-
[`${prefix}--contained-list--inset-rulers`]: isInset
|
|
62
|
-
|
|
62
|
+
[`${prefix}--contained-list--inset-rulers`]: isInset,
|
|
63
|
+
[`${prefix}--contained-list--${size}`]: size,
|
|
64
|
+
// TODO: V12 - Remove this class
|
|
65
|
+
[`${prefix}--layout--size-${size}`]: size
|
|
66
|
+
}, `${prefix}--contained-list--${kind}`, className);
|
|
63
67
|
const filteredChildren = filterChildren(children);
|
|
64
68
|
const isActionSearch = ['Search', 'ExpandableSearch'].includes(action?.type?.displayName);
|
|
65
69
|
const renderedChildren = renderChildren(children);
|
|
@@ -70,7 +74,11 @@ function ContainedList(_ref) {
|
|
|
70
74
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
71
75
|
id: labelId,
|
|
72
76
|
className: `${prefix}--contained-list__label`
|
|
73
|
-
}, label), /*#__PURE__*/React__default["default"].createElement(
|
|
77
|
+
}, label), /*#__PURE__*/React__default["default"].createElement(index.LayoutConstraint, {
|
|
78
|
+
size: {
|
|
79
|
+
min: 'sm',
|
|
80
|
+
max: 'xl'
|
|
81
|
+
},
|
|
74
82
|
className: `${prefix}--contained-list__action`
|
|
75
83
|
}, action)), children && /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
76
84
|
"aria-labelledby": labelId
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var PropTypes = require('prop-types');
|
|
14
14
|
var cx = require('classnames');
|
|
15
|
+
var index = require('../../Layout/index.js');
|
|
15
16
|
var usePrefix = require('../../../internal/usePrefix.js');
|
|
16
17
|
|
|
17
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -48,7 +49,11 @@ function ContainedListItem(_ref) {
|
|
|
48
49
|
onClick: onClick
|
|
49
50
|
}, content) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
50
51
|
className: `${prefix}--contained-list-item__content`
|
|
51
|
-
}, content), action && /*#__PURE__*/React__default["default"].createElement(
|
|
52
|
+
}, content), action && /*#__PURE__*/React__default["default"].createElement(index.LayoutConstraint, {
|
|
53
|
+
size: {
|
|
54
|
+
min: 'sm',
|
|
55
|
+
max: 'lg'
|
|
56
|
+
},
|
|
52
57
|
className: `${prefix}--contained-list-item__action`
|
|
53
58
|
}, action));
|
|
54
59
|
}
|
|
@@ -14,6 +14,7 @@ var PropTypes = require('prop-types');
|
|
|
14
14
|
var React = require('react');
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
17
|
+
var index = require('../Layout/index.js');
|
|
17
18
|
var events = require('../../tools/events.js');
|
|
18
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
20
|
var match = require('../../internal/keyboard/match.js');
|
|
@@ -117,9 +118,17 @@ class ContentSwitcher extends React__default["default"].Component {
|
|
|
117
118
|
const classes = cx__default["default"](`${prefix}--content-switcher`, className, {
|
|
118
119
|
[`${prefix}--content-switcher--light`]: light,
|
|
119
120
|
[`${prefix}--content-switcher--${size}`]: size,
|
|
121
|
+
// TODO: V12 - Remove this class
|
|
122
|
+
[`${prefix}--layout--size-${size}`]: size,
|
|
120
123
|
[`${prefix}--content-switcher--icon-only`]: isIconOnly
|
|
121
124
|
});
|
|
122
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
125
|
+
return /*#__PURE__*/React__default["default"].createElement(index.LayoutConstraint, _rollupPluginBabelHelpers["extends"]({
|
|
126
|
+
size: {
|
|
127
|
+
default: 'md',
|
|
128
|
+
min: 'sm',
|
|
129
|
+
max: 'lg'
|
|
130
|
+
}
|
|
131
|
+
}, other, {
|
|
123
132
|
className: classes,
|
|
124
133
|
role: "tablist"
|
|
125
134
|
}), React__default["default"].Children.map(children, (child, index) => /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
@@ -15,6 +15,7 @@ var React = require('react');
|
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var iconsReact = require('@carbon/icons-react');
|
|
17
17
|
var Copy = require('../Copy/Copy.js');
|
|
18
|
+
var index = require('../Layout/index.js');
|
|
18
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
20
|
|
|
20
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -30,12 +31,17 @@ function CopyButton(_ref) {
|
|
|
30
31
|
...other
|
|
31
32
|
} = _ref;
|
|
32
33
|
const prefix = usePrefix.usePrefix();
|
|
33
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
34
|
+
return /*#__PURE__*/React__default["default"].createElement(index.LayoutConstraint, {
|
|
35
|
+
size: {
|
|
36
|
+
default: 'md',
|
|
37
|
+
max: 'lg'
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/React__default["default"].createElement(Copy["default"], _rollupPluginBabelHelpers["extends"]({
|
|
34
40
|
className: cx__default["default"](className, `${prefix}--copy-btn`),
|
|
35
41
|
"aria-label": iconDescription
|
|
36
42
|
}, other), /*#__PURE__*/React__default["default"].createElement(iconsReact.Copy, {
|
|
37
43
|
className: `${prefix}--snippet__icon`
|
|
38
|
-
}));
|
|
44
|
+
})));
|
|
39
45
|
}
|
|
40
46
|
CopyButton.propTypes = {
|
|
41
47
|
/**
|
|
@@ -244,7 +244,8 @@ class DataTable extends React__default["default"].Component {
|
|
|
244
244
|
isSortable,
|
|
245
245
|
useStaticWidth,
|
|
246
246
|
stickyHeader,
|
|
247
|
-
overflowMenuOnHover
|
|
247
|
+
overflowMenuOnHover,
|
|
248
|
+
experimentalAutoAlign
|
|
248
249
|
} = this.props;
|
|
249
250
|
return {
|
|
250
251
|
useZebraStyles,
|
|
@@ -252,7 +253,8 @@ class DataTable extends React__default["default"].Component {
|
|
|
252
253
|
isSortable,
|
|
253
254
|
useStaticWidth,
|
|
254
255
|
stickyHeader,
|
|
255
|
-
overflowMenuOnHover
|
|
256
|
+
overflowMenuOnHover,
|
|
257
|
+
experimentalAutoAlign
|
|
256
258
|
};
|
|
257
259
|
});
|
|
258
260
|
_rollupPluginBabelHelpers.defineProperty(this, "getTableContainerProps", () => {
|
|
@@ -631,6 +633,10 @@ class DataTable extends React__default["default"].Component {
|
|
|
631
633
|
}
|
|
632
634
|
}
|
|
633
635
|
_rollupPluginBabelHelpers.defineProperty(DataTable, "propTypes", {
|
|
636
|
+
/**
|
|
637
|
+
* Experimental property. Allows table to align cell contents to the top if there is text wrapping in the content. Might have performance issues, intended for smaller tables
|
|
638
|
+
*/
|
|
639
|
+
experimentalAutoAlign: PropTypes__default["default"].bool,
|
|
634
640
|
/**
|
|
635
641
|
* Optional hook to manually control filtering of the rows from the
|
|
636
642
|
* TableToolbarSearch component
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { PropsWithChildren } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
interface TableProps {
|
|
10
|
+
experimentalAutoAlign?: boolean;
|
|
10
11
|
className?: string;
|
|
11
12
|
/**
|
|
12
13
|
* `false` If true, will apply sorting styles
|
|
@@ -34,13 +35,17 @@ interface TableProps {
|
|
|
34
35
|
useZebraStyles?: boolean;
|
|
35
36
|
}
|
|
36
37
|
export declare const Table: {
|
|
37
|
-
({ className, children, useZebraStyles, size, isSortable, useStaticWidth, stickyHeader, overflowMenuOnHover, ...other }: PropsWithChildren<TableProps>): JSX.Element;
|
|
38
|
+
({ className, children, useZebraStyles, size, isSortable, useStaticWidth, stickyHeader, overflowMenuOnHover, experimentalAutoAlign, ...other }: PropsWithChildren<TableProps>): JSX.Element;
|
|
38
39
|
propTypes: {
|
|
39
40
|
/**
|
|
40
41
|
* Pass in the children that will be rendered within the Table
|
|
41
42
|
*/
|
|
42
43
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
43
44
|
className: PropTypes.Requireable<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Experimental property. Allows table to align cell contents to the top if there is text wrapping in the content. Might have performance issues, intended for smaller tables
|
|
47
|
+
*/
|
|
48
|
+
experimentalAutoAlign: PropTypes.Requireable<boolean>;
|
|
44
49
|
/**
|
|
45
50
|
* `false` If true, will apply sorting styles
|
|
46
51
|
*/
|