@itwin/itwinui-react 3.1.2 → 3.1.3-dev.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/cjs/core/Alert/Alert.js +28 -3
- package/cjs/core/Avatar/Avatar.js +28 -3
- package/cjs/core/AvatarGroup/AvatarGroup.js +28 -3
- package/cjs/core/Backdrop/Backdrop.js +28 -3
- package/cjs/core/Badge/Badge.js +28 -3
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +28 -3
- package/cjs/core/ButtonGroup/ButtonGroup.js +28 -3
- package/cjs/core/Buttons/Button.js +28 -3
- package/cjs/core/Buttons/DropdownButton.js +28 -3
- package/cjs/core/Buttons/IconButton.js +28 -3
- package/cjs/core/Buttons/IdeasButton.js +24 -2
- package/cjs/core/Buttons/SplitButton.js +28 -3
- package/cjs/core/Carousel/Carousel.js +28 -3
- package/cjs/core/Carousel/CarouselContext.js +24 -2
- package/cjs/core/Carousel/CarouselDot.js +28 -3
- package/cjs/core/Carousel/CarouselDotsList.js +28 -3
- package/cjs/core/Carousel/CarouselNavigation.js +28 -3
- package/cjs/core/Carousel/CarouselSlide.js +28 -3
- package/cjs/core/Carousel/CarouselSlider.js +28 -3
- package/cjs/core/Checkbox/Checkbox.js +28 -3
- package/cjs/core/ColorPicker/ColorBuilder.js +28 -3
- package/cjs/core/ColorPicker/ColorInputPanel.js +28 -3
- package/cjs/core/ColorPicker/ColorPalette.js +28 -3
- package/cjs/core/ColorPicker/ColorPicker.js +28 -3
- package/cjs/core/ColorPicker/ColorPickerContext.js +24 -2
- package/cjs/core/ColorPicker/ColorSwatch.js +28 -3
- package/cjs/core/ComboBox/ComboBox.js +24 -2
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +28 -3
- package/cjs/core/ComboBox/ComboBoxInput.js +24 -2
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +24 -2
- package/cjs/core/ComboBox/ComboBoxMenu.js +24 -2
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +24 -2
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.js +28 -3
- package/cjs/core/ComboBox/helpers.js +24 -2
- package/cjs/core/DatePicker/DatePicker.js +28 -3
- package/cjs/core/Dialog/Dialog.js +28 -3
- package/cjs/core/Dialog/DialogBackdrop.js +28 -3
- package/cjs/core/Dialog/DialogContent.js +28 -3
- package/cjs/core/Dialog/DialogContext.js +24 -2
- package/cjs/core/Dialog/DialogDragContext.js +24 -2
- package/cjs/core/Dialog/DialogMain.js +29 -4
- package/cjs/core/Dialog/DialogTitleBar.js +28 -3
- package/cjs/core/Divider/Divider.js +28 -3
- package/cjs/core/DropdownMenu/DropdownMenu.js +24 -2
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +28 -3
- package/cjs/core/Fieldset/Fieldset.js +28 -3
- package/cjs/core/FileUpload/FileEmptyCard.js +29 -4
- package/cjs/core/FileUpload/FileUpload.js +28 -3
- package/cjs/core/FileUpload/FileUploadCard.js +28 -3
- package/cjs/core/FileUpload/FileUploadTemplate.js +28 -3
- package/cjs/core/Flex/Flex.js +28 -3
- package/cjs/core/Footer/Footer.js +28 -3
- package/cjs/core/Header/Header.js +28 -3
- package/cjs/core/Header/HeaderBasicButton.js +28 -3
- package/cjs/core/Header/HeaderBreadcrumbs.js +28 -3
- package/cjs/core/Header/HeaderButton.js +24 -2
- package/cjs/core/Header/HeaderDropdownButton.js +28 -3
- package/cjs/core/Header/HeaderLogo.js +28 -3
- package/cjs/core/Header/HeaderSplitButton.js +28 -3
- package/cjs/core/Icon/Icon.js +28 -3
- package/cjs/core/InformationPanel/InformationPanel.js +28 -3
- package/cjs/core/InformationPanel/InformationPanelContent.js +28 -3
- package/cjs/core/InformationPanel/InformationPanelHeader.js +28 -3
- package/cjs/core/Input/Input.js +28 -3
- package/cjs/core/InputGrid/InputGrid.js +28 -3
- package/cjs/core/InputGroup/InputGroup.js +28 -3
- package/cjs/core/InputWithDecorations/InputWithDecorations.js +24 -2
- package/cjs/core/Label/Label.js +28 -3
- package/cjs/core/LabeledInput/LabeledInput.js +24 -2
- package/cjs/core/LabeledSelect/LabeledSelect.js +24 -2
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +24 -2
- package/cjs/core/List/ListItem.js +28 -3
- package/cjs/core/Menu/Menu.js +28 -3
- package/cjs/core/Menu/MenuItem.js +24 -2
- package/cjs/core/Menu/MenuItemSkeleton.js +28 -3
- package/cjs/core/Modal/Modal.js +24 -2
- package/cjs/core/NonIdealState/ErrorPage.js +24 -2
- package/cjs/core/NonIdealState/NonIdealState.js +28 -3
- package/cjs/core/NotificationMarker/NotificationMarker.js +28 -3
- package/cjs/core/Overlay/Overlay.js +4 -2
- package/cjs/core/Popover/Popover.js +28 -3
- package/cjs/core/ProgressIndicators/ProgressLinear.js +28 -3
- package/cjs/core/ProgressIndicators/ProgressRadial.js +28 -3
- package/cjs/core/Radio/Radio.js +28 -3
- package/cjs/core/RadioTiles/RadioTile.js +28 -3
- package/cjs/core/RadioTiles/RadioTileGroup.js +24 -2
- package/cjs/core/SearchBox/SearchBox.js +28 -3
- package/cjs/core/Select/Select.js +28 -3
- package/cjs/core/Select/SelectTag.js +28 -3
- package/cjs/core/Select/SelectTagContainer.js +28 -3
- package/cjs/core/SideNavigation/SideNavigation.js +28 -3
- package/cjs/core/SideNavigation/SidenavButton.js +28 -3
- package/cjs/core/SideNavigation/SidenavSubmenu.js +28 -3
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +28 -3
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +28 -3
- package/cjs/core/Slider/Slider.js +28 -3
- package/cjs/core/Slider/Thumb.js +28 -3
- package/cjs/core/Slider/Track.js +28 -3
- package/cjs/core/StatusMessage/StatusMessage.js +28 -3
- package/cjs/core/Stepper/Stepper.js +28 -3
- package/cjs/core/Stepper/StepperStep.js +28 -3
- package/cjs/core/Stepper/WorkflowDiagram.js +28 -3
- package/cjs/core/Stepper/WorkflowDiagramStep.js +28 -3
- package/cjs/core/Surface/Surface.js +28 -3
- package/cjs/core/Table/SubRowExpander.js +24 -2
- package/cjs/core/Table/Table.js +30 -5
- package/cjs/core/Table/TableCell.js +28 -3
- package/cjs/core/Table/TablePaginator.js +28 -3
- package/cjs/core/Table/TableRowMemoized.js +28 -3
- package/cjs/core/Table/cells/DefaultCell.js +28 -3
- package/cjs/core/Table/cells/EditableCell.js +24 -2
- package/cjs/core/Table/columns/actionColumn.js +24 -2
- package/cjs/core/Table/columns/expanderColumn.js +24 -2
- package/cjs/core/Table/columns/selectionColumn.js +24 -2
- package/cjs/core/Table/filters/BaseFilter.js +28 -3
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +24 -2
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +28 -3
- package/cjs/core/Table/filters/FilterButtonBar.js +28 -3
- package/cjs/core/Table/filters/FilterToggle.js +28 -3
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +24 -2
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +24 -2
- package/cjs/core/Table/filters/tableFilters.js +24 -2
- package/cjs/core/Table/hooks/useColumnDragAndDrop.js +4 -2
- package/cjs/core/Table/hooks/useExpanderCell.js +24 -2
- package/cjs/core/Table/hooks/useScrollToRow.js +24 -2
- package/cjs/core/Table/hooks/useSubRowFiltering.js +24 -2
- package/cjs/core/Table/hooks/useSubRowSelection.js +24 -2
- package/cjs/core/Tabs/Tabs.js +28 -3
- package/cjs/core/Tag/Tag.js +28 -3
- package/cjs/core/Tag/TagContainer.js +28 -3
- package/cjs/core/Textarea/Textarea.js +24 -2
- package/cjs/core/ThemeProvider/ThemeContext.js +24 -2
- package/cjs/core/ThemeProvider/ThemeProvider.js +63 -4
- package/cjs/core/Tile/Tile.js +28 -3
- package/cjs/core/TimePicker/TimePicker.js +28 -3
- package/cjs/core/Toast/Toast.js +28 -3
- package/cjs/core/Toast/Toaster.js +28 -3
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +28 -3
- package/cjs/core/Tooltip/Tooltip.js +28 -3
- package/cjs/core/TransferList/TransferList.js +5 -3
- package/cjs/core/Tree/Tree.js +28 -3
- package/cjs/core/Tree/TreeContext.js +24 -2
- package/cjs/core/Tree/TreeNode.js +28 -3
- package/cjs/core/Tree/TreeNodeExpander.js +28 -3
- package/cjs/core/Typography/Blockquote.js +28 -3
- package/cjs/core/Typography/Kbd.js +28 -3
- package/cjs/core/Typography/Text.js +28 -3
- package/cjs/core/VisuallyHidden/VisuallyHidden.js +28 -3
- package/cjs/core/utils/color/index.js +15 -2
- package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.js +24 -2
- package/cjs/core/utils/components/ButtonBase.js +28 -3
- package/cjs/core/utils/components/FocusTrap.js +24 -2
- package/cjs/core/utils/components/InputContainer.js +28 -3
- package/cjs/core/utils/components/InputFlexContainer.js +5 -3
- package/cjs/core/utils/components/MiddleTextTruncation.js +24 -2
- package/cjs/core/utils/components/Portal.js +25 -3
- package/cjs/core/utils/components/Resizer.js +24 -2
- package/cjs/core/utils/components/VirtualScroll.js +25 -3
- package/cjs/core/utils/components/WithCSSTransition.d.ts +2 -2
- package/cjs/core/utils/components/WithCSSTransition.js +28 -3
- package/cjs/core/utils/components/index.js +25 -12
- package/cjs/core/utils/functions/import.d.ts +12 -0
- package/cjs/core/utils/functions/import.js +31 -25
- package/cjs/core/utils/functions/index.js +24 -11
- package/cjs/core/utils/functions/polymorphic.js +29 -4
- package/cjs/core/utils/functions/react.js +24 -2
- package/cjs/core/utils/hooks/index.js +28 -15
- package/cjs/core/utils/hooks/useContainerWidth.js +24 -2
- package/cjs/core/utils/hooks/useControlledState.js +24 -2
- package/cjs/core/utils/hooks/useDragAndDrop.js +24 -2
- package/cjs/core/utils/hooks/useEventListener.js +24 -2
- package/cjs/core/utils/hooks/useGlobals.js +24 -2
- package/cjs/core/utils/hooks/useId.js +24 -2
- package/cjs/core/utils/hooks/useIntersection.js +24 -2
- package/cjs/core/utils/hooks/useIsClient.js +24 -2
- package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.js +24 -2
- package/cjs/core/utils/hooks/useLatestRef.js +24 -2
- package/cjs/core/utils/hooks/useMediaQuery.js +24 -2
- package/cjs/core/utils/hooks/useMergedRefs.js +24 -2
- package/cjs/core/utils/hooks/useOverflow.js +24 -2
- package/cjs/core/utils/hooks/useResizeObserver.js +24 -2
- package/cjs/core/utils/hooks/useSafeContext.js +24 -2
- package/cjs/core/utils/icons/StatusIconMap.js +24 -2
- package/cjs/core/utils/icons/SvgCalendar.js +24 -2
- package/cjs/core/utils/icons/SvgCaretDownSmall.js +24 -2
- package/cjs/core/utils/icons/SvgCaretRightSmall.js +24 -2
- package/cjs/core/utils/icons/SvgCaretUpSmall.js +24 -2
- package/cjs/core/utils/icons/SvgCheckmark.js +24 -2
- package/cjs/core/utils/icons/SvgCheckmarkSmall.js +24 -2
- package/cjs/core/utils/icons/SvgChevronLeft.js +24 -2
- package/cjs/core/utils/icons/SvgChevronLeftDouble.js +24 -2
- package/cjs/core/utils/icons/SvgChevronRight.js +24 -2
- package/cjs/core/utils/icons/SvgChevronRightDouble.js +24 -2
- package/cjs/core/utils/icons/SvgChevronRightSmall.js +24 -2
- package/cjs/core/utils/icons/SvgClose.js +24 -2
- package/cjs/core/utils/icons/SvgCloseSmall.js +24 -2
- package/cjs/core/utils/icons/SvgColumnManager.js +24 -2
- package/cjs/core/utils/icons/SvgDocument.js +24 -2
- package/cjs/core/utils/icons/SvgFilter.js +24 -2
- package/cjs/core/utils/icons/SvgFilterHollow.js +24 -2
- package/cjs/core/utils/icons/SvgImportantSmall.js +24 -2
- package/cjs/core/utils/icons/SvgInfoCircular.js +24 -2
- package/cjs/core/utils/icons/SvgMore.js +24 -2
- package/cjs/core/utils/icons/SvgMoreVertical.js +24 -2
- package/cjs/core/utils/icons/SvgNew.js +24 -2
- package/cjs/core/utils/icons/SvgSearch.js +24 -2
- package/cjs/core/utils/icons/SvgSmileyHappy.js +24 -2
- package/cjs/core/utils/icons/SvgSortDown.js +24 -2
- package/cjs/core/utils/icons/SvgSortUp.js +24 -2
- package/cjs/core/utils/icons/SvgStatusError.js +24 -2
- package/cjs/core/utils/icons/SvgStatusSuccess.js +24 -2
- package/cjs/core/utils/icons/SvgStatusWarning.js +24 -2
- package/cjs/core/utils/icons/SvgSwap.js +24 -2
- package/cjs/core/utils/icons/SvgUpload.js +24 -2
- package/cjs/core/utils/icons/index.js +46 -33
- package/cjs/core/utils/index.js +21 -8
- package/cjs/styles.js +2 -2
- package/esm/core/ThemeProvider/ThemeProvider.js +35 -1
- package/esm/core/utils/components/WithCSSTransition.d.ts +2 -2
- package/esm/core/utils/functions/import.d.ts +12 -0
- package/esm/core/utils/functions/import.js +28 -0
- package/esm/styles.js +2 -2
- package/package.json +2 -2
- package/styles.css +8 -2
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.SvgSmileyHappy = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
/*---------------------------------------------------------------------------------------------
|
|
6
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
30
|
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const React =
|
|
31
|
+
const React = __importStar(require("react"));
|
|
10
32
|
const Svg_js_1 = require("./Svg.js");
|
|
11
33
|
const SvgSmileyHappy = (props) => {
|
|
12
34
|
return (React.createElement(Svg_js_1.Svg, { ...props },
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.SvgSortDown = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
/*---------------------------------------------------------------------------------------------
|
|
6
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
30
|
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const React =
|
|
31
|
+
const React = __importStar(require("react"));
|
|
10
32
|
const Svg_js_1 = require("./Svg.js");
|
|
11
33
|
const SvgSortDown = (props) => {
|
|
12
34
|
return (React.createElement(Svg_js_1.Svg, { ...props },
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.SvgSortUp = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
/*---------------------------------------------------------------------------------------------
|
|
6
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
30
|
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const React =
|
|
31
|
+
const React = __importStar(require("react"));
|
|
10
32
|
const Svg_js_1 = require("./Svg.js");
|
|
11
33
|
const SvgSortUp = (props) => {
|
|
12
34
|
return (React.createElement(Svg_js_1.Svg, { ...props },
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.SvgStatusError = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
/*---------------------------------------------------------------------------------------------
|
|
6
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
30
|
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const React =
|
|
31
|
+
const React = __importStar(require("react"));
|
|
10
32
|
const Svg_js_1 = require("./Svg.js");
|
|
11
33
|
const SvgStatusError = (props) => {
|
|
12
34
|
return (React.createElement(Svg_js_1.Svg, { ...props },
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.SvgStatusSuccess = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
/*---------------------------------------------------------------------------------------------
|
|
6
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
30
|
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const React =
|
|
31
|
+
const React = __importStar(require("react"));
|
|
10
32
|
const Svg_js_1 = require("./Svg.js");
|
|
11
33
|
const SvgStatusSuccess = (props) => {
|
|
12
34
|
return (React.createElement(Svg_js_1.Svg, { ...props },
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.SvgStatusWarning = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
/*---------------------------------------------------------------------------------------------
|
|
6
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
30
|
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const React =
|
|
31
|
+
const React = __importStar(require("react"));
|
|
10
32
|
const Svg_js_1 = require("./Svg.js");
|
|
11
33
|
const SvgStatusWarning = (props) => {
|
|
12
34
|
return (React.createElement(Svg_js_1.Svg, { ...props },
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.SvgSwap = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
/*---------------------------------------------------------------------------------------------
|
|
6
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
30
|
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const React =
|
|
31
|
+
const React = __importStar(require("react"));
|
|
10
32
|
const Svg_js_1 = require("./Svg.js");
|
|
11
33
|
const SvgSwap = (props) => {
|
|
12
34
|
return (React.createElement(Svg_js_1.Svg, { ...props },
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.SvgUpload = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
/*---------------------------------------------------------------------------------------------
|
|
6
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
30
|
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const React =
|
|
31
|
+
const React = __importStar(require("react"));
|
|
10
32
|
const Svg_js_1 = require("./Svg.js");
|
|
11
33
|
const SvgUpload = (props) => {
|
|
12
34
|
return (React.createElement(Svg_js_1.Svg, { ...props },
|
|
@@ -1,39 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
17
|
/*---------------------------------------------------------------------------------------------
|
|
5
18
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
19
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
20
|
*--------------------------------------------------------------------------------------------*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
__exportStar(require("./StatusIconMap.js"), exports);
|
|
22
|
+
__exportStar(require("./SvgStatusSuccess.js"), exports);
|
|
23
|
+
__exportStar(require("./SvgStatusWarning.js"), exports);
|
|
24
|
+
__exportStar(require("./SvgStatusError.js"), exports);
|
|
25
|
+
__exportStar(require("./SvgInfoCircular.js"), exports);
|
|
26
|
+
__exportStar(require("./SvgClose.js"), exports);
|
|
27
|
+
__exportStar(require("./SvgCloseSmall.js"), exports);
|
|
28
|
+
__exportStar(require("./SvgChevronLeft.js"), exports);
|
|
29
|
+
__exportStar(require("./SvgChevronRight.js"), exports);
|
|
30
|
+
__exportStar(require("./SvgChevronRightSmall.js"), exports);
|
|
31
|
+
__exportStar(require("./SvgChevronLeftDouble.js"), exports);
|
|
32
|
+
__exportStar(require("./SvgChevronRightDouble.js"), exports);
|
|
33
|
+
__exportStar(require("./SvgCaretUpSmall.js"), exports);
|
|
34
|
+
__exportStar(require("./SvgCaretDownSmall.js"), exports);
|
|
35
|
+
__exportStar(require("./SvgCaretRightSmall.js"), exports);
|
|
36
|
+
__exportStar(require("./SvgSmileyHappy.js"), exports);
|
|
37
|
+
__exportStar(require("./SvgSwap.js"), exports);
|
|
38
|
+
__exportStar(require("./SvgUpload.js"), exports);
|
|
39
|
+
__exportStar(require("./SvgMoreVertical.js"), exports);
|
|
40
|
+
__exportStar(require("./SvgCheckmark.js"), exports);
|
|
41
|
+
__exportStar(require("./SvgCheckmarkSmall.js"), exports);
|
|
42
|
+
__exportStar(require("./SvgImportantSmall.js"), exports);
|
|
43
|
+
__exportStar(require("./SvgSortUp.js"), exports);
|
|
44
|
+
__exportStar(require("./SvgSortDown.js"), exports);
|
|
45
|
+
__exportStar(require("./SvgColumnManager.js"), exports);
|
|
46
|
+
__exportStar(require("./SvgMore.js"), exports);
|
|
47
|
+
__exportStar(require("./SvgNew.js"), exports);
|
|
48
|
+
__exportStar(require("./SvgSearch.js"), exports);
|
|
49
|
+
__exportStar(require("./SvgFilter.js"), exports);
|
|
50
|
+
__exportStar(require("./SvgFilterHollow.js"), exports);
|
|
51
|
+
__exportStar(require("./SvgCalendar.js"), exports);
|
|
52
|
+
__exportStar(require("./SvgDocument.js"), exports);
|
package/cjs/core/utils/index.js
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
17
|
/*---------------------------------------------------------------------------------------------
|
|
5
18
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
19
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
20
|
*--------------------------------------------------------------------------------------------*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
__exportStar(require("./functions/index.js"), exports);
|
|
22
|
+
__exportStar(require("./hooks/index.js"), exports);
|
|
23
|
+
__exportStar(require("./components/index.js"), exports);
|
|
24
|
+
__exportStar(require("./props.js"), exports);
|
|
25
|
+
__exportStar(require("./color/index.js"), exports);
|
|
26
|
+
__exportStar(require("./icons/index.js"), exports);
|
|
27
|
+
__exportStar(require("./types.js"), exports);
|
package/cjs/styles.js
CHANGED
|
@@ -208,9 +208,9 @@ const styles = {
|
|
|
208
208
|
"iui-overlay-exiting": "_iui3-overlay-exiting",
|
|
209
209
|
closeAnimation,
|
|
210
210
|
"iui-progress-indicator-radial": "_iui3-progress-indicator-radial",
|
|
211
|
-
"iui-
|
|
211
|
+
"iui-u8yicpz": "_iui3-u8yicpz",
|
|
212
212
|
"iui-progress-indicator-linear-label": "_iui3-progress-indicator-linear-label",
|
|
213
|
-
"iui-
|
|
213
|
+
"iui-u8yicqf": "_iui3-u8yicqf",
|
|
214
214
|
"iui-radio": "_iui3-radio",
|
|
215
215
|
"iui-radio-tile": "_iui3-radio-tile",
|
|
216
216
|
"iui-radio-tile-icon": "_iui3-radio-tile-icon",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import * as ReactDOM from 'react-dom';
|
|
7
7
|
import cx from 'classnames';
|
|
8
|
-
import { useMediaQuery, useMergedRefs, Box, useIsomorphicLayoutEffect, useControlledState, useLatestRef, } from '../utils/index.js';
|
|
8
|
+
import { useMediaQuery, useMergedRefs, Box, useIsomorphicLayoutEffect, useControlledState, useLatestRef, importCss, isJest, } from '../utils/index.js';
|
|
9
9
|
import { ThemeContext } from './ThemeContext.js';
|
|
10
10
|
import { ToastProvider, Toaster } from '../Toast/Toaster.js';
|
|
11
11
|
/**
|
|
@@ -57,6 +57,7 @@ export const ThemeProvider = React.forwardRef((props, forwardedRef) => {
|
|
|
57
57
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
58
|
[theme, JSON.stringify(themeOptions), portalContainer]);
|
|
59
59
|
return (React.createElement(ThemeContext.Provider, { value: contextValue },
|
|
60
|
+
themeProp === 'inherit' && rootElement ? (React.createElement(FallbackStyles, { root: rootElement })) : null,
|
|
60
61
|
React.createElement(Root, { theme: theme, themeOptions: themeOptions, ref: useMergedRefs(forwardedRef, setRootElement), ...rest },
|
|
61
62
|
React.createElement(ToastProvider, null,
|
|
62
63
|
children,
|
|
@@ -119,3 +120,36 @@ const useParentThemeAndContext = (rootElement) => {
|
|
|
119
120
|
context: parentContext,
|
|
120
121
|
};
|
|
121
122
|
};
|
|
123
|
+
// ----------------------------------------------------------------------------
|
|
124
|
+
/**
|
|
125
|
+
* When `@itwin/itwinui-react/styles.css` is not imported, we will attempt to
|
|
126
|
+
* dynamically import it (if possible) and fallback to loading it from a CDN.
|
|
127
|
+
*/
|
|
128
|
+
const FallbackStyles = ({ root }) => {
|
|
129
|
+
useIsomorphicLayoutEffect(() => {
|
|
130
|
+
// bail if styles are already loaded
|
|
131
|
+
if (root.style.getPropertyValue('--_iui-version') === '3') {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
// bail if jest because it does not support dynamic imports 🤷
|
|
135
|
+
if (isJest) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
(async () => {
|
|
139
|
+
try {
|
|
140
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
141
|
+
// @ts-ignore
|
|
142
|
+
await import('../../../styles.css');
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
console.log('Error loading styles.css locally', error);
|
|
146
|
+
const css = await importCss('https://cdn.jsdelivr.net/npm/@itwin/itwinui-react@3/styles.css');
|
|
147
|
+
document.adoptedStyleSheets = [
|
|
148
|
+
...document.adoptedStyleSheets,
|
|
149
|
+
css.default,
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
})();
|
|
153
|
+
}, [root]);
|
|
154
|
+
return React.createElement(React.Fragment, null);
|
|
155
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
3
|
-
export declare const WithCSSTransition: (props: Partial<
|
|
2
|
+
import { CSSTransition } from 'react-transition-group';
|
|
3
|
+
export declare const WithCSSTransition: (props: Partial<React.ComponentPropsWithoutRef<typeof CSSTransition>> & {
|
|
4
4
|
children: JSX.Element;
|
|
5
5
|
dimension?: 'height' | 'width';
|
|
6
6
|
}) => React.JSX.Element;
|
|
@@ -4,3 +4,15 @@
|
|
|
4
4
|
* 2. jest/node causing segfault when encountering dynamic import (https://github.com/nodejs/node/issues/35889)
|
|
5
5
|
*/
|
|
6
6
|
export declare const dynamicImport: Function;
|
|
7
|
+
/**
|
|
8
|
+
* Wrapper around native CSS module scripts (import attributes) for dynamic imports.
|
|
9
|
+
* In unsupported browsers, it gracefully degrades to import assertions, and then `fetch`.
|
|
10
|
+
*
|
|
11
|
+
* Returns a constructable CSSStyleSheet object that can be adopted.
|
|
12
|
+
*
|
|
13
|
+
* @see https://web.dev/articles/css-module-scripts
|
|
14
|
+
* @see https://github.com/tc39/proposal-import-attributes
|
|
15
|
+
*/
|
|
16
|
+
export declare const importCss: (url: string) => Promise<{
|
|
17
|
+
default: CSSStyleSheet;
|
|
18
|
+
}>;
|
|
@@ -10,3 +10,31 @@
|
|
|
10
10
|
export const dynamicImport = typeof jest === undefined
|
|
11
11
|
? new Function('specifier', 'return import(specifier)')
|
|
12
12
|
: (specifier) => import(/* webpackIgnore: true */ /* @vite-ignore */ specifier);
|
|
13
|
+
/**
|
|
14
|
+
* Wrapper around native CSS module scripts (import attributes) for dynamic imports.
|
|
15
|
+
* In unsupported browsers, it gracefully degrades to import assertions, and then `fetch`.
|
|
16
|
+
*
|
|
17
|
+
* Returns a constructable CSSStyleSheet object that can be adopted.
|
|
18
|
+
*
|
|
19
|
+
* @see https://web.dev/articles/css-module-scripts
|
|
20
|
+
* @see https://github.com/tc39/proposal-import-attributes
|
|
21
|
+
*/
|
|
22
|
+
export const importCss = async (url) => {
|
|
23
|
+
try {
|
|
24
|
+
return await new Function(`return import("${url}", { with: { type: "css" } })`)();
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
try {
|
|
28
|
+
return await new Function(`return import("${url}", { assert: { type: "css" } })`)();
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return await fetch(url)
|
|
32
|
+
.then((res) => res.text())
|
|
33
|
+
.then((cssText) => {
|
|
34
|
+
const stylesheet = new CSSStyleSheet();
|
|
35
|
+
stylesheet.replaceSync(cssText);
|
|
36
|
+
return { default: stylesheet };
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
package/esm/styles.js
CHANGED
|
@@ -207,9 +207,9 @@ const styles = {
|
|
|
207
207
|
"iui-overlay-exiting": "_iui3-overlay-exiting",
|
|
208
208
|
closeAnimation,
|
|
209
209
|
"iui-progress-indicator-radial": "_iui3-progress-indicator-radial",
|
|
210
|
-
"iui-
|
|
210
|
+
"iui-u8yicpz": "_iui3-u8yicpz",
|
|
211
211
|
"iui-progress-indicator-linear-label": "_iui3-progress-indicator-linear-label",
|
|
212
|
-
"iui-
|
|
212
|
+
"iui-u8yicqf": "_iui3-u8yicqf",
|
|
213
213
|
"iui-radio": "_iui3-radio",
|
|
214
214
|
"iui-radio-tile": "_iui3-radio-tile",
|
|
215
215
|
"iui-radio-tile-icon": "_iui3-radio-tile-icon",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/itwinui-react",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3-dev.1",
|
|
4
4
|
"author": "Bentley Systems",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@types/node": "^18.0.0",
|
|
96
96
|
"@types/react": "^18.2.0",
|
|
97
97
|
"@types/react-dom": "^18.2.0",
|
|
98
|
-
"@types/react-transition-group": "^4.4.
|
|
98
|
+
"@types/react-transition-group": "^4.4.10",
|
|
99
99
|
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
|
100
100
|
"@typescript-eslint/parser": "^5.60.0",
|
|
101
101
|
"concurrently": "^5.3.0",
|