@carbon/react 1.11.0-rc.0 → 1.12.0-rc.1
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/ComboBox/ComboBox.js +0 -1
- package/es/components/Layout/LayoutDirection.js +53 -0
- package/es/components/Layout/LayoutDirectionContext.js +14 -0
- package/es/components/Layout/useLayoutDirection.js +19 -0
- package/es/components/ListBox/ListBoxMenuItem.js +2 -1
- package/es/components/Modal/Modal.js +3 -3
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Text/TextDirection.js +51 -0
- package/es/components/TreeView/TreeView.js +5 -5
- package/es/index.js +8 -4
- package/lib/components/ComboBox/ComboBox.js +0 -1
- package/lib/components/Layout/LayoutDirection.js +62 -0
- package/lib/components/Layout/LayoutDirectionContext.js +22 -0
- package/lib/components/Layout/useLayoutDirection.js +23 -0
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -1
- package/lib/components/Modal/Modal.js +3 -3
- package/lib/components/Slider/Slider.js +1 -1
- package/lib/components/Text/TextDirection.js +60 -0
- package/lib/components/TreeView/TreeView.js +5 -24
- package/lib/index.js +18 -10
- package/package.json +6 -5
|
@@ -346,7 +346,6 @@ var ComboBox = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
346
346
|
return /*#__PURE__*/React__default.createElement(ListBox.MenuItem, _extends({
|
|
347
347
|
key: itemProps.id,
|
|
348
348
|
isActive: selectedItem === item,
|
|
349
|
-
tabIndex: "-1",
|
|
350
349
|
isHighlighted: highlightedIndex === index || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id) && (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id) === item.id || false,
|
|
351
350
|
title: itemToElement ? item.text : itemToString(item)
|
|
352
351
|
}, itemProps), itemToElement ? /*#__PURE__*/React__default.createElement(ItemToElement, _extends({
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2022
|
|
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
|
+
|
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import React__default from 'react';
|
|
11
|
+
import { LayoutDirectionContext } from './LayoutDirectionContext.js';
|
|
12
|
+
export { LayoutDirectionContext } from './LayoutDirectionContext.js';
|
|
13
|
+
|
|
14
|
+
var _excluded = ["as", "children", "dir"];
|
|
15
|
+
|
|
16
|
+
function LayoutDirection(_ref) {
|
|
17
|
+
var _ref$as = _ref.as,
|
|
18
|
+
BaseComponent = _ref$as === void 0 ? 'div' : _ref$as,
|
|
19
|
+
children = _ref.children,
|
|
20
|
+
dir = _ref.dir,
|
|
21
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
|
|
23
|
+
var value = React__default.useMemo(function () {
|
|
24
|
+
return {
|
|
25
|
+
direction: dir
|
|
26
|
+
};
|
|
27
|
+
}, [dir]);
|
|
28
|
+
return /*#__PURE__*/React__default.createElement(LayoutDirectionContext.Provider, {
|
|
29
|
+
value: value
|
|
30
|
+
}, /*#__PURE__*/React__default.createElement(BaseComponent, _extends({
|
|
31
|
+
dir: dir
|
|
32
|
+
}, rest), children));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
LayoutDirection.propTypes = {
|
|
36
|
+
/**
|
|
37
|
+
* Customize the element type used to render the outermost node
|
|
38
|
+
*/
|
|
39
|
+
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.elementType]),
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Provide child elements or components to be rendered inside of this
|
|
43
|
+
* component
|
|
44
|
+
*/
|
|
45
|
+
children: PropTypes.node,
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Specify the layout direction of this part of the page
|
|
49
|
+
*/
|
|
50
|
+
dir: PropTypes.oneOf(['ltr', 'rtl']).isRequired
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { LayoutDirection };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2022
|
|
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
|
+
|
|
8
|
+
import React__default from 'react';
|
|
9
|
+
|
|
10
|
+
var LayoutDirectionContext = /*#__PURE__*/React__default.createContext({
|
|
11
|
+
direction: 'ltr'
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { LayoutDirectionContext };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2022
|
|
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
|
+
|
|
8
|
+
import { useContext } from 'react';
|
|
9
|
+
import { LayoutDirectionContext } from './LayoutDirectionContext.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Get access to the current layout direction in context
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
function useLayoutDirection() {
|
|
16
|
+
return useContext(LayoutDirectionContext);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { useLayoutDirection };
|
|
@@ -49,7 +49,8 @@ var ListBoxMenuItem = /*#__PURE__*/React__default.forwardRef(function ListBoxMen
|
|
|
49
49
|
var className = cx("".concat(prefix, "--list-box__menu-item"), (_cx = {}, _defineProperty(_cx, "".concat(prefix, "--list-box__menu-item--active"), isActive), _defineProperty(_cx, "".concat(prefix, "--list-box__menu-item--highlighted"), isHighlighted), _cx));
|
|
50
50
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
51
51
|
className: className,
|
|
52
|
-
title: isTruncated ? title : undefined
|
|
52
|
+
title: isTruncated ? title : undefined,
|
|
53
|
+
tabIndex: "-1"
|
|
53
54
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
54
55
|
className: "".concat(prefix, "--list-box__menu-item__option"),
|
|
55
56
|
ref: (forwardedRef === null || forwardedRef === void 0 ? void 0 : forwardedRef.menuItemOptionRef) || ref
|
|
@@ -121,7 +121,7 @@ var Modal = /*#__PURE__*/React__default.forwardRef(function Modal(_ref, ref) {
|
|
|
121
121
|
tabIndex: "-1",
|
|
122
122
|
className: "".concat(modalCloseButtonClass, "__icon")
|
|
123
123
|
}));
|
|
124
|
-
var ariaLabel = modalLabel || ['aria-label'] || modalAriaLabel || modalHeading;
|
|
124
|
+
var ariaLabel = modalLabel || rest['aria-label'] || modalAriaLabel || modalHeading;
|
|
125
125
|
var getAriaLabelledBy = modalLabel ? modalLabelId : modalHeadingId;
|
|
126
126
|
var hasScrollingContentProps = hasScrollingContent ? {
|
|
127
127
|
tabIndex: 0,
|
|
@@ -151,7 +151,7 @@ var Modal = /*#__PURE__*/React__default.forwardRef(function Modal(_ref, ref) {
|
|
|
151
151
|
useEffect(function () {
|
|
152
152
|
var initialFocus = function initialFocus(focusContainerElement) {
|
|
153
153
|
var containerElement = focusContainerElement || innerModal.current;
|
|
154
|
-
var primaryFocusElement = containerElement ? containerElement.querySelector(selectorPrimaryFocus) : null;
|
|
154
|
+
var primaryFocusElement = containerElement ? containerElement.querySelector(danger ? ".".concat(prefix, "--btn--secondary") : selectorPrimaryFocus) : null;
|
|
155
155
|
|
|
156
156
|
if (primaryFocusElement) {
|
|
157
157
|
return primaryFocusElement;
|
|
@@ -171,7 +171,7 @@ var Modal = /*#__PURE__*/React__default.forwardRef(function Modal(_ref, ref) {
|
|
|
171
171
|
if (open) {
|
|
172
172
|
focusButton(innerModal.current);
|
|
173
173
|
}
|
|
174
|
-
}, [open, selectorPrimaryFocus]);
|
|
174
|
+
}, [open, selectorPrimaryFocus, danger, prefix]);
|
|
175
175
|
var modalBody = /*#__PURE__*/React__default.createElement("div", _extends({
|
|
176
176
|
ref: innerModal,
|
|
177
177
|
role: "dialog"
|
|
@@ -625,7 +625,7 @@ _defineProperty(Slider, "propTypes", {
|
|
|
625
625
|
required: PropTypes.bool,
|
|
626
626
|
|
|
627
627
|
/**
|
|
628
|
-
* A value determining how much the value should increase/decrease by moving the thumb by mouse.
|
|
628
|
+
* A value determining how much the value should increase/decrease by moving the thumb by mouse. If a value other than 1 is provided and the input is *not* hidden, the new step requirement should be added to a visible label. Values outside of the `step` increment will be considered invalid.
|
|
629
629
|
*/
|
|
630
630
|
step: PropTypes.number,
|
|
631
631
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2022
|
|
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
|
+
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import React__default, { useRef, useMemo, useEffect } from 'react';
|
|
10
|
+
import { TextDirectionContext } from './TextDirectionContext.js';
|
|
11
|
+
|
|
12
|
+
function TextDirection(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
_ref$dir = _ref.dir,
|
|
15
|
+
dir = _ref$dir === void 0 ? 'auto' : _ref$dir,
|
|
16
|
+
getTextDirection = _ref.getTextDirection;
|
|
17
|
+
var savedCallback = useRef(getTextDirection);
|
|
18
|
+
var value = useMemo(function () {
|
|
19
|
+
return {
|
|
20
|
+
direction: dir,
|
|
21
|
+
getTextDirection: savedCallback
|
|
22
|
+
};
|
|
23
|
+
}, [dir]);
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
savedCallback.current = getTextDirection;
|
|
26
|
+
});
|
|
27
|
+
return /*#__PURE__*/React__default.createElement(TextDirectionContext.Provider, {
|
|
28
|
+
value: value
|
|
29
|
+
}, children);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
TextDirection.propTypes = {
|
|
33
|
+
/**
|
|
34
|
+
* Provide children to be rendered inside of this component
|
|
35
|
+
*/
|
|
36
|
+
children: PropTypes.node,
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Specify the text direction for rendered children
|
|
40
|
+
*/
|
|
41
|
+
dir: PropTypes.oneOf(['ltr', 'rtl', 'auto']),
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Optionally provide a custom function to get the text direction for a piece
|
|
45
|
+
* of text. Whatever is returned will become the value of the `dir` attribute
|
|
46
|
+
* on a node of text. Should return one of: 'ltr', 'rtl', or 'auto'
|
|
47
|
+
*/
|
|
48
|
+
getTextDirection: PropTypes.func
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { TextDirection };
|
|
@@ -10,7 +10,6 @@ import React__default, { useRef, useState, useEffect } from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import uniqueId from '../../tools/uniqueId.js';
|
|
13
|
-
import * as FeatureFlags from '@carbon/feature-flags';
|
|
14
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
14
|
import { matches, match } from '../../internal/keyboard/match.js';
|
|
16
15
|
import { ArrowUp, ArrowDown, Home, End } from '../../internal/keyboard/keys.js';
|
|
@@ -23,12 +22,13 @@ function TreeView(_ref) {
|
|
|
23
22
|
_ref$hideLabel = _ref.hideLabel,
|
|
24
23
|
hideLabel = _ref$hideLabel === void 0 ? false : _ref$hideLabel,
|
|
25
24
|
label = _ref.label,
|
|
26
|
-
multiselect = _ref.multiselect,
|
|
25
|
+
_ref$multiselect = _ref.multiselect,
|
|
26
|
+
multiselect = _ref$multiselect === void 0 ? false : _ref$multiselect,
|
|
27
27
|
onSelect = _ref.onSelect,
|
|
28
28
|
_ref$selected = _ref.selected,
|
|
29
29
|
preselected = _ref$selected === void 0 ? [] : _ref$selected,
|
|
30
30
|
_ref$size = _ref.size,
|
|
31
|
-
size = _ref$size === void 0 ?
|
|
31
|
+
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
|
32
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
33
|
|
|
34
34
|
var _useRef = useRef(rest.id || uniqueId()),
|
|
@@ -276,7 +276,7 @@ TreeView.propTypes = {
|
|
|
276
276
|
label: PropTypes.string.isRequired,
|
|
277
277
|
|
|
278
278
|
/**
|
|
279
|
-
* Specify the selection mode of the tree.
|
|
279
|
+
* **[Experimental]** Specify the selection mode of the tree.
|
|
280
280
|
* If `multiselect` is `false` then only one node can be selected at a time
|
|
281
281
|
*/
|
|
282
282
|
multiselect: PropTypes.bool,
|
|
@@ -294,7 +294,7 @@ TreeView.propTypes = {
|
|
|
294
294
|
/**
|
|
295
295
|
* Specify the size of the tree from a list of available sizes.
|
|
296
296
|
*/
|
|
297
|
-
size:
|
|
297
|
+
size: PropTypes.oneOf(['xs', 'sm'])
|
|
298
298
|
};
|
|
299
299
|
|
|
300
300
|
export { TreeView as default };
|
package/es/index.js
CHANGED
|
@@ -78,6 +78,7 @@ export { default as TimePickerSelect } from './components/TimePickerSelect/index
|
|
|
78
78
|
export { default as ToggleSkeleton } from './components/Toggle/Toggle.Skeleton.js';
|
|
79
79
|
export { Toggle } from './components/Toggle/Toggle.js';
|
|
80
80
|
export { Toggletip, ToggletipActions, ToggletipButton, ToggletipContent, ToggletipLabel } from './components/Toggletip/index.js';
|
|
81
|
+
import './components/TreeView/index.js';
|
|
81
82
|
export { default as UnorderedList } from './components/UnorderedList/UnorderedList.js';
|
|
82
83
|
export { default as SkeletonText } from './components/SkeletonText/SkeletonText.js';
|
|
83
84
|
export { default as SkeletonPlaceholder } from './components/SkeletonPlaceholder/SkeletonPlaceholder.js';
|
|
@@ -103,7 +104,6 @@ export { OverflowMenuV2 as unstable_OverflowMenuV2 } from './components/Overflow
|
|
|
103
104
|
export { Popover, PopoverContent } from './components/Popover/index.js';
|
|
104
105
|
export { HStack, VStack } from './components/Stack/index.js';
|
|
105
106
|
export { DefinitionTooltip } from './components/Tooltip/next/DefinitionTooltip.js';
|
|
106
|
-
import './components/TreeView/index.js';
|
|
107
107
|
export { GlobalTheme, Theme, useTheme } from './components/Theme/index.js';
|
|
108
108
|
export { usePrefix } from './internal/usePrefix.js';
|
|
109
109
|
export { default as AspectRatio } from './components/AspectRatio/AspectRatio.js';
|
|
@@ -114,6 +114,7 @@ export { default as FileUploaderItem } from './components/FileUploader/FileUploa
|
|
|
114
114
|
export { default as Row } from './components/Grid/Row.js';
|
|
115
115
|
export { default as Column } from './components/Grid/Column.js';
|
|
116
116
|
export { default as NumberInputSkeleton } from './components/NumberInput/NumberInput.Skeleton.js';
|
|
117
|
+
export { default as TreeNode } from './components/TreeView/TreeNode.js';
|
|
117
118
|
export { default as HeaderMenuButton } from './components/UIShell/HeaderMenuButton.js';
|
|
118
119
|
export { default as HeaderName } from './components/UIShell/HeaderName.js';
|
|
119
120
|
export { default as SkipToContent } from './components/UIShell/SkipToContent.js';
|
|
@@ -131,11 +132,10 @@ export { default as unstable_MenuSelectableItem } from './components/Menu/MenuSe
|
|
|
131
132
|
export { default as unstable_PageSelector } from './components/Pagination/experimental/PageSelector.js';
|
|
132
133
|
export { default as unstable_Pagination } from './components/Pagination/experimental/Pagination.js';
|
|
133
134
|
export { default as ProgressBar } from './components/ProgressBar/ProgressBar.js';
|
|
134
|
-
export { default as unstable_TreeNode } from './components/TreeView/TreeNode.js';
|
|
135
135
|
export { default as MultiSelect } from './components/MultiSelect/MultiSelect.js';
|
|
136
136
|
export { default as TextInput } from './components/TextInput/TextInput.js';
|
|
137
|
+
export { default as TreeView } from './components/TreeView/TreeView.js';
|
|
137
138
|
export { default as unstable_Menu } from './components/Menu/Menu.js';
|
|
138
|
-
export { default as unstable_TreeView } from './components/TreeView/TreeView.js';
|
|
139
139
|
export { default as Breadcrumb } from './components/Breadcrumb/Breadcrumb.js';
|
|
140
140
|
export { default as BreadcrumbItem } from './components/Breadcrumb/BreadcrumbItem.js';
|
|
141
141
|
export { default as ComposedModal, ModalBody } from './components/ComposedModal/ComposedModal.js';
|
|
@@ -173,6 +173,7 @@ export { default as ControlledPasswordInput } from './components/TextInput/Contr
|
|
|
173
173
|
export { default as PasswordInput } from './components/TextInput/PasswordInput.js';
|
|
174
174
|
export { ProgressStep } from './components/ProgressIndicator/ProgressIndicator.js';
|
|
175
175
|
export { default as StructuredListSkeleton } from './components/StructuredList/StructuredList.Skeleton.js';
|
|
176
|
+
export { IconTab, TabList, TabPanel, TabPanels } from './components/Tabs/next/Tabs.js';
|
|
176
177
|
export { default as Content } from './components/UIShell/Content.js';
|
|
177
178
|
export { default as Header } from './components/UIShell/Header.js';
|
|
178
179
|
export { default as HeaderContainer } from './components/UIShell/HeaderContainer.js';
|
|
@@ -194,6 +195,9 @@ export { default as SideNavLink } from './components/UIShell/SideNavLink.js';
|
|
|
194
195
|
export { SideNavMenu } from './components/UIShell/SideNavMenu.js';
|
|
195
196
|
export { default as SideNavMenuItem } from './components/UIShell/SideNavMenuItem.js';
|
|
196
197
|
export { default as SideNavSwitcher } from './components/UIShell/SideNavSwitcher.js';
|
|
198
|
+
export { LayoutDirection as unstable_LayoutDirection } from './components/Layout/LayoutDirection.js';
|
|
199
|
+
export { useLayoutDirection as unstable_useLayoutDirection } from './components/Layout/useLayoutDirection.js';
|
|
197
200
|
export { Stack } from './components/Stack/Stack.js';
|
|
198
201
|
export { Tooltip } from './components/Tooltip/next/Tooltip.js';
|
|
199
|
-
export {
|
|
202
|
+
export { Text as unstable_Text } from './components/Text/Text.js';
|
|
203
|
+
export { TextDirection as unstable_TextDirection } from './components/Text/TextDirection.js';
|
|
@@ -357,7 +357,6 @@ var ComboBox = /*#__PURE__*/React__default["default"].forwardRef(function (props
|
|
|
357
357
|
return /*#__PURE__*/React__default["default"].createElement(ListBox["default"].MenuItem, _rollupPluginBabelHelpers["extends"]({
|
|
358
358
|
key: itemProps.id,
|
|
359
359
|
isActive: selectedItem === item,
|
|
360
|
-
tabIndex: "-1",
|
|
361
360
|
isHighlighted: highlightedIndex === index || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id) && (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id) === item.id || false,
|
|
362
361
|
title: itemToElement ? item.text : itemToString(item)
|
|
363
362
|
}, itemProps), itemToElement ? /*#__PURE__*/React__default["default"].createElement(ItemToElement, _rollupPluginBabelHelpers["extends"]({
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2022
|
|
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
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
|
+
var PropTypes = require('prop-types');
|
|
14
|
+
var React = require('react');
|
|
15
|
+
var LayoutDirectionContext = require('./LayoutDirectionContext.js');
|
|
16
|
+
|
|
17
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
+
|
|
19
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
20
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
+
|
|
22
|
+
var _excluded = ["as", "children", "dir"];
|
|
23
|
+
|
|
24
|
+
function LayoutDirection(_ref) {
|
|
25
|
+
var _ref$as = _ref.as,
|
|
26
|
+
BaseComponent = _ref$as === void 0 ? 'div' : _ref$as,
|
|
27
|
+
children = _ref.children,
|
|
28
|
+
dir = _ref.dir,
|
|
29
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
30
|
+
|
|
31
|
+
var value = React__default["default"].useMemo(function () {
|
|
32
|
+
return {
|
|
33
|
+
direction: dir
|
|
34
|
+
};
|
|
35
|
+
}, [dir]);
|
|
36
|
+
return /*#__PURE__*/React__default["default"].createElement(LayoutDirectionContext.LayoutDirectionContext.Provider, {
|
|
37
|
+
value: value
|
|
38
|
+
}, /*#__PURE__*/React__default["default"].createElement(BaseComponent, _rollupPluginBabelHelpers["extends"]({
|
|
39
|
+
dir: dir
|
|
40
|
+
}, rest), children));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
LayoutDirection.propTypes = {
|
|
44
|
+
/**
|
|
45
|
+
* Customize the element type used to render the outermost node
|
|
46
|
+
*/
|
|
47
|
+
as: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].string, PropTypes__default["default"].elementType]),
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Provide child elements or components to be rendered inside of this
|
|
51
|
+
* component
|
|
52
|
+
*/
|
|
53
|
+
children: PropTypes__default["default"].node,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Specify the layout direction of this part of the page
|
|
57
|
+
*/
|
|
58
|
+
dir: PropTypes__default["default"].oneOf(['ltr', 'rtl']).isRequired
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.LayoutDirectionContext = LayoutDirectionContext.LayoutDirectionContext;
|
|
62
|
+
exports.LayoutDirection = LayoutDirection;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2022
|
|
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
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var React = require('react');
|
|
13
|
+
|
|
14
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
|
|
18
|
+
var LayoutDirectionContext = /*#__PURE__*/React__default["default"].createContext({
|
|
19
|
+
direction: 'ltr'
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.LayoutDirectionContext = LayoutDirectionContext;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2022
|
|
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
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var React = require('react');
|
|
13
|
+
var LayoutDirectionContext = require('./LayoutDirectionContext.js');
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Get access to the current layout direction in context
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
function useLayoutDirection() {
|
|
20
|
+
return React.useContext(LayoutDirectionContext.LayoutDirectionContext);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.useLayoutDirection = useLayoutDirection;
|
|
@@ -59,7 +59,8 @@ var ListBoxMenuItem = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
59
59
|
var className = cx__default["default"]("".concat(prefix, "--list-box__menu-item"), (_cx = {}, _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--list-box__menu-item--active"), isActive), _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--list-box__menu-item--highlighted"), isHighlighted), _cx));
|
|
60
60
|
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
|
61
61
|
className: className,
|
|
62
|
-
title: isTruncated ? title : undefined
|
|
62
|
+
title: isTruncated ? title : undefined,
|
|
63
|
+
tabIndex: "-1"
|
|
63
64
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
64
65
|
className: "".concat(prefix, "--list-box__menu-item__option"),
|
|
65
66
|
ref: (forwardedRef === null || forwardedRef === void 0 ? void 0 : forwardedRef.menuItemOptionRef) || ref
|
|
@@ -131,7 +131,7 @@ var Modal = /*#__PURE__*/React__default["default"].forwardRef(function Modal(_re
|
|
|
131
131
|
tabIndex: "-1",
|
|
132
132
|
className: "".concat(modalCloseButtonClass, "__icon")
|
|
133
133
|
}));
|
|
134
|
-
var ariaLabel = modalLabel || ['aria-label'] || modalAriaLabel || modalHeading;
|
|
134
|
+
var ariaLabel = modalLabel || rest['aria-label'] || modalAriaLabel || modalHeading;
|
|
135
135
|
var getAriaLabelledBy = modalLabel ? modalLabelId : modalHeadingId;
|
|
136
136
|
var hasScrollingContentProps = hasScrollingContent ? {
|
|
137
137
|
tabIndex: 0,
|
|
@@ -161,7 +161,7 @@ var Modal = /*#__PURE__*/React__default["default"].forwardRef(function Modal(_re
|
|
|
161
161
|
React.useEffect(function () {
|
|
162
162
|
var initialFocus = function initialFocus(focusContainerElement) {
|
|
163
163
|
var containerElement = focusContainerElement || innerModal.current;
|
|
164
|
-
var primaryFocusElement = containerElement ? containerElement.querySelector(selectorPrimaryFocus) : null;
|
|
164
|
+
var primaryFocusElement = containerElement ? containerElement.querySelector(danger ? ".".concat(prefix, "--btn--secondary") : selectorPrimaryFocus) : null;
|
|
165
165
|
|
|
166
166
|
if (primaryFocusElement) {
|
|
167
167
|
return primaryFocusElement;
|
|
@@ -181,7 +181,7 @@ var Modal = /*#__PURE__*/React__default["default"].forwardRef(function Modal(_re
|
|
|
181
181
|
if (open) {
|
|
182
182
|
focusButton(innerModal.current);
|
|
183
183
|
}
|
|
184
|
-
}, [open, selectorPrimaryFocus]);
|
|
184
|
+
}, [open, selectorPrimaryFocus, danger, prefix]);
|
|
185
185
|
var modalBody = /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
|
|
186
186
|
ref: innerModal,
|
|
187
187
|
role: "dialog"
|
|
@@ -655,7 +655,7 @@ _rollupPluginBabelHelpers.defineProperty(Slider, "propTypes", {
|
|
|
655
655
|
required: PropTypes__default["default"].bool,
|
|
656
656
|
|
|
657
657
|
/**
|
|
658
|
-
* A value determining how much the value should increase/decrease by moving the thumb by mouse.
|
|
658
|
+
* A value determining how much the value should increase/decrease by moving the thumb by mouse. If a value other than 1 is provided and the input is *not* hidden, the new step requirement should be added to a visible label. Values outside of the `step` increment will be considered invalid.
|
|
659
659
|
*/
|
|
660
660
|
step: PropTypes__default["default"].number,
|
|
661
661
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2022
|
|
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
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var PropTypes = require('prop-types');
|
|
13
|
+
var React = require('react');
|
|
14
|
+
var TextDirectionContext = require('./TextDirectionContext.js');
|
|
15
|
+
|
|
16
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
+
|
|
18
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
19
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
+
|
|
21
|
+
function TextDirection(_ref) {
|
|
22
|
+
var children = _ref.children,
|
|
23
|
+
_ref$dir = _ref.dir,
|
|
24
|
+
dir = _ref$dir === void 0 ? 'auto' : _ref$dir,
|
|
25
|
+
getTextDirection = _ref.getTextDirection;
|
|
26
|
+
var savedCallback = React.useRef(getTextDirection);
|
|
27
|
+
var value = React.useMemo(function () {
|
|
28
|
+
return {
|
|
29
|
+
direction: dir,
|
|
30
|
+
getTextDirection: savedCallback
|
|
31
|
+
};
|
|
32
|
+
}, [dir]);
|
|
33
|
+
React.useEffect(function () {
|
|
34
|
+
savedCallback.current = getTextDirection;
|
|
35
|
+
});
|
|
36
|
+
return /*#__PURE__*/React__default["default"].createElement(TextDirectionContext.TextDirectionContext.Provider, {
|
|
37
|
+
value: value
|
|
38
|
+
}, children);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
TextDirection.propTypes = {
|
|
42
|
+
/**
|
|
43
|
+
* Provide children to be rendered inside of this component
|
|
44
|
+
*/
|
|
45
|
+
children: PropTypes__default["default"].node,
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Specify the text direction for rendered children
|
|
49
|
+
*/
|
|
50
|
+
dir: PropTypes__default["default"].oneOf(['ltr', 'rtl', 'auto']),
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Optionally provide a custom function to get the text direction for a piece
|
|
54
|
+
* of text. Whatever is returned will become the value of the `dir` attribute
|
|
55
|
+
* on a node of text. Should return one of: 'ltr', 'rtl', or 'auto'
|
|
56
|
+
*/
|
|
57
|
+
getTextDirection: PropTypes__default["default"].func
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
exports.TextDirection = TextDirection;
|
|
@@ -14,35 +14,15 @@ var React = require('react');
|
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var uniqueId = require('../../tools/uniqueId.js');
|
|
17
|
-
var FeatureFlags = require('@carbon/feature-flags');
|
|
18
17
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
18
|
var match = require('../../internal/keyboard/match.js');
|
|
20
19
|
var keys = require('../../internal/keyboard/keys.js');
|
|
21
20
|
|
|
22
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
22
|
|
|
24
|
-
function _interopNamespace(e) {
|
|
25
|
-
if (e && e.__esModule) return e;
|
|
26
|
-
var n = Object.create(null);
|
|
27
|
-
if (e) {
|
|
28
|
-
Object.keys(e).forEach(function (k) {
|
|
29
|
-
if (k !== 'default') {
|
|
30
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
31
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () { return e[k]; }
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
n["default"] = e;
|
|
39
|
-
return Object.freeze(n);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
43
24
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
44
25
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
45
|
-
var FeatureFlags__namespace = /*#__PURE__*/_interopNamespace(FeatureFlags);
|
|
46
26
|
|
|
47
27
|
var _excluded = ["active", "children", "className", "hideLabel", "label", "multiselect", "onSelect", "selected", "size"];
|
|
48
28
|
function TreeView(_ref) {
|
|
@@ -52,12 +32,13 @@ function TreeView(_ref) {
|
|
|
52
32
|
_ref$hideLabel = _ref.hideLabel,
|
|
53
33
|
hideLabel = _ref$hideLabel === void 0 ? false : _ref$hideLabel,
|
|
54
34
|
label = _ref.label,
|
|
55
|
-
multiselect = _ref.multiselect,
|
|
35
|
+
_ref$multiselect = _ref.multiselect,
|
|
36
|
+
multiselect = _ref$multiselect === void 0 ? false : _ref$multiselect,
|
|
56
37
|
onSelect = _ref.onSelect,
|
|
57
38
|
_ref$selected = _ref.selected,
|
|
58
39
|
preselected = _ref$selected === void 0 ? [] : _ref$selected,
|
|
59
40
|
_ref$size = _ref.size,
|
|
60
|
-
size = _ref$size === void 0 ?
|
|
41
|
+
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
|
61
42
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
62
43
|
|
|
63
44
|
var _useRef = React.useRef(rest.id || uniqueId["default"]()),
|
|
@@ -305,7 +286,7 @@ TreeView.propTypes = {
|
|
|
305
286
|
label: PropTypes__default["default"].string.isRequired,
|
|
306
287
|
|
|
307
288
|
/**
|
|
308
|
-
* Specify the selection mode of the tree.
|
|
289
|
+
* **[Experimental]** Specify the selection mode of the tree.
|
|
309
290
|
* If `multiselect` is `false` then only one node can be selected at a time
|
|
310
291
|
*/
|
|
311
292
|
multiselect: PropTypes__default["default"].bool,
|
|
@@ -323,7 +304,7 @@ TreeView.propTypes = {
|
|
|
323
304
|
/**
|
|
324
305
|
* Specify the size of the tree from a list of available sizes.
|
|
325
306
|
*/
|
|
326
|
-
size:
|
|
307
|
+
size: PropTypes__default["default"].oneOf(['xs', 'sm'])
|
|
327
308
|
};
|
|
328
309
|
|
|
329
310
|
exports["default"] = TreeView;
|
package/lib/index.js
CHANGED
|
@@ -82,6 +82,7 @@ var index$c = require('./components/TimePickerSelect/index.js');
|
|
|
82
82
|
var Toggle_Skeleton = require('./components/Toggle/Toggle.Skeleton.js');
|
|
83
83
|
var Toggle = require('./components/Toggle/Toggle.js');
|
|
84
84
|
var index$i = require('./components/Toggletip/index.js');
|
|
85
|
+
require('./components/TreeView/index.js');
|
|
85
86
|
var UnorderedList = require('./components/UnorderedList/UnorderedList.js');
|
|
86
87
|
var SkeletonText = require('./components/SkeletonText/SkeletonText.js');
|
|
87
88
|
var SkeletonPlaceholder = require('./components/SkeletonPlaceholder/SkeletonPlaceholder.js');
|
|
@@ -107,7 +108,6 @@ var index$n = require('./components/OverflowMenuV2/index.js');
|
|
|
107
108
|
var index$o = require('./components/Popover/index.js');
|
|
108
109
|
var index$p = require('./components/Stack/index.js');
|
|
109
110
|
var DefinitionTooltip = require('./components/Tooltip/next/DefinitionTooltip.js');
|
|
110
|
-
require('./components/TreeView/index.js');
|
|
111
111
|
var index$q = require('./components/Theme/index.js');
|
|
112
112
|
var usePrefix = require('./internal/usePrefix.js');
|
|
113
113
|
var AspectRatio = require('./components/AspectRatio/AspectRatio.js');
|
|
@@ -118,6 +118,7 @@ var FileUploaderItem = require('./components/FileUploader/FileUploaderItem.js');
|
|
|
118
118
|
var Row = require('./components/Grid/Row.js');
|
|
119
119
|
var Column = require('./components/Grid/Column.js');
|
|
120
120
|
var NumberInput_Skeleton = require('./components/NumberInput/NumberInput.Skeleton.js');
|
|
121
|
+
var TreeNode = require('./components/TreeView/TreeNode.js');
|
|
121
122
|
var HeaderMenuButton = require('./components/UIShell/HeaderMenuButton.js');
|
|
122
123
|
var HeaderName = require('./components/UIShell/HeaderName.js');
|
|
123
124
|
var SkipToContent = require('./components/UIShell/SkipToContent.js');
|
|
@@ -135,11 +136,10 @@ var MenuSelectableItem = require('./components/Menu/MenuSelectableItem.js');
|
|
|
135
136
|
var PageSelector = require('./components/Pagination/experimental/PageSelector.js');
|
|
136
137
|
var Pagination = require('./components/Pagination/experimental/Pagination.js');
|
|
137
138
|
var ProgressBar = require('./components/ProgressBar/ProgressBar.js');
|
|
138
|
-
var TreeNode = require('./components/TreeView/TreeNode.js');
|
|
139
139
|
var MultiSelect = require('./components/MultiSelect/MultiSelect.js');
|
|
140
140
|
var TextInput = require('./components/TextInput/TextInput.js');
|
|
141
|
-
var Menu = require('./components/Menu/Menu.js');
|
|
142
141
|
var TreeView = require('./components/TreeView/TreeView.js');
|
|
142
|
+
var Menu = require('./components/Menu/Menu.js');
|
|
143
143
|
var Breadcrumb = require('./components/Breadcrumb/Breadcrumb.js');
|
|
144
144
|
var BreadcrumbItem = require('./components/Breadcrumb/BreadcrumbItem.js');
|
|
145
145
|
var ComposedModal = require('./components/ComposedModal/ComposedModal.js');
|
|
@@ -177,6 +177,7 @@ var ControlledPasswordInput = require('./components/TextInput/ControlledPassword
|
|
|
177
177
|
var PasswordInput = require('./components/TextInput/PasswordInput.js');
|
|
178
178
|
var ProgressIndicator = require('./components/ProgressIndicator/ProgressIndicator.js');
|
|
179
179
|
var StructuredList_Skeleton = require('./components/StructuredList/StructuredList.Skeleton.js');
|
|
180
|
+
var Tabs = require('./components/Tabs/next/Tabs.js');
|
|
180
181
|
var Content = require('./components/UIShell/Content.js');
|
|
181
182
|
var Header = require('./components/UIShell/Header.js');
|
|
182
183
|
var HeaderContainer = require('./components/UIShell/HeaderContainer.js');
|
|
@@ -198,9 +199,12 @@ var SideNavLink = require('./components/UIShell/SideNavLink.js');
|
|
|
198
199
|
var SideNavMenu = require('./components/UIShell/SideNavMenu.js');
|
|
199
200
|
var SideNavMenuItem = require('./components/UIShell/SideNavMenuItem.js');
|
|
200
201
|
var SideNavSwitcher = require('./components/UIShell/SideNavSwitcher.js');
|
|
202
|
+
var LayoutDirection = require('./components/Layout/LayoutDirection.js');
|
|
203
|
+
var useLayoutDirection = require('./components/Layout/useLayoutDirection.js');
|
|
201
204
|
var Stack = require('./components/Stack/Stack.js');
|
|
202
205
|
var Tooltip = require('./components/Tooltip/next/Tooltip.js');
|
|
203
|
-
var
|
|
206
|
+
var Text = require('./components/Text/Text.js');
|
|
207
|
+
var TextDirection = require('./components/Text/TextDirection.js');
|
|
204
208
|
|
|
205
209
|
|
|
206
210
|
|
|
@@ -330,6 +334,7 @@ exports.FileUploaderItem = FileUploaderItem["default"];
|
|
|
330
334
|
exports.Row = Row["default"];
|
|
331
335
|
exports.Column = Column["default"];
|
|
332
336
|
exports.NumberInputSkeleton = NumberInput_Skeleton["default"];
|
|
337
|
+
exports.TreeNode = TreeNode["default"];
|
|
333
338
|
exports.HeaderMenuButton = HeaderMenuButton["default"];
|
|
334
339
|
exports.HeaderName = HeaderName["default"];
|
|
335
340
|
exports.SkipToContent = SkipToContent["default"];
|
|
@@ -347,11 +352,10 @@ exports.unstable_MenuSelectableItem = MenuSelectableItem["default"];
|
|
|
347
352
|
exports.unstable_PageSelector = PageSelector["default"];
|
|
348
353
|
exports.unstable_Pagination = Pagination["default"];
|
|
349
354
|
exports.ProgressBar = ProgressBar["default"];
|
|
350
|
-
exports.unstable_TreeNode = TreeNode["default"];
|
|
351
355
|
exports.MultiSelect = MultiSelect["default"];
|
|
352
356
|
exports.TextInput = TextInput["default"];
|
|
357
|
+
exports.TreeView = TreeView["default"];
|
|
353
358
|
exports.unstable_Menu = Menu["default"];
|
|
354
|
-
exports.unstable_TreeView = TreeView["default"];
|
|
355
359
|
exports.Breadcrumb = Breadcrumb["default"];
|
|
356
360
|
exports.BreadcrumbItem = BreadcrumbItem["default"];
|
|
357
361
|
exports.ComposedModal = ComposedModal["default"];
|
|
@@ -394,6 +398,10 @@ exports.ControlledPasswordInput = ControlledPasswordInput["default"];
|
|
|
394
398
|
exports.PasswordInput = PasswordInput["default"];
|
|
395
399
|
exports.ProgressStep = ProgressIndicator.ProgressStep;
|
|
396
400
|
exports.StructuredListSkeleton = StructuredList_Skeleton["default"];
|
|
401
|
+
exports.IconTab = Tabs.IconTab;
|
|
402
|
+
exports.TabList = Tabs.TabList;
|
|
403
|
+
exports.TabPanel = Tabs.TabPanel;
|
|
404
|
+
exports.TabPanels = Tabs.TabPanels;
|
|
397
405
|
exports.Content = Content["default"];
|
|
398
406
|
exports.Header = Header["default"];
|
|
399
407
|
exports.HeaderContainer = HeaderContainer["default"];
|
|
@@ -415,9 +423,9 @@ exports.SideNavLink = SideNavLink["default"];
|
|
|
415
423
|
exports.SideNavMenu = SideNavMenu.SideNavMenu;
|
|
416
424
|
exports.SideNavMenuItem = SideNavMenuItem["default"];
|
|
417
425
|
exports.SideNavSwitcher = SideNavSwitcher["default"];
|
|
426
|
+
exports.unstable_LayoutDirection = LayoutDirection.LayoutDirection;
|
|
427
|
+
exports.unstable_useLayoutDirection = useLayoutDirection.useLayoutDirection;
|
|
418
428
|
exports.Stack = Stack.Stack;
|
|
419
429
|
exports.Tooltip = Tooltip.Tooltip;
|
|
420
|
-
exports.
|
|
421
|
-
exports.
|
|
422
|
-
exports.TabPanel = Tabs.TabPanel;
|
|
423
|
-
exports.TabPanels = Tabs.TabPanels;
|
|
430
|
+
exports.unstable_Text = Text.Text;
|
|
431
|
+
exports.unstable_TextDirection = TextDirection.TextDirection;
|
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.
|
|
4
|
+
"version": "1.12.0-rc.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@carbon/feature-flags": "^0.8.0",
|
|
47
47
|
"@carbon/icons-react": "^11.7.0",
|
|
48
48
|
"@carbon/layout": "^11.5.0",
|
|
49
|
-
"@carbon/styles": "^1.
|
|
49
|
+
"@carbon/styles": "^1.12.0-rc.1",
|
|
50
50
|
"@carbon/telemetry": "0.1.0",
|
|
51
51
|
"classnames": "2.3.1",
|
|
52
52
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@babel/preset-env": "^7.18.2",
|
|
74
74
|
"@babel/preset-react": "^7.17.12",
|
|
75
75
|
"@carbon/test-utils": "^10.25.0",
|
|
76
|
-
"@carbon/themes": "^11.7.
|
|
76
|
+
"@carbon/themes": "^11.7.1-rc.0",
|
|
77
77
|
"@rollup/plugin-babel": "^5.3.0",
|
|
78
78
|
"@rollup/plugin-commonjs": "^21.0.0",
|
|
79
79
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"browserify-zlib": "^0.2.0",
|
|
96
96
|
"browserslist-config-carbon": "^11.0.0",
|
|
97
97
|
"css-loader": "^6.5.1",
|
|
98
|
+
"enquirer": "^2.3.6",
|
|
98
99
|
"fast-glob": "^3.2.7",
|
|
99
100
|
"fs-extra": "^10.0.0",
|
|
100
101
|
"html-webpack-plugin": "^5.5.0",
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
"rimraf": "^3.0.2",
|
|
110
111
|
"rollup": "^2.46.0",
|
|
111
112
|
"rollup-plugin-strip-banner": "^2.0.0",
|
|
112
|
-
"rtlcss": "^
|
|
113
|
+
"rtlcss": "^4.0.0",
|
|
113
114
|
"sass": "^1.51.0",
|
|
114
115
|
"sass-loader": "^13.0.0",
|
|
115
116
|
"storybook-readme": "^5.0.9",
|
|
@@ -129,5 +130,5 @@
|
|
|
129
130
|
"**/*.scss",
|
|
130
131
|
"**/*.css"
|
|
131
132
|
],
|
|
132
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "3a4f61d60424d5ddb58787a97a6b40cb7ad18baa"
|
|
133
134
|
}
|