@itwin/itwinui-react 1.36.0 → 1.37.2
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/CHANGELOG.md +27 -0
- package/cjs/core/Alert/Alert.js +1 -1
- package/cjs/core/Badge/Badge.js +1 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/cjs/core/Buttons/Button/Button.js +2 -2
- package/cjs/core/Buttons/IconButton/IconButton.js +2 -2
- package/cjs/core/Carousel/Carousel.js +1 -1
- package/cjs/core/Carousel/CarouselDotsList.js +1 -1
- package/cjs/core/Carousel/CarouselSlider.js +1 -1
- package/cjs/core/Checkbox/Checkbox.js +1 -1
- package/cjs/core/ColorPicker/ColorBuilder.js +3 -3
- package/cjs/core/ColorPicker/ColorInputPanel.js +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.js +1 -1
- package/cjs/core/ComboBox/ComboBox.js +9 -6
- package/cjs/core/DatePicker/DatePicker.js +2 -2
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +1 -1
- package/cjs/core/Footer/Footer.js +2 -2
- package/cjs/core/Header/HeaderBreadcrumbs.js +1 -1
- package/cjs/core/Header/HeaderButton.js +1 -0
- package/cjs/core/InformationPanel/InformationPanel.js +2 -2
- package/cjs/core/Input/Input.js +1 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
- package/cjs/core/Radio/Radio.js +1 -1
- package/cjs/core/Select/Select.js +3 -3
- package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +33 -0
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +50 -0
- package/cjs/core/SkipToContentLink/index.d.ts +4 -0
- package/cjs/core/SkipToContentLink/index.js +10 -0
- package/cjs/core/Slider/Slider.js +1 -1
- package/cjs/core/Slider/Thumb.js +1 -1
- package/cjs/core/Slider/Track.js +1 -1
- package/cjs/core/Surface/Surface.d.ts +32 -0
- package/cjs/core/Surface/Surface.js +70 -0
- package/cjs/core/Surface/index.d.ts +4 -0
- package/cjs/core/Surface/index.js +10 -0
- package/cjs/core/Table/Table.d.ts +6 -0
- package/cjs/core/Table/Table.js +34 -12
- package/cjs/core/Table/TablePaginator.js +6 -6
- package/cjs/core/Table/TableRowMemoized.js +1 -1
- package/cjs/core/Table/cells/EditableCell.js +2 -1
- package/cjs/core/Table/columns/actionColumn.js +2 -2
- package/cjs/core/Table/hooks/useSelectionCell.d.ts +1 -1
- package/cjs/core/Table/hooks/useSelectionCell.js +3 -2
- package/cjs/core/Table/utils.js +5 -5
- package/cjs/core/Tabs/Tabs.d.ts +1 -1
- package/cjs/core/Tabs/Tabs.js +7 -8
- package/cjs/core/Tag/Tag.js +6 -3
- package/cjs/core/Tag/TagContainer.js +1 -1
- package/cjs/core/Tile/Tile.d.ts +6 -2
- package/cjs/core/Tile/Tile.js +8 -3
- package/cjs/core/Toast/Toast.js +2 -2
- package/cjs/core/Toast/ToastWrapper.js +1 -1
- package/cjs/core/Tree/TreeNode.js +2 -2
- package/cjs/core/Typography/Text/Text.js +1 -1
- package/cjs/core/UserIcon/UserIcon.js +2 -2
- package/cjs/core/UserIconGroup/UserIconGroup.js +3 -3
- package/cjs/core/Wizard/Step.js +1 -1
- package/cjs/core/Wizard/Wizard.js +1 -1
- package/cjs/core/index.d.ts +4 -0
- package/cjs/core/index.js +6 -2
- package/cjs/core/utils/color/ColorValue.js +11 -11
- package/cjs/core/utils/color/index.js +5 -1
- package/cjs/core/utils/components/FocusTrap.js +6 -8
- package/cjs/core/utils/components/InputContainer.js +1 -1
- package/cjs/core/utils/components/MiddleTextTruncation.js +1 -1
- package/cjs/core/utils/components/VirtualScroll.js +1 -1
- package/cjs/core/utils/components/WithCSSTransition.js +5 -5
- package/cjs/core/utils/components/index.js +5 -1
- package/cjs/core/utils/functions/focusable.js +1 -1
- package/cjs/core/utils/functions/index.js +5 -1
- package/cjs/core/utils/hooks/index.js +5 -1
- package/cjs/core/utils/hooks/useOverflow.js +3 -3
- package/cjs/core/utils/hooks/useTheme.js +1 -1
- package/cjs/core/utils/index.js +5 -1
- package/cjs/index.js +5 -1
- package/esm/core/Alert/Alert.js +1 -1
- package/esm/core/Badge/Badge.js +1 -1
- package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/esm/core/Buttons/Button/Button.js +2 -2
- package/esm/core/Buttons/IconButton/IconButton.js +2 -2
- package/esm/core/Carousel/Carousel.js +1 -1
- package/esm/core/Carousel/CarouselDotsList.js +1 -1
- package/esm/core/Carousel/CarouselSlider.js +1 -1
- package/esm/core/Checkbox/Checkbox.js +1 -1
- package/esm/core/ColorPicker/ColorBuilder.js +3 -3
- package/esm/core/ColorPicker/ColorInputPanel.js +1 -1
- package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/esm/core/ColorPicker/ColorSwatch.js +1 -1
- package/esm/core/ComboBox/ComboBox.js +9 -6
- package/esm/core/DatePicker/DatePicker.js +2 -2
- package/esm/core/ExpandableBlock/ExpandableBlock.js +1 -1
- package/esm/core/Footer/Footer.js +2 -2
- package/esm/core/Header/HeaderBreadcrumbs.js +1 -1
- package/esm/core/Header/HeaderButton.js +1 -0
- package/esm/core/InformationPanel/InformationPanel.js +2 -2
- package/esm/core/Input/Input.js +1 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
- package/esm/core/Radio/Radio.js +1 -1
- package/esm/core/Select/Select.js +3 -3
- package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +33 -0
- package/esm/core/SkipToContentLink/SkipToContentLink.js +44 -0
- package/esm/core/SkipToContentLink/index.d.ts +4 -0
- package/esm/core/SkipToContentLink/index.js +6 -0
- package/esm/core/Slider/Slider.js +1 -1
- package/esm/core/Slider/Thumb.js +1 -1
- package/esm/core/Slider/Track.js +1 -1
- package/esm/core/Surface/Surface.d.ts +32 -0
- package/esm/core/Surface/Surface.js +64 -0
- package/esm/core/Surface/index.d.ts +4 -0
- package/esm/core/Surface/index.js +6 -0
- package/esm/core/Table/Table.d.ts +6 -0
- package/esm/core/Table/Table.js +34 -12
- package/esm/core/Table/TablePaginator.js +6 -6
- package/esm/core/Table/TableRowMemoized.js +1 -1
- package/esm/core/Table/cells/EditableCell.js +2 -1
- package/esm/core/Table/columns/actionColumn.js +2 -2
- package/esm/core/Table/hooks/useSelectionCell.d.ts +1 -1
- package/esm/core/Table/hooks/useSelectionCell.js +3 -2
- package/esm/core/Table/utils.js +5 -5
- package/esm/core/Tabs/Tabs.d.ts +1 -1
- package/esm/core/Tabs/Tabs.js +7 -8
- package/esm/core/Tag/Tag.js +6 -3
- package/esm/core/Tag/TagContainer.js +1 -1
- package/esm/core/Tile/Tile.d.ts +6 -2
- package/esm/core/Tile/Tile.js +8 -3
- package/esm/core/Toast/Toast.js +2 -2
- package/esm/core/Toast/ToastWrapper.js +1 -1
- package/esm/core/Tree/TreeNode.js +2 -2
- package/esm/core/Typography/Text/Text.js +1 -1
- package/esm/core/UserIcon/UserIcon.js +2 -2
- package/esm/core/UserIconGroup/UserIconGroup.js +3 -3
- package/esm/core/Wizard/Step.js +1 -1
- package/esm/core/Wizard/Wizard.js +1 -1
- package/esm/core/index.d.ts +4 -0
- package/esm/core/index.js +2 -0
- package/esm/core/utils/color/ColorValue.js +11 -11
- package/esm/core/utils/components/FocusTrap.js +6 -8
- package/esm/core/utils/components/InputContainer.js +1 -1
- package/esm/core/utils/components/MiddleTextTruncation.js +1 -1
- package/esm/core/utils/components/VirtualScroll.js +1 -1
- package/esm/core/utils/components/WithCSSTransition.js +5 -5
- package/esm/core/utils/functions/focusable.js +1 -1
- package/esm/core/utils/hooks/useOverflow.js +3 -3
- package/esm/core/utils/hooks/useTheme.js +1 -1
- package/package.json +22 -21
package/esm/core/Table/utils.js
CHANGED
|
@@ -2,21 +2,21 @@ export var getCellStyle = function (column, isTableResizing) {
|
|
|
2
2
|
var style = {};
|
|
3
3
|
style.flex = "1 1 145px";
|
|
4
4
|
if (column.width) {
|
|
5
|
-
var width = typeof column.width === 'string' ? column.width : column.width
|
|
5
|
+
var width = typeof column.width === 'string' ? column.width : "".concat(column.width, "px");
|
|
6
6
|
style.width = width;
|
|
7
7
|
// This allows flexbox to handle the width of the column on table resize
|
|
8
8
|
if (isTableResizing && column.canResize) {
|
|
9
|
-
style.flex = Number(column.width)
|
|
9
|
+
style.flex = "".concat(Number(column.width), " ").concat(Number(column.width), " ").concat(width);
|
|
10
10
|
}
|
|
11
11
|
else {
|
|
12
|
-
style.flex = "0 0 "
|
|
12
|
+
style.flex = "0 0 ".concat(width);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
if (column.maxWidth) {
|
|
16
|
-
style.maxWidth = column.maxWidth
|
|
16
|
+
style.maxWidth = "".concat(column.maxWidth, "px");
|
|
17
17
|
}
|
|
18
18
|
if (column.minWidth) {
|
|
19
|
-
style.minWidth = column.minWidth
|
|
19
|
+
style.minWidth = "".concat(column.minWidth, "px");
|
|
20
20
|
}
|
|
21
21
|
return style;
|
|
22
22
|
};
|
package/esm/core/Tabs/Tabs.d.ts
CHANGED
package/esm/core/Tabs/Tabs.js
CHANGED
|
@@ -77,20 +77,19 @@ export var Tabs = function (props) {
|
|
|
77
77
|
var activeTab = tablistRef.current.children[currentActiveIndex];
|
|
78
78
|
var activeTabRect = activeTab.getBoundingClientRect();
|
|
79
79
|
setStripeProperties(__assign(__assign({}, (orientation === 'horizontal' && {
|
|
80
|
-
'--stripe-width': activeTabRect.width
|
|
81
|
-
'--stripe-left': activeTab.offsetLeft
|
|
80
|
+
'--stripe-width': "".concat(activeTabRect.width, "px"),
|
|
81
|
+
'--stripe-left': "".concat(activeTab.offsetLeft, "px"),
|
|
82
82
|
})), (orientation === 'vertical' && {
|
|
83
|
-
'--stripe-height': activeTabRect.height
|
|
84
|
-
'--stripe-top': activeTab.offsetTop
|
|
83
|
+
'--stripe-height': "".concat(activeTabRect.height, "px"),
|
|
84
|
+
'--stripe-top': "".concat(activeTab.offsetTop, "px"),
|
|
85
85
|
})));
|
|
86
86
|
}
|
|
87
87
|
}, [currentActiveIndex, type, orientation, tabsWidth]);
|
|
88
88
|
var _l = React.useState(), focusedIndex = _l[0], setFocusedIndex = _l[1];
|
|
89
89
|
React.useEffect(function () {
|
|
90
|
-
var _a;
|
|
91
90
|
if (tablistRef.current && focusedIndex !== undefined) {
|
|
92
91
|
var tab = tablistRef.current.querySelectorAll('.iui-tab')[focusedIndex];
|
|
93
|
-
|
|
92
|
+
tab === null || tab === void 0 ? void 0 : tab.focus();
|
|
94
93
|
}
|
|
95
94
|
}, [focusedIndex]);
|
|
96
95
|
var _m = React.useState(false), hasSublabel = _m[0], setHasSublabel = _m[1]; // used for setting size
|
|
@@ -167,8 +166,8 @@ export var Tabs = function (props) {
|
|
|
167
166
|
}
|
|
168
167
|
};
|
|
169
168
|
var isIE = !((_c = (_b = (_a = getWindow()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, '--stripe-width', '100px'));
|
|
170
|
-
return (React.createElement("div", { className: cx('iui-tabs-wrapper', "iui-"
|
|
171
|
-
React.createElement("ul", __assign({ className: cx('iui-tabs', "iui-"
|
|
169
|
+
return (React.createElement("div", { className: cx('iui-tabs-wrapper', "iui-".concat(orientation), wrapperClassName), style: stripeProperties },
|
|
170
|
+
React.createElement("ul", __assign({ className: cx('iui-tabs', "iui-".concat(type), {
|
|
172
171
|
'iui-green': color === 'green',
|
|
173
172
|
'iui-animated': type !== 'default' && !isIE,
|
|
174
173
|
'iui-not-animated': isIE,
|
package/esm/core/Tag/Tag.js
CHANGED
|
@@ -39,9 +39,12 @@ import { IconButton } from '../Buttons';
|
|
|
39
39
|
export var Tag = function (props) {
|
|
40
40
|
var className = props.className, _a = props.variant, variant = _a === void 0 ? 'default' : _a, children = props.children, onRemove = props.onRemove, rest = __rest(props, ["className", "variant", "children", "onRemove"]);
|
|
41
41
|
useTheme();
|
|
42
|
-
return (React.createElement("span", __assign({ className: cx(
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
return (React.createElement("span", __assign({ className: cx({
|
|
43
|
+
'iui-tag-basic': variant === 'basic',
|
|
44
|
+
'iui-tag': variant === 'default',
|
|
45
|
+
}, className) }, rest),
|
|
46
|
+
variant === 'default' ? (React.createElement("span", { className: 'iui-tag-label' }, children)) : (children),
|
|
47
|
+
onRemove && (React.createElement(IconButton, { styleType: 'borderless', size: 'small', onClick: onRemove, "aria-label": 'Delete tag', className: 'iui-tag-button' },
|
|
45
48
|
React.createElement(SvgCloseSmall, { "aria-hidden": true })))));
|
|
46
49
|
};
|
|
47
50
|
export default Tag;
|
|
@@ -39,7 +39,7 @@ export var TagContainer = function (props) {
|
|
|
39
39
|
var className = props.className, children = props.children, overflow = props.overflow, _b = props.background, background = _b === void 0 ? 'none' : _b, rest = __rest(props, ["className", "children", "overflow", "background"]);
|
|
40
40
|
useTheme();
|
|
41
41
|
return (React.createElement("div", __assign({ className: cx('iui-tag-container', (_a = {},
|
|
42
|
-
_a["iui-"
|
|
42
|
+
_a["iui-".concat(overflow)] = !!overflow,
|
|
43
43
|
_a['iui-visible'] = background !== 'none',
|
|
44
44
|
_a), className) }, rest), children));
|
|
45
45
|
};
|
package/esm/core/Tile/Tile.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CommonProps } from '../utils';
|
|
3
2
|
import '@itwin/itwinui-css/css/tile.css';
|
|
4
3
|
export declare type TileProps = {
|
|
5
4
|
/**
|
|
@@ -80,7 +79,12 @@ export declare type TileProps = {
|
|
|
80
79
|
* Any custom nodes that will be appended to the tile's main content.
|
|
81
80
|
*/
|
|
82
81
|
children?: React.ReactNode;
|
|
83
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Whether the tile is expected to be interactable (i.e. `onClick`).
|
|
84
|
+
* It becomes focusable and gets on hover styling.
|
|
85
|
+
*/
|
|
86
|
+
isActionable?: boolean;
|
|
87
|
+
} & React.ComponentPropsWithoutRef<'div'>;
|
|
84
88
|
/**
|
|
85
89
|
* Tile component that displays content and actions in a card-like format.
|
|
86
90
|
* @example
|
package/esm/core/Tile/Tile.js
CHANGED
|
@@ -51,14 +51,19 @@ import { IconButton } from '../Buttons';
|
|
|
51
51
|
* />
|
|
52
52
|
*/
|
|
53
53
|
export var Tile = function (props) {
|
|
54
|
-
var className = props.className, name = props.name, description = props.description, metadata = props.metadata, thumbnail = props.thumbnail, buttons = props.buttons, leftIcon = props.leftIcon, rightIcon = props.rightIcon, badge = props.badge, isNew = props.isNew, isSelected = props.isSelected, moreOptions = props.moreOptions, _a = props.variant, variant = _a === void 0 ? 'default' : _a, children = props.children, rest = __rest(props, ["className", "name", "description", "metadata", "thumbnail", "buttons", "leftIcon", "rightIcon", "badge", "isNew", "isSelected", "moreOptions", "variant", "children"]);
|
|
54
|
+
var className = props.className, name = props.name, description = props.description, metadata = props.metadata, thumbnail = props.thumbnail, buttons = props.buttons, leftIcon = props.leftIcon, rightIcon = props.rightIcon, badge = props.badge, isNew = props.isNew, isSelected = props.isSelected, moreOptions = props.moreOptions, _a = props.variant, variant = _a === void 0 ? 'default' : _a, children = props.children, isActionable = props.isActionable, rest = __rest(props, ["className", "name", "description", "metadata", "thumbnail", "buttons", "leftIcon", "rightIcon", "badge", "isNew", "isSelected", "moreOptions", "variant", "children", "isActionable"]);
|
|
55
55
|
useTheme();
|
|
56
56
|
var _b = React.useState(false), isMenuVisible = _b[0], setIsMenuVisible = _b[1];
|
|
57
57
|
var showMenu = React.useCallback(function () { return setIsMenuVisible(true); }, []);
|
|
58
58
|
var hideMenu = React.useCallback(function () { return setIsMenuVisible(false); }, []);
|
|
59
|
-
return (React.createElement("div", __assign({ className: cx('iui-tile', {
|
|
59
|
+
return (React.createElement("div", __assign({ className: cx('iui-tile', {
|
|
60
|
+
'iui-folder': variant === 'folder',
|
|
61
|
+
'iui-new': isNew,
|
|
62
|
+
'iui-selected': isSelected,
|
|
63
|
+
'iui-actionable': isActionable,
|
|
64
|
+
}, className), tabIndex: isActionable ? 0 : undefined }, rest),
|
|
60
65
|
thumbnail && (React.createElement("div", { className: 'iui-tile-thumbnail' },
|
|
61
|
-
typeof thumbnail === 'string' ? (React.createElement("div", { className: 'iui-tile-thumbnail-picture', style: { backgroundImage: "url("
|
|
66
|
+
typeof thumbnail === 'string' ? (React.createElement("div", { className: 'iui-tile-thumbnail-picture', style: { backgroundImage: "url(".concat(thumbnail, ")") } })) : thumbnail && thumbnail.type === 'img' ? (React.cloneElement(thumbnail, {
|
|
62
67
|
className: 'iui-tile-thumbnail-picture',
|
|
63
68
|
})) : React.isValidElement(thumbnail) ? (React.cloneElement(thumbnail, {
|
|
64
69
|
className: cx('iui-thumbnail-icon', thumbnail.props.className),
|
package/esm/core/Toast/Toast.js
CHANGED
|
@@ -117,7 +117,7 @@ export var Toast = function (props) {
|
|
|
117
117
|
}, onExiting: function (node) {
|
|
118
118
|
var _a = calculateOutAnimation(node), translateX = _a.translateX, translateY = _a.translateY;
|
|
119
119
|
node.style.transform = animateOutTo
|
|
120
|
-
? "scale(0.9) translate("
|
|
120
|
+
? "scale(0.9) translate(".concat(translateX, "px,").concat(translateY, "px)")
|
|
121
121
|
: "scale(0.9)";
|
|
122
122
|
node.style.opacity = '0';
|
|
123
123
|
node.style.transitionDuration = animateOutTo ? '400ms' : '120ms';
|
|
@@ -133,7 +133,7 @@ export var Toast = function (props) {
|
|
|
133
133
|
export var ToastPresentation = function (props) {
|
|
134
134
|
var content = props.content, category = props.category, _a = props.type, type = _a === void 0 ? 'temporary' : _a, link = props.link, hasCloseButton = props.hasCloseButton, onClose = props.onClose, className = props.className, rest = __rest(props, ["content", "category", "type", "link", "hasCloseButton", "onClose", "className"]);
|
|
135
135
|
var StatusIcon = StatusIconMap[category];
|
|
136
|
-
return (React.createElement("div", __assign({ className: cx("iui-toast iui-"
|
|
136
|
+
return (React.createElement("div", __assign({ className: cx("iui-toast iui-".concat(category), className) }, rest),
|
|
137
137
|
React.createElement("div", { className: 'iui-status-area' }, React.createElement(StatusIcon, { className: 'iui-icon' })),
|
|
138
138
|
React.createElement("div", { className: 'iui-message' }, content),
|
|
139
139
|
link && (React.createElement("a", { className: 'iui-toast-anchor', onClick: link.onClick }, link.title)),
|
|
@@ -20,7 +20,7 @@ import Toast from './Toast';
|
|
|
20
20
|
export var ToastWrapper = function (props) {
|
|
21
21
|
var toasts = props.toasts, _a = props.placement, placement = _a === void 0 ? 'top' : _a;
|
|
22
22
|
var placementPosition = placement.startsWith('top') ? 'top' : 'bottom';
|
|
23
|
-
return (React.createElement("span", { className: cx("iui-toast-wrapper", "iui-placement-"
|
|
23
|
+
return (React.createElement("span", { className: cx("iui-toast-wrapper", "iui-placement-".concat(placement)) }, toasts.map(function (toastProps) {
|
|
24
24
|
return (React.createElement(Toast, __assign({ key: toastProps.id, placementPosition: placementPosition }, toastProps)));
|
|
25
25
|
})));
|
|
26
26
|
};
|
|
@@ -57,7 +57,7 @@ export var TreeNode = function (props) {
|
|
|
57
57
|
var nodeRef = React.useRef(null);
|
|
58
58
|
var styleDepth = React.useMemo(function () {
|
|
59
59
|
var _a, _b, _c;
|
|
60
|
-
return ((_c = (_b = (_a = getWindow()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--level: "
|
|
60
|
+
return ((_c = (_b = (_a = getWindow()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--level: ".concat(nodeDepth)))
|
|
61
61
|
? { '--level': nodeDepth }
|
|
62
62
|
: { marginLeft: nodeDepth ? nodeDepth * 28 : 0 };
|
|
63
63
|
}, [nodeDepth]);
|
|
@@ -73,7 +73,7 @@ export var TreeNode = function (props) {
|
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
if (parentNodeId) {
|
|
76
|
-
var parentNode = (_b = nodeRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.querySelector("#"
|
|
76
|
+
var parentNode = (_b = nodeRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.querySelector("#".concat(parentNodeId));
|
|
77
77
|
parentNode === null || parentNode === void 0 ? void 0 : parentNode.focus();
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
@@ -43,7 +43,7 @@ export var Text = React.forwardRef(function (props, ref) {
|
|
|
43
43
|
var _b = props.variant, variant = _b === void 0 ? 'body' : _b, _c = props.as, Element = _c === void 0 ? 'div' : _c, className = props.className, _d = props.isMuted, isMuted = _d === void 0 ? false : _d, _e = props.isSkeleton, isSkeleton = _e === void 0 ? false : _e, rest = __rest(props, ["variant", "as", "className", "isMuted", "isSkeleton"]);
|
|
44
44
|
useTheme();
|
|
45
45
|
return (React.createElement(Element, __assign({ className: cx((_a = {},
|
|
46
|
-
_a["iui-text-"
|
|
46
|
+
_a["iui-text-".concat(variant)] = variant !== 'body',
|
|
47
47
|
_a['iui-text-block'] = variant === 'body',
|
|
48
48
|
_a['iui-text-muted'] = isMuted,
|
|
49
49
|
_a['iui-skeleton'] = isSkeleton,
|
|
@@ -54,10 +54,10 @@ export var UserIcon = function (props) {
|
|
|
54
54
|
var _c = props.size, size = _c === void 0 ? 'small' : _c, status = props.status, abbreviation = props.abbreviation, image = props.image, _d = props.backgroundColor, backgroundColor = _d === void 0 ? 'white' : _d, title = props.title, translatedStatusTitles = props.translatedStatusTitles, className = props.className, style = props.style, rest = __rest(props, ["size", "status", "abbreviation", "image", "backgroundColor", "title", "translatedStatusTitles", "className", "style"]);
|
|
55
55
|
useTheme();
|
|
56
56
|
var statusTitles = __assign(__assign({}, defaultStatusTitles), translatedStatusTitles);
|
|
57
|
-
return (React.createElement("span", __assign({ className: cx('iui-user-icon', (_a = {}, _a["iui-"
|
|
57
|
+
return (React.createElement("span", __assign({ className: cx('iui-user-icon', (_a = {}, _a["iui-".concat(size)] = size !== 'medium', _a), className), title: title, style: style }, rest), image !== null && image !== void 0 ? image : (React.createElement("abbr", { className: 'iui-initials', style: { backgroundColor: backgroundColor } }, abbreviation === null || abbreviation === void 0 ? void 0 : abbreviation.substring(0, 2))),
|
|
58
58
|
React.createElement("span", { className: 'iui-stroke' }),
|
|
59
59
|
status && (React.createElement("span", { title: statusTitles[status], className: cx('iui-status', (_b = {},
|
|
60
|
-
_b["iui-"
|
|
60
|
+
_b["iui-".concat(status)] = !!status,
|
|
61
61
|
_b)), "aria-label": statusTitles[status] }))));
|
|
62
62
|
};
|
|
63
63
|
export default UserIcon;
|
|
@@ -78,10 +78,10 @@ export var UserIconGroup = function (props) {
|
|
|
78
78
|
childrenArray.length <= maxIcons + 1 && getUserIconList(maxIcons + 1),
|
|
79
79
|
childrenArray.length > maxIcons + 1 && (React.createElement(React.Fragment, null,
|
|
80
80
|
getUserIconList(maxIcons),
|
|
81
|
-
React.createElement("div", __assign({}, countIconProps, { className: cx('iui-user-icon', (_a = {}, _a["iui-"
|
|
81
|
+
React.createElement("div", __assign({}, countIconProps, { className: cx('iui-user-icon', (_a = {}, _a["iui-".concat(iconSize)] = iconSize !== 'medium', _a), 'iui-user-icon-count', countIconProps === null || countIconProps === void 0 ? void 0 : countIconProps.className) }),
|
|
82
82
|
React.createElement("abbr", { className: 'iui-initials' }, childrenLength <= maxLength
|
|
83
|
-
? ""
|
|
84
|
-
: maxLength
|
|
83
|
+
? "".concat(childrenLength - maxIcons)
|
|
84
|
+
: "".concat(maxLength, "+")),
|
|
85
85
|
React.createElement("span", { className: 'iui-stroke' })))))));
|
|
86
86
|
};
|
|
87
87
|
export default UserIconGroup;
|
package/esm/core/Wizard/Step.js
CHANGED
|
@@ -48,7 +48,7 @@ export var Step = function (props) {
|
|
|
48
48
|
var stepShape = (React.createElement("li", __assign({ className: cx('iui-wizard-step', {
|
|
49
49
|
'iui-current': isActive,
|
|
50
50
|
'iui-clickable': isClickable,
|
|
51
|
-
}, className), style: __assign({ width: type === 'default' ? 100 / totalSteps
|
|
51
|
+
}, className), style: __assign({ width: type === 'default' ? "".concat(100 / totalSteps, "%") : undefined }, style), onClick: onCompletedClick, onKeyDown: onKeyDown, "aria-current": isActive ? 'step' : undefined, tabIndex: isClickable ? 0 : undefined }, rest),
|
|
52
52
|
React.createElement("div", { className: 'iui-wizard-track-content' },
|
|
53
53
|
React.createElement("span", { className: 'iui-wizard-circle' }, type === 'workflow' ? title : index + 1)),
|
|
54
54
|
type === 'default' && (React.createElement("span", { className: 'iui-wizard-step-name' }, title))));
|
|
@@ -31,7 +31,7 @@ import '@itwin/itwinui-css/css/wizard.css';
|
|
|
31
31
|
import { Step } from './Step';
|
|
32
32
|
var defaultWizardLocalization = {
|
|
33
33
|
stepsCountLabel: function (currentStep, totalSteps) {
|
|
34
|
-
return "Step "
|
|
34
|
+
return "Step ".concat(currentStep, " of ").concat(totalSteps, ":");
|
|
35
35
|
},
|
|
36
36
|
};
|
|
37
37
|
/**
|
package/esm/core/index.d.ts
CHANGED
|
@@ -62,10 +62,14 @@ export { Select } from './Select';
|
|
|
62
62
|
export type { SelectProps, SelectOption, ItemRendererProps } from './Select';
|
|
63
63
|
export { SideNavigation, SidenavButton, SidenavSubmenu, SidenavSubmenuHeader, } from './SideNavigation';
|
|
64
64
|
export type { SideNavigationProps, SidenavButtonProps, SidenavSubmenuProps, SidenavSubmenuHeaderProps, } from './SideNavigation';
|
|
65
|
+
export { SkipToContentLink } from './SkipToContentLink';
|
|
66
|
+
export type { SkipToContentLinkProps } from './SkipToContentLink';
|
|
65
67
|
export { Slider } from './Slider';
|
|
66
68
|
export type { SliderProps } from './Slider';
|
|
67
69
|
export { StatusMessage } from './StatusMessage';
|
|
68
70
|
export type { StatusMessageProps } from './StatusMessage';
|
|
71
|
+
export { Surface } from './Surface';
|
|
72
|
+
export type { SurfaceProps } from './Surface';
|
|
69
73
|
export { Table, tableFilters, FilterButtonBar, DefaultCell, EditableCell, TablePaginator, ActionColumn, ExpanderColumn, SelectionColumn, } from './Table';
|
|
70
74
|
export type { TableProps, TableFilterProps, TableFilterValue, DateRangeFilterOptions, FilterButtonBarProps, DefaultCellProps, EditableCellProps, TablePaginatorProps, TablePaginatorRendererProps, } from './Table';
|
|
71
75
|
export { Tag, TagContainer } from './Tag';
|
package/esm/core/index.js
CHANGED
|
@@ -34,8 +34,10 @@ export { Radio } from './Radio';
|
|
|
34
34
|
export { RadioTile, RadioTileGroup } from './RadioTiles';
|
|
35
35
|
export { Select } from './Select';
|
|
36
36
|
export { SideNavigation, SidenavButton, SidenavSubmenu, SidenavSubmenuHeader, } from './SideNavigation';
|
|
37
|
+
export { SkipToContentLink } from './SkipToContentLink';
|
|
37
38
|
export { Slider } from './Slider';
|
|
38
39
|
export { StatusMessage } from './StatusMessage';
|
|
40
|
+
export { Surface } from './Surface';
|
|
39
41
|
export { Table, tableFilters, FilterButtonBar, DefaultCell, EditableCell, TablePaginator, ActionColumn, ExpanderColumn, SelectionColumn, } from './Table';
|
|
40
42
|
export { Tag, TagContainer } from './Tag';
|
|
41
43
|
export { Textarea } from './Textarea';
|
|
@@ -328,9 +328,9 @@ var ColorValue = /** @class */ (function () {
|
|
|
328
328
|
if (value < 0) {
|
|
329
329
|
value = 0xffffffff + value + 1;
|
|
330
330
|
}
|
|
331
|
-
return "#"
|
|
331
|
+
return "#".concat("00000000".concat(value.toString(16)).slice(-8));
|
|
332
332
|
}
|
|
333
|
-
return "#"
|
|
333
|
+
return "#".concat("000000".concat(this.getRgb().toString(16)).slice(-6));
|
|
334
334
|
};
|
|
335
335
|
/**
|
|
336
336
|
* Compute the 0xTTBBGGRR color corresponding to the specified hue, saturation, lightness values.
|
|
@@ -490,34 +490,34 @@ var ColorValue = /** @class */ (function () {
|
|
|
490
490
|
ColorValue.prototype.toRgbString = function (includeAlpha) {
|
|
491
491
|
var _a;
|
|
492
492
|
var rgb = this.toRgbColor();
|
|
493
|
-
var rgbString = rgb.r
|
|
493
|
+
var rgbString = "".concat(rgb.r, ", ").concat(rgb.g, ", ").concat(rgb.b);
|
|
494
494
|
if (includeAlpha) {
|
|
495
495
|
var alpha = (_a = rgb.a) !== null && _a !== void 0 ? _a : 1;
|
|
496
|
-
return "rgba("
|
|
496
|
+
return "rgba(".concat(rgbString, ", ").concat(ColorValue.getFormattedColorNumber(alpha, 2), ")");
|
|
497
497
|
}
|
|
498
|
-
return "rgb("
|
|
498
|
+
return "rgb(".concat(rgbString, ")");
|
|
499
499
|
};
|
|
500
500
|
/** Convert this ColorValue to a string in the form "hsl(h,s,l) or hsla(h,s,l,a)" - i.e hsl(120,50%,50%). */
|
|
501
501
|
ColorValue.prototype.toHslString = function (includeAlpha) {
|
|
502
502
|
var _a, _b;
|
|
503
503
|
var hsl = this.toHslColor();
|
|
504
|
-
var hslString = ColorValue.getFormattedColorNumber((_a = this._hue) !== null && _a !== void 0 ? _a : hsl.h)
|
|
504
|
+
var hslString = "".concat(ColorValue.getFormattedColorNumber((_a = this._hue) !== null && _a !== void 0 ? _a : hsl.h), ", ").concat(ColorValue.getFormattedColorNumber(hsl.s), "%, ").concat(ColorValue.getFormattedColorNumber(hsl.l), "%");
|
|
505
505
|
if (includeAlpha) {
|
|
506
506
|
var alpha = (_b = hsl.a) !== null && _b !== void 0 ? _b : 1;
|
|
507
|
-
return "hsla("
|
|
507
|
+
return "hsla(".concat(hslString, ", ").concat(ColorValue.getFormattedColorNumber(alpha, 2), ")");
|
|
508
508
|
}
|
|
509
|
-
return "hsl("
|
|
509
|
+
return "hsl(".concat(hslString, ")");
|
|
510
510
|
};
|
|
511
511
|
/** Convert this ColorValue to a string in the form "hsv(h,s,v) or hsva(h,s,v,a)" - i.e hsv(120,50%,50%). */
|
|
512
512
|
ColorValue.prototype.toHsvString = function (includeAlpha) {
|
|
513
513
|
var _a, _b;
|
|
514
514
|
var hsv = this.toHsvColor();
|
|
515
|
-
var hsvString = ((_a = this._hue) !== null && _a !== void 0 ? _a : hsv.h
|
|
515
|
+
var hsvString = "".concat((_a = this._hue) !== null && _a !== void 0 ? _a : hsv.h, ", ").concat(hsv.s, "%, ").concat(hsv.v, "%");
|
|
516
516
|
if (includeAlpha) {
|
|
517
517
|
var alpha = (_b = hsv.a) !== null && _b !== void 0 ? _b : 1;
|
|
518
|
-
return "hsva("
|
|
518
|
+
return "hsva(".concat(hsvString, ", ").concat(ColorValue.getFormattedColorNumber(alpha, 2), ")");
|
|
519
519
|
}
|
|
520
|
-
return "hsv("
|
|
520
|
+
return "hsv(".concat(hsvString, ")");
|
|
521
521
|
};
|
|
522
522
|
return ColorValue;
|
|
523
523
|
}());
|
|
@@ -19,23 +19,21 @@ export var FocusTrap = function (props) {
|
|
|
19
19
|
return [firstElement, lastElement];
|
|
20
20
|
};
|
|
21
21
|
var onFirstFocus = function (event) {
|
|
22
|
-
var _a,
|
|
23
|
-
var _c = getFirstLastFocusables(), firstElement = _c[0], lastElement = _c[1];
|
|
22
|
+
var _a = getFirstLastFocusables(), firstElement = _a[0], lastElement = _a[1];
|
|
24
23
|
if (event.relatedTarget === firstElement) {
|
|
25
|
-
|
|
24
|
+
lastElement === null || lastElement === void 0 ? void 0 : lastElement.focus();
|
|
26
25
|
}
|
|
27
26
|
else {
|
|
28
|
-
|
|
27
|
+
firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
|
29
28
|
}
|
|
30
29
|
};
|
|
31
30
|
var onLastFocus = function (event) {
|
|
32
|
-
var _a,
|
|
33
|
-
var _c = getFirstLastFocusables(), firstElement = _c[0], lastElement = _c[1];
|
|
31
|
+
var _a = getFirstLastFocusables(), firstElement = _a[0], lastElement = _a[1];
|
|
34
32
|
if (event.relatedTarget === lastElement) {
|
|
35
|
-
|
|
33
|
+
firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
|
36
34
|
}
|
|
37
35
|
else {
|
|
38
|
-
|
|
36
|
+
lastElement === null || lastElement === void 0 ? void 0 : lastElement.focus();
|
|
39
37
|
}
|
|
40
38
|
};
|
|
41
39
|
return (React.createElement("div", null,
|
|
@@ -37,7 +37,7 @@ export var InputContainer = function (props) {
|
|
|
37
37
|
return (React.createElement(Element, __assign({ className: cx('iui-input-container', (_a = {
|
|
38
38
|
'iui-disabled': disabled
|
|
39
39
|
},
|
|
40
|
-
_a["iui-"
|
|
40
|
+
_a["iui-".concat(status)] = !!status,
|
|
41
41
|
_a['iui-inline-label'] = isLabelInline,
|
|
42
42
|
_a['iui-inline-icon'] = isIconInline,
|
|
43
43
|
_a['iui-with-message'] = (!!message || !!icon || !!statusMessage) && !isLabelInline,
|
|
@@ -38,7 +38,7 @@ export var MiddleTextTruncation = function (props) {
|
|
|
38
38
|
var _b = useOverflow(text), ref = _b[0], visibleCount = _b[1];
|
|
39
39
|
var truncatedText = React.useMemo(function () {
|
|
40
40
|
if (visibleCount < text.length) {
|
|
41
|
-
return ""
|
|
41
|
+
return "".concat(text.substr(0, visibleCount - endCharsCount - ELLIPSIS_CHAR.length)).concat(ELLIPSIS_CHAR).concat(text.substr(text.length - endCharsCount));
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
44
|
return text;
|
|
@@ -131,7 +131,7 @@ export var VirtualScroll = React.forwardRef(function (_a, ref) {
|
|
|
131
131
|
if (!parentRef.current) {
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
-
parentRef.current.style.transform = "translateY("
|
|
134
|
+
parentRef.current.style.transform = "translateY(".concat(getTranslateValue(childHeight.current, startIndex), "px)");
|
|
135
135
|
}, [bufferSize, itemsLength]);
|
|
136
136
|
var removeScrollListener = React.useCallback(function () {
|
|
137
137
|
var _a, _b;
|
|
@@ -31,17 +31,17 @@ export var WithCSSTransition = function (props) {
|
|
|
31
31
|
var expandedSize = React.useRef(0);
|
|
32
32
|
var dimensionCamelCase = dimension === 'height' ? 'Height' : 'Width';
|
|
33
33
|
return (React.createElement(CSSTransition, __assign({ in: visible, timeout: 200, unmountOnExit: true, onEnter: function (node) {
|
|
34
|
-
node.style["min"
|
|
34
|
+
node.style["min".concat(dimensionCamelCase)] = 'initial';
|
|
35
35
|
node.style[dimension] = '0px';
|
|
36
36
|
}, onEntering: function (node) {
|
|
37
|
-
node.style[dimension] = expandedSize.current
|
|
37
|
+
node.style[dimension] = "".concat(expandedSize.current, "px");
|
|
38
38
|
}, onEntered: function (node) {
|
|
39
|
-
node.style["min"
|
|
39
|
+
node.style["min".concat(dimensionCamelCase)] = '';
|
|
40
40
|
node.style[dimension] = '';
|
|
41
41
|
}, onExit: function (node) {
|
|
42
|
-
node.style[dimension] = expandedSize.current
|
|
42
|
+
node.style[dimension] = "".concat(expandedSize.current, "px");
|
|
43
43
|
}, onExiting: function (node) {
|
|
44
|
-
node.style["min"
|
|
44
|
+
node.style["min".concat(dimensionCamelCase)] = 'initial';
|
|
45
45
|
node.style[dimension] = '0px';
|
|
46
46
|
}, classNames: 'iui' }, rest), React.cloneElement(children, {
|
|
47
47
|
ref: function (el) {
|
|
@@ -24,7 +24,7 @@ export var getFocusableElements = function (container) {
|
|
|
24
24
|
if (!container) {
|
|
25
25
|
return [];
|
|
26
26
|
}
|
|
27
|
-
var elements = container.querySelectorAll(tabbableElementsSelector
|
|
27
|
+
var elements = container.querySelectorAll("".concat(tabbableElementsSelector, ", [tabindex=\"-1\"]"));
|
|
28
28
|
return Array.from(elements).filter(function (el) {
|
|
29
29
|
return !el.hasAttribute('disabled') &&
|
|
30
30
|
!el.classList.contains('iui-disabled') &&
|
|
@@ -61,15 +61,15 @@ export var useOverflow = function (items, disabled, orientation) {
|
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
var dimension = orientation === 'horizontal' ? 'Width' : 'Height';
|
|
64
|
-
var availableSize = containerRef.current["offset"
|
|
65
|
-
var requiredSize = containerRef.current["scroll"
|
|
64
|
+
var availableSize = containerRef.current["offset".concat(dimension)];
|
|
65
|
+
var requiredSize = containerRef.current["scroll".concat(dimension)];
|
|
66
66
|
if (availableSize < requiredSize) {
|
|
67
67
|
var avgItemSize = requiredSize / visibleCount;
|
|
68
68
|
var visibleItems = Math.floor(availableSize / avgItemSize);
|
|
69
69
|
setVisibleCount(visibleItems);
|
|
70
70
|
}
|
|
71
71
|
else if (needsFullRerender.current) {
|
|
72
|
-
var childrenSize = Array.from(containerRef.current.children).reduce(function (sum, child) { return sum + child["offset"
|
|
72
|
+
var childrenSize = Array.from(containerRef.current.children).reduce(function (sum, child) { return sum + child["offset".concat(dimension)]; }, 0);
|
|
73
73
|
var avgItemSize = childrenSize / visibleCount;
|
|
74
74
|
var visibleItems = Math.floor(availableSize / avgItemSize);
|
|
75
75
|
// Doubling the visible items to overflow the container. Just to be safe.
|
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/itwinui-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.2",
|
|
4
4
|
"author": "Bentley Systems",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "cjs/index.js",
|
|
7
7
|
"module": "esm/index.js",
|
|
8
8
|
"typings": "cjs/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"cjs",
|
|
11
|
+
"esm",
|
|
12
|
+
"CHANGELOG.md",
|
|
13
|
+
"LICENSE.md"
|
|
14
|
+
],
|
|
9
15
|
"description": "A react implementation of our iTwinUI UX standards",
|
|
10
16
|
"homepage": "https://github.com/iTwin/iTwinUI-react",
|
|
11
17
|
"keywords": [
|
|
@@ -23,24 +29,24 @@
|
|
|
23
29
|
"ux"
|
|
24
30
|
],
|
|
25
31
|
"scripts": {
|
|
26
|
-
"build": "yarn clean && yarn
|
|
27
|
-
"build:watch": "yarn clean && yarn
|
|
28
|
-
"clean": "yarn clean:coverage &&
|
|
32
|
+
"build": "yarn clean && yarn copy-files && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json",
|
|
33
|
+
"build:watch": "yarn clean && yarn copy-files && concurrently \"tsc -p tsconfig.cjs.json --watch\" \"tsc -p tsconfig.esm.json --watch\"",
|
|
34
|
+
"clean": "yarn clean:coverage && rimraf esm && rimraf cjs",
|
|
29
35
|
"clean:coverage": "rimraf coverage",
|
|
30
|
-
"clean:lib": "rimraf lib",
|
|
31
36
|
"test": "jest",
|
|
32
37
|
"test:watch": "jest --watch",
|
|
33
38
|
"createComponent": "node scripts/createComponent.js",
|
|
34
|
-
"
|
|
35
|
-
"lint": "eslint
|
|
39
|
+
"format": "prettier --config .prettierrc **/*.{tsx,ts,js} --ignore-path .gitignore --write",
|
|
40
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\" --max-warnings=0",
|
|
36
41
|
"lint:fix": "yarn lint --fix && yarn lint:copyright --fix */**/*.{js,ts,tsx}",
|
|
37
42
|
"lint:copyright": "node scripts/copyrightLinter.js",
|
|
38
|
-
"copy-files": "cpx
|
|
43
|
+
"copy-files": "cpx \"../../{README,LICENSE}.md\" .",
|
|
39
44
|
"storybook": "start-storybook -p 6006",
|
|
40
|
-
"
|
|
45
|
+
"dev": "yarn storybook",
|
|
46
|
+
"build-storybook": "yarn copy-files && build-storybook"
|
|
41
47
|
},
|
|
42
48
|
"dependencies": {
|
|
43
|
-
"@itwin/itwinui-css": "^0.
|
|
49
|
+
"@itwin/itwinui-css": "^0.55.0",
|
|
44
50
|
"@itwin/itwinui-icons-react": "^1.5.0",
|
|
45
51
|
"@itwin/itwinui-illustrations-react": "^1.0.1",
|
|
46
52
|
"@tippyjs/react": "^4.2.5",
|
|
@@ -73,18 +79,13 @@
|
|
|
73
79
|
"@types/react": "^17.0.3",
|
|
74
80
|
"@types/react-dom": "^17.0.3",
|
|
75
81
|
"@types/react-transition-group": "^2.9.2",
|
|
76
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
77
|
-
"@typescript-eslint/parser": "^
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^5.17.0",
|
|
83
|
+
"@typescript-eslint/parser": "^5.17.0",
|
|
78
84
|
"babel-loader": "^8.2.2",
|
|
79
85
|
"concurrently": "^5.3.0",
|
|
86
|
+
"configs": "*",
|
|
80
87
|
"cpx": "^1.5.0",
|
|
81
88
|
"creevey": "^0.8.0-beta.0",
|
|
82
|
-
"eslint": "^7.32.0",
|
|
83
|
-
"eslint-config-prettier": "^8.3.0",
|
|
84
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
85
|
-
"eslint-plugin-react": "^7.25.1",
|
|
86
|
-
"eslint-plugin-react-hooks": "^4.2.0",
|
|
87
|
-
"eslint-plugin-storybook": "^0.5.7",
|
|
88
89
|
"fast-glob": "^3.2.5",
|
|
89
90
|
"husky": "^4.0.0",
|
|
90
91
|
"inquirer": "^6.2.2",
|
|
@@ -94,14 +95,13 @@
|
|
|
94
95
|
"lint-staged": "^12.1.2",
|
|
95
96
|
"markdown-to-jsx": "6.11.4",
|
|
96
97
|
"mkdirp": "^1.0.4",
|
|
97
|
-
"prettier": "2.2.1",
|
|
98
98
|
"react": "^17.0.2",
|
|
99
99
|
"react-dom": "^17.0.2",
|
|
100
100
|
"rimraf": "^2.6.2",
|
|
101
101
|
"storybook-dark-mode": "^1.0.9",
|
|
102
102
|
"tippy.js": "^6.3.1",
|
|
103
103
|
"ts-jest": "^27.0.4",
|
|
104
|
-
"ts-loader": "^
|
|
104
|
+
"ts-loader": "^9.2.8",
|
|
105
105
|
"ts-node": "^8.0.2",
|
|
106
106
|
"typescript": "^4.4.3",
|
|
107
107
|
"webpack": "5"
|
|
@@ -134,10 +134,11 @@
|
|
|
134
134
|
"lint-staged": {
|
|
135
135
|
"*.{tsx,ts,jsx,js}": [
|
|
136
136
|
"prettier --write",
|
|
137
|
-
"eslint --fix",
|
|
137
|
+
"eslint --max-warnings=0 --fix",
|
|
138
138
|
"yarn lint:copyright --fix"
|
|
139
139
|
]
|
|
140
140
|
},
|
|
141
|
+
"prettier": "configs/prettier-config",
|
|
141
142
|
"sideEffects": [
|
|
142
143
|
"**/*.scss",
|
|
143
144
|
"**/*.css"
|