@carbon/react 1.13.0 → 1.14.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.Skeleton.js +12 -4
- package/es/components/Accordion/Accordion.js +9 -2
- package/es/components/FileUploader/Filename.js +3 -1
- package/es/components/FluidTextArea/FluidTextArea.js +130 -0
- package/es/components/FluidTextInput/FluidTextInput.js +13 -4
- package/es/components/Notification/Notification.js +6 -2
- package/es/components/NumberInput/NumberInput.js +2 -2
- package/es/components/ProgressIndicator/ProgressIndicator.js +128 -154
- package/es/components/RadioTile/RadioTile.js +2 -11
- package/es/components/TextArea/TextArea.js +14 -5
- package/es/components/TextInput/PasswordInput.js +7 -6
- package/es/components/TextInput/TextInput.js +42 -6
- package/es/index.js +2 -4
- package/lib/components/Accordion/Accordion.Skeleton.js +12 -4
- package/lib/components/Accordion/Accordion.js +9 -2
- package/lib/components/FileUploader/Filename.js +3 -1
- package/lib/components/FluidTextArea/FluidTextArea.js +140 -0
- package/lib/components/FluidTextInput/FluidTextInput.js +12 -3
- package/lib/components/Notification/Notification.js +6 -2
- package/lib/components/NumberInput/NumberInput.js +2 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.js +126 -152
- package/lib/components/RadioTile/RadioTile.js +2 -11
- package/lib/components/TextArea/TextArea.js +13 -4
- package/lib/components/TextInput/PasswordInput.js +7 -6
- package/lib/components/TextInput/TextInput.js +40 -4
- package/lib/index.js +47 -50
- package/package.json +8 -7
- package/es/components/ProgressIndicator/index.js +0 -15
- package/es/components/ProgressIndicator/next/ProgressIndicator.js +0 -117
- package/es/components/SearchFilterButton/SearchFilterButton.js +0 -61
- package/es/components/SearchLayoutButton/SearchLayoutButton.js +0 -151
- package/lib/components/ProgressIndicator/index.js +0 -39
- package/lib/components/ProgressIndicator/next/ProgressIndicator.js +0 -127
- package/lib/components/SearchFilterButton/SearchFilterButton.js +0 -70
- package/lib/components/SearchLayoutButton/SearchLayoutButton.js +0 -160
package/lib/index.js
CHANGED
|
@@ -51,12 +51,9 @@ var index$4 = require('./components/OverflowMenuItem/index.js');
|
|
|
51
51
|
var index$5 = require('./components/Pagination/index.js');
|
|
52
52
|
var PaginationNav = require('./components/PaginationNav/PaginationNav.js');
|
|
53
53
|
var PrimaryButton = require('./components/PrimaryButton/PrimaryButton.js');
|
|
54
|
-
var index$f = require('./components/ProgressIndicator/index.js');
|
|
55
54
|
var RadioButton = require('./components/RadioButton/RadioButton.js');
|
|
56
55
|
var RadioButtonGroup = require('./components/RadioButtonGroup/RadioButtonGroup.js');
|
|
57
56
|
var index$6 = require('./components/Search/index.js');
|
|
58
|
-
var SearchFilterButton = require('./components/SearchFilterButton/SearchFilterButton.js');
|
|
59
|
-
var SearchLayoutButton = require('./components/SearchLayoutButton/SearchLayoutButton.js');
|
|
60
57
|
var ExpandableSearch = require('./components/ExpandableSearch/ExpandableSearch.js');
|
|
61
58
|
var SecondaryButton = require('./components/SecondaryButton/SecondaryButton.js');
|
|
62
59
|
var Select_Skeleton = require('./components/Select/Select.Skeleton.js');
|
|
@@ -65,7 +62,7 @@ var SelectItem = require('./components/SelectItem/SelectItem.js');
|
|
|
65
62
|
var SelectItemGroup = require('./components/SelectItemGroup/SelectItemGroup.js');
|
|
66
63
|
var Switch = require('./components/Switch/Switch.js');
|
|
67
64
|
var index$7 = require('./components/Slider/index.js');
|
|
68
|
-
var index$
|
|
65
|
+
var index$f = require('./components/StructuredList/index.js');
|
|
69
66
|
var index$8 = require('./components/Tab/index.js');
|
|
70
67
|
var TabContent = require('./components/TabContent/TabContent.js');
|
|
71
68
|
var index$9 = require('./components/Tabs/index.js');
|
|
@@ -74,14 +71,14 @@ var Tag = require('./components/Tag/Tag.js');
|
|
|
74
71
|
var TextArea_Skeleton = require('./components/TextArea/TextArea.Skeleton.js');
|
|
75
72
|
var TextArea = require('./components/TextArea/TextArea.js');
|
|
76
73
|
require('./components/TextInput/index.js');
|
|
77
|
-
var index$
|
|
74
|
+
var index$g = require('./components/Tile/index.js');
|
|
78
75
|
var RadioTile = require('./components/RadioTile/RadioTile.js');
|
|
79
76
|
var index$a = require('./components/TileGroup/index.js');
|
|
80
77
|
var index$b = require('./components/TimePicker/index.js');
|
|
81
78
|
var index$c = require('./components/TimePickerSelect/index.js');
|
|
82
79
|
var Toggle_Skeleton = require('./components/Toggle/Toggle.Skeleton.js');
|
|
83
80
|
var Toggle = require('./components/Toggle/Toggle.js');
|
|
84
|
-
var index$
|
|
81
|
+
var index$h = require('./components/Toggletip/index.js');
|
|
85
82
|
require('./components/TreeView/index.js');
|
|
86
83
|
var UnorderedList = require('./components/UnorderedList/UnorderedList.js');
|
|
87
84
|
var SkeletonText = require('./components/SkeletonText/SkeletonText.js');
|
|
@@ -99,16 +96,16 @@ var Tabs_Skeleton = require('./components/Tabs/Tabs.Skeleton.js');
|
|
|
99
96
|
var TextInput_Skeleton = require('./components/TextInput/TextInput.Skeleton.js');
|
|
100
97
|
var ToggleSmall_Skeleton = require('./components/ToggleSmall/ToggleSmall.Skeleton.js');
|
|
101
98
|
var Icon_Skeleton = require('./components/Icon/Icon.Skeleton.js');
|
|
102
|
-
var index$
|
|
103
|
-
var index$
|
|
104
|
-
var index$
|
|
105
|
-
var index$
|
|
99
|
+
var index$i = require('./components/FeatureFlags/index.js');
|
|
100
|
+
var index$j = require('./components/Heading/index.js');
|
|
101
|
+
var index$k = require('./components/IconButton/index.js');
|
|
102
|
+
var index$l = require('./components/Layer/index.js');
|
|
106
103
|
require('./components/Menu/index.js');
|
|
107
|
-
var index$
|
|
108
|
-
var index$
|
|
109
|
-
var index$
|
|
104
|
+
var index$m = require('./components/OverflowMenuV2/index.js');
|
|
105
|
+
var index$n = require('./components/Popover/index.js');
|
|
106
|
+
var index$o = require('./components/Stack/index.js');
|
|
110
107
|
var DefinitionTooltip = require('./components/Tooltip/next/DefinitionTooltip.js');
|
|
111
|
-
var index$
|
|
108
|
+
var index$p = require('./components/Theme/index.js');
|
|
112
109
|
var usePrefix = require('./internal/usePrefix.js');
|
|
113
110
|
var AspectRatio = require('./components/AspectRatio/AspectRatio.js');
|
|
114
111
|
var Filename = require('./components/FileUploader/Filename.js');
|
|
@@ -129,6 +126,7 @@ var SideNavItem = require('./components/UIShell/SideNavItem.js');
|
|
|
129
126
|
var SideNavLinkText = require('./components/UIShell/SideNavLinkText.js');
|
|
130
127
|
var useContextMenu = require('./components/ContextMenu/useContextMenu.js');
|
|
131
128
|
var FluidTextInput = require('./components/FluidTextInput/FluidTextInput.js');
|
|
129
|
+
var FluidTextArea = require('./components/FluidTextArea/FluidTextArea.js');
|
|
132
130
|
var MenuDivider = require('./components/Menu/MenuDivider.js');
|
|
133
131
|
var MenuGroup = require('./components/Menu/MenuGroup.js');
|
|
134
132
|
var MenuItem = require('./components/Menu/MenuItem.js');
|
|
@@ -249,12 +247,9 @@ exports.OverflowMenuItem = index$4["default"];
|
|
|
249
247
|
exports.Pagination = index$5["default"];
|
|
250
248
|
exports.PaginationNav = PaginationNav["default"];
|
|
251
249
|
exports.PrimaryButton = PrimaryButton["default"];
|
|
252
|
-
exports.ProgressIndicator = index$f.ProgressIndicator;
|
|
253
250
|
exports.RadioButton = RadioButton["default"];
|
|
254
251
|
exports.RadioButtonGroup = RadioButtonGroup["default"];
|
|
255
252
|
exports.Search = index$6["default"];
|
|
256
|
-
exports.SearchFilterButton = SearchFilterButton["default"];
|
|
257
|
-
exports.SearchLayoutButton = SearchLayoutButton["default"];
|
|
258
253
|
exports.ExpandableSearch = ExpandableSearch["default"];
|
|
259
254
|
exports.SecondaryButton = SecondaryButton["default"];
|
|
260
255
|
exports.SelectSkeleton = Select_Skeleton["default"];
|
|
@@ -263,12 +258,12 @@ exports.SelectItem = SelectItem["default"];
|
|
|
263
258
|
exports.SelectItemGroup = SelectItemGroup["default"];
|
|
264
259
|
exports.Switch = Switch["default"];
|
|
265
260
|
exports.Slider = index$7["default"];
|
|
266
|
-
exports.StructuredListBody = index$
|
|
267
|
-
exports.StructuredListCell = index$
|
|
268
|
-
exports.StructuredListHead = index$
|
|
269
|
-
exports.StructuredListInput = index$
|
|
270
|
-
exports.StructuredListRow = index$
|
|
271
|
-
exports.StructuredListWrapper = index$
|
|
261
|
+
exports.StructuredListBody = index$f.StructuredListBody;
|
|
262
|
+
exports.StructuredListCell = index$f.StructuredListCell;
|
|
263
|
+
exports.StructuredListHead = index$f.StructuredListHead;
|
|
264
|
+
exports.StructuredListInput = index$f.StructuredListInput;
|
|
265
|
+
exports.StructuredListRow = index$f.StructuredListRow;
|
|
266
|
+
exports.StructuredListWrapper = index$f.StructuredListWrapper;
|
|
272
267
|
exports.Tab = index$8["default"];
|
|
273
268
|
exports.TabContent = TabContent["default"];
|
|
274
269
|
exports.Tabs = index$9["default"];
|
|
@@ -276,23 +271,23 @@ exports.TagSkeleton = Tag_Skeleton["default"];
|
|
|
276
271
|
exports.Tag = Tag["default"];
|
|
277
272
|
exports.TextAreaSkeleton = TextArea_Skeleton["default"];
|
|
278
273
|
exports.TextArea = TextArea["default"];
|
|
279
|
-
exports.ClickableTile = index$
|
|
280
|
-
exports.ExpandableTile = index$
|
|
281
|
-
exports.SelectableTile = index$
|
|
282
|
-
exports.Tile = index$
|
|
283
|
-
exports.TileAboveTheFoldContent = index$
|
|
284
|
-
exports.TileBelowTheFoldContent = index$
|
|
274
|
+
exports.ClickableTile = index$g.ClickableTile;
|
|
275
|
+
exports.ExpandableTile = index$g.ExpandableTile;
|
|
276
|
+
exports.SelectableTile = index$g.SelectableTile;
|
|
277
|
+
exports.Tile = index$g.Tile;
|
|
278
|
+
exports.TileAboveTheFoldContent = index$g.TileAboveTheFoldContent;
|
|
279
|
+
exports.TileBelowTheFoldContent = index$g.TileBelowTheFoldContent;
|
|
285
280
|
exports.RadioTile = RadioTile["default"];
|
|
286
281
|
exports.TileGroup = index$a["default"];
|
|
287
282
|
exports.TimePicker = index$b["default"];
|
|
288
283
|
exports.TimePickerSelect = index$c["default"];
|
|
289
284
|
exports.ToggleSkeleton = Toggle_Skeleton["default"];
|
|
290
285
|
exports.Toggle = Toggle.Toggle;
|
|
291
|
-
exports.Toggletip = index$
|
|
292
|
-
exports.ToggletipActions = index$
|
|
293
|
-
exports.ToggletipButton = index$
|
|
294
|
-
exports.ToggletipContent = index$
|
|
295
|
-
exports.ToggletipLabel = index$
|
|
286
|
+
exports.Toggletip = index$h.Toggletip;
|
|
287
|
+
exports.ToggletipActions = index$h.ToggletipActions;
|
|
288
|
+
exports.ToggletipButton = index$h.ToggletipButton;
|
|
289
|
+
exports.ToggletipContent = index$h.ToggletipContent;
|
|
290
|
+
exports.ToggletipLabel = index$h.ToggletipLabel;
|
|
296
291
|
exports.UnorderedList = UnorderedList["default"];
|
|
297
292
|
exports.SkeletonText = SkeletonText["default"];
|
|
298
293
|
exports.SkeletonPlaceholder = SkeletonPlaceholder["default"];
|
|
@@ -309,23 +304,23 @@ exports.TabsSkeleton = Tabs_Skeleton["default"];
|
|
|
309
304
|
exports.TextInputSkeleton = TextInput_Skeleton["default"];
|
|
310
305
|
exports.ToggleSmallSkeleton = ToggleSmall_Skeleton["default"];
|
|
311
306
|
exports.IconSkeleton = Icon_Skeleton["default"];
|
|
312
|
-
exports.unstable_FeatureFlags = index$
|
|
313
|
-
exports.unstable_useFeatureFlag = index$
|
|
314
|
-
exports.unstable_useFeatureFlags = index$
|
|
315
|
-
exports.Heading = index$
|
|
316
|
-
exports.Section = index$
|
|
317
|
-
exports.IconButton = index$
|
|
318
|
-
exports.Layer = index$
|
|
319
|
-
exports.useLayer = index$
|
|
320
|
-
exports.unstable_OverflowMenuV2 = index$
|
|
321
|
-
exports.Popover = index$
|
|
322
|
-
exports.PopoverContent = index$
|
|
323
|
-
exports.HStack = index$
|
|
324
|
-
exports.VStack = index$
|
|
307
|
+
exports.unstable_FeatureFlags = index$i.FeatureFlags;
|
|
308
|
+
exports.unstable_useFeatureFlag = index$i.useFeatureFlag;
|
|
309
|
+
exports.unstable_useFeatureFlags = index$i.useFeatureFlags;
|
|
310
|
+
exports.Heading = index$j.Heading;
|
|
311
|
+
exports.Section = index$j.Section;
|
|
312
|
+
exports.IconButton = index$k.IconButton;
|
|
313
|
+
exports.Layer = index$l.Layer;
|
|
314
|
+
exports.useLayer = index$l.useLayer;
|
|
315
|
+
exports.unstable_OverflowMenuV2 = index$m.OverflowMenuV2;
|
|
316
|
+
exports.Popover = index$n.Popover;
|
|
317
|
+
exports.PopoverContent = index$n.PopoverContent;
|
|
318
|
+
exports.HStack = index$o.HStack;
|
|
319
|
+
exports.VStack = index$o.VStack;
|
|
325
320
|
exports.DefinitionTooltip = DefinitionTooltip.DefinitionTooltip;
|
|
326
|
-
exports.GlobalTheme = index$
|
|
327
|
-
exports.Theme = index$
|
|
328
|
-
exports.useTheme = index$
|
|
321
|
+
exports.GlobalTheme = index$p.GlobalTheme;
|
|
322
|
+
exports.Theme = index$p.Theme;
|
|
323
|
+
exports.useTheme = index$p.useTheme;
|
|
329
324
|
exports.usePrefix = usePrefix.usePrefix;
|
|
330
325
|
exports.AspectRatio = AspectRatio["default"];
|
|
331
326
|
exports.Filename = Filename["default"];
|
|
@@ -346,6 +341,7 @@ exports.SideNavItem = SideNavItem["default"];
|
|
|
346
341
|
exports.SideNavLinkText = SideNavLinkText["default"];
|
|
347
342
|
exports.unstable_useContextMenu = useContextMenu["default"];
|
|
348
343
|
exports.unstable__FluidTextInput = FluidTextInput["default"];
|
|
344
|
+
exports.unstable__FluidTextArea = FluidTextArea["default"];
|
|
349
345
|
exports.unstable_MenuDivider = MenuDivider["default"];
|
|
350
346
|
exports.unstable_MenuGroup = MenuGroup["default"];
|
|
351
347
|
exports.unstable_MenuItem = MenuItem["default"];
|
|
@@ -398,6 +394,7 @@ exports.ToastNotification = Notification.ToastNotification;
|
|
|
398
394
|
exports.NumberInput = NumberInput.NumberInput;
|
|
399
395
|
exports.ControlledPasswordInput = ControlledPasswordInput["default"];
|
|
400
396
|
exports.PasswordInput = PasswordInput["default"];
|
|
397
|
+
exports.ProgressIndicator = ProgressIndicator.ProgressIndicator;
|
|
401
398
|
exports.ProgressStep = ProgressIndicator.ProgressStep;
|
|
402
399
|
exports.StructuredListSkeleton = StructuredList_Skeleton["default"];
|
|
403
400
|
exports.IconTab = Tabs.IconTab;
|
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.14.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/runtime": "^7.18.3",
|
|
46
46
|
"@carbon/feature-flags": "^0.9.0",
|
|
47
|
-
"@carbon/icons-react": "^11.
|
|
48
|
-
"@carbon/layout": "^11.
|
|
49
|
-
"@carbon/styles": "^1.
|
|
47
|
+
"@carbon/icons-react": "^11.9.0",
|
|
48
|
+
"@carbon/layout": "^11.7.0",
|
|
49
|
+
"@carbon/styles": "^1.14.0",
|
|
50
50
|
"@carbon/telemetry": "0.1.0",
|
|
51
|
-
"classnames": "2.3.
|
|
51
|
+
"classnames": "2.3.2",
|
|
52
52
|
"copy-to-clipboard": "^3.3.1",
|
|
53
53
|
"downshift": "5.2.1",
|
|
54
54
|
"flatpickr": "4.6.9",
|
|
@@ -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.26.0",
|
|
76
|
-
"@carbon/themes": "^11.
|
|
76
|
+
"@carbon/themes": "^11.10.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",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"babel-preset-carbon": "^0.3.0",
|
|
95
95
|
"browserify-zlib": "^0.2.0",
|
|
96
96
|
"browserslist-config-carbon": "^11.0.0",
|
|
97
|
+
"clipboardy": "^2.1.0",
|
|
97
98
|
"css-loader": "^6.5.1",
|
|
98
99
|
"enquirer": "^2.3.6",
|
|
99
100
|
"fast-glob": "^3.2.7",
|
|
@@ -130,5 +131,5 @@
|
|
|
130
131
|
"**/*.scss",
|
|
131
132
|
"**/*.css"
|
|
132
133
|
],
|
|
133
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "dcf802a75caf0201ac831826f611d24dbe508859"
|
|
134
135
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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 * as FeatureFlags from '@carbon/feature-flags';
|
|
9
|
-
import { ProgressIndicator as ProgressIndicator$2 } from './ProgressIndicator.js';
|
|
10
|
-
export { ProgressStep } from './ProgressIndicator.js';
|
|
11
|
-
import { ProgressIndicator as ProgressIndicator$1 } from './next/ProgressIndicator.js';
|
|
12
|
-
|
|
13
|
-
var ProgressIndicator = FeatureFlags.enabled('enable-v11-release') ? ProgressIndicator$1 : ProgressIndicator$2;
|
|
14
|
-
|
|
15
|
-
export { ProgressIndicator };
|
|
@@ -1,117 +0,0 @@
|
|
|
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, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import cx from 'classnames';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import React__default, { useState } from 'react';
|
|
12
|
-
import { usePrefix } from '../../../internal/usePrefix.js';
|
|
13
|
-
|
|
14
|
-
var _excluded = ["children", "className", "currentIndex", "onChange", "spaceEqually", "vertical"];
|
|
15
|
-
|
|
16
|
-
function ProgressIndicator(_ref) {
|
|
17
|
-
var _cx;
|
|
18
|
-
|
|
19
|
-
var children = _ref.children,
|
|
20
|
-
customClassName = _ref.className,
|
|
21
|
-
_ref$currentIndex = _ref.currentIndex,
|
|
22
|
-
controlledIndex = _ref$currentIndex === void 0 ? 0 : _ref$currentIndex,
|
|
23
|
-
onChange = _ref.onChange,
|
|
24
|
-
spaceEqually = _ref.spaceEqually,
|
|
25
|
-
vertical = _ref.vertical,
|
|
26
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
|
|
28
|
-
var prefix = usePrefix();
|
|
29
|
-
|
|
30
|
-
var _useState = useState(controlledIndex),
|
|
31
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
-
currentIndex = _useState2[0],
|
|
33
|
-
setCurrentIndex = _useState2[1];
|
|
34
|
-
|
|
35
|
-
var _useState3 = useState(controlledIndex),
|
|
36
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
-
prevControlledIndex = _useState4[0],
|
|
38
|
-
setPrevControlledIndex = _useState4[1];
|
|
39
|
-
|
|
40
|
-
var className = cx((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--progress"), true), _defineProperty(_cx, "".concat(prefix, "--progress--vertical"), vertical), _defineProperty(_cx, "".concat(prefix, "--progress--space-equal"), spaceEqually && !vertical), _defineProperty(_cx, customClassName, customClassName), _cx));
|
|
41
|
-
|
|
42
|
-
if (controlledIndex !== prevControlledIndex) {
|
|
43
|
-
setCurrentIndex(controlledIndex);
|
|
44
|
-
setPrevControlledIndex(controlledIndex);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
48
|
-
className: className
|
|
49
|
-
}, rest), React__default.Children.map(children, function (child, index) {
|
|
50
|
-
// only setup click handlers if onChange event is passed
|
|
51
|
-
var onClick = onChange ? function () {
|
|
52
|
-
return onChange(index);
|
|
53
|
-
} : undefined;
|
|
54
|
-
|
|
55
|
-
if (index === currentIndex) {
|
|
56
|
-
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
57
|
-
complete: child.props.complete,
|
|
58
|
-
current: child.props.complete ? false : true,
|
|
59
|
-
index: index,
|
|
60
|
-
onClick: onClick
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (index < currentIndex) {
|
|
65
|
-
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
66
|
-
complete: true,
|
|
67
|
-
index: index,
|
|
68
|
-
onClick: onClick
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (index > currentIndex) {
|
|
73
|
-
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
74
|
-
complete: child.props.complete || false,
|
|
75
|
-
index: index,
|
|
76
|
-
onClick: onClick
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return null;
|
|
81
|
-
}));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
ProgressIndicator.propTypes = {
|
|
85
|
-
/**
|
|
86
|
-
* Provide `<ProgressStep>` components to be rendered in the
|
|
87
|
-
* `<ProgressIndicator>`
|
|
88
|
-
*/
|
|
89
|
-
children: PropTypes.node,
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Provide an optional className to be applied to the containing node
|
|
93
|
-
*/
|
|
94
|
-
className: PropTypes.string,
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Optionally specify the current step array index
|
|
98
|
-
*/
|
|
99
|
-
currentIndex: PropTypes.number,
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Optional callback called if a ProgressStep is clicked on. Returns the index of the step.
|
|
103
|
-
*/
|
|
104
|
-
onChange: PropTypes.func,
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Specify whether the progress steps should be split equally in size in the div
|
|
108
|
-
*/
|
|
109
|
-
spaceEqually: PropTypes.bool,
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Determines whether or not the ProgressIndicator should be rendered vertically.
|
|
113
|
-
*/
|
|
114
|
-
vertical: PropTypes.bool
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export { ProgressIndicator };
|
|
@@ -1,61 +0,0 @@
|
|
|
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 { Filter } from '@carbon/icons-react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import React__default from 'react';
|
|
12
|
-
import { warning } from '../../internal/warning.js';
|
|
13
|
-
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
|
-
|
|
15
|
-
var _excluded = ["labelText", "iconDescription"];
|
|
16
|
-
var didWarnAboutDeprecation = false;
|
|
17
|
-
/**
|
|
18
|
-
* The filter button for `<Search>`.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
var SearchFilterButton = function SearchFilterButton(_ref) {
|
|
22
|
-
var labelText = _ref.labelText,
|
|
23
|
-
iconDescription = _ref.iconDescription,
|
|
24
|
-
other = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
-
|
|
26
|
-
var prefix = usePrefix();
|
|
27
|
-
|
|
28
|
-
if (process.env.NODE_ENV !== "production") {
|
|
29
|
-
process.env.NODE_ENV !== "production" ? warning(didWarnAboutDeprecation, 'The SearchFilterButton component has been deprecated and will be removed in the next major release of `carbon-components-react`') : void 0;
|
|
30
|
-
didWarnAboutDeprecation = true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return /*#__PURE__*/React__default.createElement("button", _extends({
|
|
34
|
-
className: "".concat(prefix, "--search-button"),
|
|
35
|
-
type: "button",
|
|
36
|
-
"aria-label": labelText,
|
|
37
|
-
title: labelText
|
|
38
|
-
}, other), /*#__PURE__*/React__default.createElement(Filter, {
|
|
39
|
-
className: "".concat(prefix, "--search-filter"),
|
|
40
|
-
"aria-label": iconDescription
|
|
41
|
-
}));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
SearchFilterButton.propTypes = {
|
|
45
|
-
/**
|
|
46
|
-
* The icon description.
|
|
47
|
-
*/
|
|
48
|
-
iconDescription: PropTypes.string,
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The a11y label text.
|
|
52
|
-
*/
|
|
53
|
-
labelText: PropTypes.string
|
|
54
|
-
};
|
|
55
|
-
SearchFilterButton.defaultProps = {
|
|
56
|
-
labelText: 'Search',
|
|
57
|
-
iconDescription: 'filter'
|
|
58
|
-
};
|
|
59
|
-
var SearchFilterButton$1 = SearchFilterButton;
|
|
60
|
-
|
|
61
|
-
export { SearchFilterButton$1 as default };
|
|
@@ -1,151 +0,0 @@
|
|
|
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 { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import { ListBulleted, Grid } from '@carbon/icons-react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import React__default, { Component } from 'react';
|
|
12
|
-
import { warning } from '../../internal/warning.js';
|
|
13
|
-
import { PrefixContext } from '../../internal/usePrefix.js';
|
|
14
|
-
|
|
15
|
-
var didWarnAboutDeprecation = false;
|
|
16
|
-
/**
|
|
17
|
-
* The layout button for `<Search>`.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
var SearchLayoutButton = /*#__PURE__*/function (_Component) {
|
|
21
|
-
_inherits(SearchLayoutButton, _Component);
|
|
22
|
-
|
|
23
|
-
var _super = _createSuper(SearchLayoutButton);
|
|
24
|
-
|
|
25
|
-
function SearchLayoutButton(props) {
|
|
26
|
-
var _this;
|
|
27
|
-
|
|
28
|
-
_classCallCheck(this, SearchLayoutButton);
|
|
29
|
-
|
|
30
|
-
_this = _super.call(this, props);
|
|
31
|
-
|
|
32
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
33
|
-
format: 'list'
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
_defineProperty(_assertThisInitialized(_this), "toggleLayout", function () {
|
|
37
|
-
var format = _this.state.format === 'list' ? 'grid' : 'list';
|
|
38
|
-
|
|
39
|
-
_this.setState({
|
|
40
|
-
format: format
|
|
41
|
-
}, function () {
|
|
42
|
-
var onChangeFormat = _this.props.onChangeFormat;
|
|
43
|
-
|
|
44
|
-
if (typeof onChangeFormat === 'function') {
|
|
45
|
-
onChangeFormat({
|
|
46
|
-
format: format
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
if (process.env.NODE_ENV !== "production") {
|
|
53
|
-
process.env.NODE_ENV !== "production" ? warning(didWarnAboutDeprecation, 'The SearchLayoutButton component has been deprecated and will be removed in the next major release of `carbon-components-react`') : void 0;
|
|
54
|
-
didWarnAboutDeprecation = true;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return _this;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Toggles the button state upon user-initiated event.
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_createClass(SearchLayoutButton, [{
|
|
65
|
-
key: "render",
|
|
66
|
-
value: function render() {
|
|
67
|
-
var _this2 = this;
|
|
68
|
-
|
|
69
|
-
var prefix = this.context;
|
|
70
|
-
var _this$props = this.props,
|
|
71
|
-
labelText = _this$props.labelText,
|
|
72
|
-
iconDescriptionList = _this$props.iconDescriptionList,
|
|
73
|
-
iconDescriptionGrid = _this$props.iconDescriptionGrid;
|
|
74
|
-
|
|
75
|
-
var SearchLayoutButtonIcon = function SearchLayoutButtonIcon() {
|
|
76
|
-
if (_this2.state.format === 'list') {
|
|
77
|
-
return /*#__PURE__*/React__default.createElement(ListBulleted, {
|
|
78
|
-
className: "".concat(prefix, "--search-view"),
|
|
79
|
-
"aria-label": iconDescriptionList
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
84
|
-
className: "".concat(prefix, "--search-view"),
|
|
85
|
-
"aria-label": iconDescriptionGrid
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
return /*#__PURE__*/React__default.createElement("button", {
|
|
90
|
-
className: "".concat(prefix, "--search-button"),
|
|
91
|
-
type: "button",
|
|
92
|
-
onClick: this.toggleLayout,
|
|
93
|
-
"aria-label": labelText,
|
|
94
|
-
title: labelText
|
|
95
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
96
|
-
className: "".concat(prefix, "--search__toggle-layout__container")
|
|
97
|
-
}, /*#__PURE__*/React__default.createElement(SearchLayoutButtonIcon, null)));
|
|
98
|
-
}
|
|
99
|
-
}], [{
|
|
100
|
-
key: "getDerivedStateFromProps",
|
|
101
|
-
value: function getDerivedStateFromProps(_ref, state) {
|
|
102
|
-
var format = _ref.format;
|
|
103
|
-
var prevFormat = state.prevFormat;
|
|
104
|
-
return prevFormat === format ? null : {
|
|
105
|
-
format: format || 'list',
|
|
106
|
-
prevFormat: format
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}]);
|
|
110
|
-
|
|
111
|
-
return SearchLayoutButton;
|
|
112
|
-
}(Component);
|
|
113
|
-
|
|
114
|
-
_defineProperty(SearchLayoutButton, "contextType", PrefixContext);
|
|
115
|
-
|
|
116
|
-
_defineProperty(SearchLayoutButton, "propTypes", {
|
|
117
|
-
/**
|
|
118
|
-
* The layout.
|
|
119
|
-
*/
|
|
120
|
-
format: PropTypes.oneOf(['list', 'grid']),
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* The description for the "grid" icon.
|
|
124
|
-
*/
|
|
125
|
-
iconDescriptionGrid: PropTypes.string,
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* The description for the "list" icon.
|
|
129
|
-
*/
|
|
130
|
-
iconDescriptionList: PropTypes.string,
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The a11y label text.
|
|
134
|
-
*/
|
|
135
|
-
labelText: PropTypes.string,
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* The callback called when layout switches.
|
|
139
|
-
*/
|
|
140
|
-
onChangeFormat: PropTypes.func
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
_defineProperty(SearchLayoutButton, "defaultProps", {
|
|
144
|
-
labelText: 'Filter',
|
|
145
|
-
iconDescriptionList: 'list',
|
|
146
|
-
iconDescriptionGrid: 'grid'
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
var SearchLayoutButton$1 = SearchLayoutButton;
|
|
150
|
-
|
|
151
|
-
export { SearchLayoutButton$1 as default };
|
|
@@ -1,39 +0,0 @@
|
|
|
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 FeatureFlags = require('@carbon/feature-flags');
|
|
13
|
-
var ProgressIndicator$1 = require('./ProgressIndicator.js');
|
|
14
|
-
var ProgressIndicator$2 = require('./next/ProgressIndicator.js');
|
|
15
|
-
|
|
16
|
-
function _interopNamespace(e) {
|
|
17
|
-
if (e && e.__esModule) return e;
|
|
18
|
-
var n = Object.create(null);
|
|
19
|
-
if (e) {
|
|
20
|
-
Object.keys(e).forEach(function (k) {
|
|
21
|
-
if (k !== 'default') {
|
|
22
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
23
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () { return e[k]; }
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
n["default"] = e;
|
|
31
|
-
return Object.freeze(n);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var FeatureFlags__namespace = /*#__PURE__*/_interopNamespace(FeatureFlags);
|
|
35
|
-
|
|
36
|
-
var ProgressIndicator = FeatureFlags__namespace.enabled('enable-v11-release') ? ProgressIndicator$2.ProgressIndicator : ProgressIndicator$1.ProgressIndicator;
|
|
37
|
-
|
|
38
|
-
exports.ProgressStep = ProgressIndicator$1.ProgressStep;
|
|
39
|
-
exports.ProgressIndicator = ProgressIndicator;
|