@itwin/itwinui-react 2.5.1 → 2.6.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/CHANGELOG.md +30 -0
- package/cjs/core/ComboBox/ComboBox.js +4 -1
- package/cjs/core/FileUpload/FileEmptyCard.d.ts +29 -0
- package/cjs/core/FileUpload/FileEmptyCard.js +50 -0
- package/cjs/core/FileUpload/FileUploadCard.d.ts +116 -0
- package/cjs/core/FileUpload/FileUploadCard.js +144 -0
- package/cjs/core/FileUpload/FileUploadTemplate.d.ts +1 -1
- package/cjs/core/FileUpload/FileUploadTemplate.js +4 -3
- package/cjs/core/FileUpload/index.d.ts +4 -0
- package/cjs/core/FileUpload/index.js +5 -1
- package/cjs/core/Header/HeaderLogo.d.ts +8 -11
- package/cjs/core/Header/HeaderLogo.js +7 -12
- package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +12 -2
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +2 -2
- package/cjs/core/index.d.ts +2 -2
- package/cjs/core/index.js +5 -3
- package/cjs/core/utils/hooks/index.d.ts +1 -0
- package/cjs/core/utils/hooks/index.js +1 -0
- package/cjs/core/utils/hooks/useId.d.ts +5 -0
- package/cjs/core/utils/hooks/useId.js +20 -0
- package/cjs/core/utils/icons/SvgDocument.d.ts +2 -0
- package/cjs/core/utils/icons/SvgDocument.js +36 -0
- package/cjs/core/utils/icons/index.d.ts +1 -0
- package/cjs/core/utils/icons/index.js +1 -0
- package/esm/core/ComboBox/ComboBox.js +4 -1
- package/esm/core/FileUpload/FileEmptyCard.d.ts +29 -0
- package/esm/core/FileUpload/FileEmptyCard.js +44 -0
- package/esm/core/FileUpload/FileUploadCard.d.ts +116 -0
- package/esm/core/FileUpload/FileUploadCard.js +138 -0
- package/esm/core/FileUpload/FileUploadTemplate.d.ts +1 -1
- package/esm/core/FileUpload/FileUploadTemplate.js +4 -3
- package/esm/core/FileUpload/index.d.ts +4 -0
- package/esm/core/FileUpload/index.js +2 -0
- package/esm/core/Header/HeaderLogo.d.ts +8 -11
- package/esm/core/Header/HeaderLogo.js +7 -11
- package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +12 -2
- package/esm/core/ToggleSwitch/ToggleSwitch.js +2 -2
- package/esm/core/index.d.ts +2 -2
- package/esm/core/index.js +1 -1
- package/esm/core/utils/hooks/index.d.ts +1 -0
- package/esm/core/utils/hooks/index.js +1 -0
- package/esm/core/utils/hooks/useId.d.ts +5 -0
- package/esm/core/utils/hooks/useId.js +14 -0
- package/esm/core/utils/icons/SvgDocument.d.ts +2 -0
- package/esm/core/utils/icons/SvgDocument.js +9 -0
- package/esm/core/utils/icons/index.d.ts +1 -0
- package/esm/core/utils/icons/index.js +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 85af52c6: Add small size toggle switch option using `size` prop as follows: `<ToggleSwitch size='small' />`
|
|
8
|
+
- 1b541699: Added a new FileUploadCard component which serves as a default UI for when a single file is uploaded. This can also be used as a child of FileUpload
|
|
9
|
+
|
|
10
|
+
```jsx
|
|
11
|
+
<FileUploadCard />
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```jsx
|
|
15
|
+
const [files, setFiles] = React.useState<File[]>([]);
|
|
16
|
+
|
|
17
|
+
<FileUpload
|
|
18
|
+
onFileDropped={(files) => {
|
|
19
|
+
setFiles(files);
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<FileUploadCard files={files} onFilesChange={(files) => setFiles(files)} />
|
|
23
|
+
</FileUpload>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- d2ffe2f2: `ComboBox` will not crash when user provided value is not in Options list.
|
|
29
|
+
- 56f9d524: HeaderLogo now supports `as` prop to allow rendering as a link. It will default to a `button` if `onClick` is passed, and `div` if not.
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
- @itwin/itwinui-css@1.7.0
|
|
32
|
+
|
|
3
33
|
## 2.5.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -83,7 +83,10 @@ const ComboBox = (props) => {
|
|
|
83
83
|
if (isMultipleEnabled(valueProp, multiple)) {
|
|
84
84
|
const indexArray = [];
|
|
85
85
|
valueProp === null || valueProp === void 0 ? void 0 : valueProp.forEach((value) => {
|
|
86
|
-
|
|
86
|
+
const indexToAdd = options.findIndex((option) => option.value === value);
|
|
87
|
+
if (indexToAdd > -1) {
|
|
88
|
+
indexArray.push(indexToAdd);
|
|
89
|
+
}
|
|
87
90
|
});
|
|
88
91
|
return indexArray;
|
|
89
92
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type FileEmptyCardIconProps = React.ComponentPropsWithRef<'span'>;
|
|
3
|
+
export declare type FileEmptyCardTextProps = React.ComponentPropsWithRef<'span'>;
|
|
4
|
+
export declare type FileEmptyCardProps = React.ComponentPropsWithoutRef<'div'>;
|
|
5
|
+
/**
|
|
6
|
+
* Empty file card to be used with the `FileUploadCard` component when no file has been uploaded.
|
|
7
|
+
* @example
|
|
8
|
+
* <FileEmptyCard />
|
|
9
|
+
* <FileEmptyCard>
|
|
10
|
+
* <FileEmptyCard.Icon>
|
|
11
|
+
* <SvgSmileySadVery />
|
|
12
|
+
* </FileEmptyCard.Icon>
|
|
13
|
+
* <FileEmptyCard.Text>
|
|
14
|
+
* <FileUploadCard.InputLabel>
|
|
15
|
+
* Custom Label Text
|
|
16
|
+
* </FileUploadCard.InputLabel>
|
|
17
|
+
* <div>Custom Description Text</div>
|
|
18
|
+
* </FileEmptyCard.Text>
|
|
19
|
+
* </FileEmptyCard>
|
|
20
|
+
*/
|
|
21
|
+
export declare const FileEmptyCard: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>> & {
|
|
22
|
+
Icon: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
23
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
24
|
+
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
Text: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
26
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
27
|
+
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
};
|
|
29
|
+
export default FileEmptyCard;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FileEmptyCard = void 0;
|
|
7
|
+
/*---------------------------------------------------------------------------------------------
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const utils_1 = require("../utils");
|
|
13
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
14
|
+
const FileUploadCard_1 = __importDefault(require("./FileUploadCard"));
|
|
15
|
+
const FileEmptyCardIcon = react_1.default.forwardRef((props, ref) => {
|
|
16
|
+
const { children, className, ...rest } = props;
|
|
17
|
+
return (react_1.default.createElement("span", { className: (0, classnames_1.default)('iui-file-card-empty-icon', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : react_1.default.createElement(utils_1.SvgUpload, null)));
|
|
18
|
+
});
|
|
19
|
+
const FileEmptyCardText = react_1.default.forwardRef((props, ref) => {
|
|
20
|
+
const { children, className, ...rest } = props;
|
|
21
|
+
return (react_1.default.createElement("span", { className: (0, classnames_1.default)('iui-file-card-empty-action', className), ref: ref, ...rest }, children));
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Empty file card to be used with the `FileUploadCard` component when no file has been uploaded.
|
|
25
|
+
* @example
|
|
26
|
+
* <FileEmptyCard />
|
|
27
|
+
* <FileEmptyCard>
|
|
28
|
+
* <FileEmptyCard.Icon>
|
|
29
|
+
* <SvgSmileySadVery />
|
|
30
|
+
* </FileEmptyCard.Icon>
|
|
31
|
+
* <FileEmptyCard.Text>
|
|
32
|
+
* <FileUploadCard.InputLabel>
|
|
33
|
+
* Custom Label Text
|
|
34
|
+
* </FileUploadCard.InputLabel>
|
|
35
|
+
* <div>Custom Description Text</div>
|
|
36
|
+
* </FileEmptyCard.Text>
|
|
37
|
+
* </FileEmptyCard>
|
|
38
|
+
*/
|
|
39
|
+
exports.FileEmptyCard = Object.assign(react_1.default.forwardRef((props, ref) => {
|
|
40
|
+
const { children, className, ...rest } = props;
|
|
41
|
+
return (react_1.default.createElement("div", { className: (0, classnames_1.default)('iui-file-card-empty', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
42
|
+
react_1.default.createElement(exports.FileEmptyCard.Icon, null),
|
|
43
|
+
react_1.default.createElement(exports.FileEmptyCard.Text, null,
|
|
44
|
+
react_1.default.createElement(FileUploadCard_1.default.InputLabel, null, "Choose a file"),
|
|
45
|
+
react_1.default.createElement("div", null, "to upload."))))));
|
|
46
|
+
}), {
|
|
47
|
+
Icon: FileEmptyCardIcon,
|
|
48
|
+
Text: FileEmptyCardText,
|
|
49
|
+
});
|
|
50
|
+
exports.default = exports.FileEmptyCard;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type FileUploadCardIconProps = React.ComponentPropsWithRef<'span'>;
|
|
3
|
+
export declare type FileUploadCardInfoProps = React.ComponentPropsWithRef<'span'>;
|
|
4
|
+
export declare type FileUploadCardTitleProps = React.ComponentPropsWithRef<'span'>;
|
|
5
|
+
export declare type FileUploadCardDescriptionProps = React.ComponentPropsWithRef<'span'>;
|
|
6
|
+
export declare type FileUploadCardActionProps = React.ComponentPropsWithRef<'div'>;
|
|
7
|
+
export declare type FileUploadCardInputLabelProps = React.ComponentPropsWithRef<'label'>;
|
|
8
|
+
export declare type FileUploadCardInputProps = React.ComponentPropsWithRef<'input'>;
|
|
9
|
+
export declare type FileUploadCardProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Files to pass (only needed when passing a custom action)
|
|
12
|
+
*/
|
|
13
|
+
files?: File[];
|
|
14
|
+
/**
|
|
15
|
+
* Callback fired when files has changed (only needed passing custom action)
|
|
16
|
+
*/
|
|
17
|
+
onFilesChange?: (files: File[]) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Node that is shown when there is no file uploaded
|
|
20
|
+
* Either pass `FileEmptyCard` (for default state) or a different component to show
|
|
21
|
+
* @default <FileEmptyCard />
|
|
22
|
+
*/
|
|
23
|
+
emptyCard?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Input node
|
|
26
|
+
* @default <FileUploadCard.Input />
|
|
27
|
+
*/
|
|
28
|
+
input?: React.ReactNode;
|
|
29
|
+
} & React.ComponentPropsWithoutRef<'div'>;
|
|
30
|
+
/**
|
|
31
|
+
* Default card to be used with the `FileUpload` wrapper component for single-file uploading.
|
|
32
|
+
* @example
|
|
33
|
+
* <FileUploadCard />
|
|
34
|
+
* <FileUploadCard files={files} onFilesChange={(files) => setFiles(files)}>
|
|
35
|
+
* <FileUploadCard.Icon>
|
|
36
|
+
* <SvgSmileyHappyVery />
|
|
37
|
+
* </FileUploadCard.Icon>
|
|
38
|
+
* <FileUploadCard.Info>
|
|
39
|
+
* <FileUploadCard.Title>Custom File Name</FileUploadCard.Title>
|
|
40
|
+
* <FileUploadCard.Description>
|
|
41
|
+
* Custom File Description
|
|
42
|
+
* </FileUploadCard.Description>
|
|
43
|
+
* </FileUploadCard.Info>
|
|
44
|
+
* <FileUploadCard.Action>
|
|
45
|
+
* <Button
|
|
46
|
+
* onClick={() => {
|
|
47
|
+
* setFiles([]);
|
|
48
|
+
* }}
|
|
49
|
+
* />
|
|
50
|
+
* <FileUploadCard.Input name={fileInputId} ref={inputRef} />
|
|
51
|
+
* </FileUploadCard.Action>
|
|
52
|
+
* </FileUploadCard>
|
|
53
|
+
*/
|
|
54
|
+
export declare const FileUploadCard: React.ForwardRefExoticComponent<{
|
|
55
|
+
/**
|
|
56
|
+
* Files to pass (only needed when passing a custom action)
|
|
57
|
+
*/
|
|
58
|
+
files?: File[] | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Callback fired when files has changed (only needed passing custom action)
|
|
61
|
+
*/
|
|
62
|
+
onFilesChange?: ((files: File[]) => void) | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Node that is shown when there is no file uploaded
|
|
65
|
+
* Either pass `FileEmptyCard` (for default state) or a different component to show
|
|
66
|
+
* @default <FileEmptyCard />
|
|
67
|
+
*/
|
|
68
|
+
emptyCard?: React.ReactNode;
|
|
69
|
+
/**
|
|
70
|
+
* Input node
|
|
71
|
+
* @default <FileUploadCard.Input />
|
|
72
|
+
*/
|
|
73
|
+
input?: React.ReactNode;
|
|
74
|
+
} & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>> & {
|
|
75
|
+
Icon: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
76
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
77
|
+
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
78
|
+
Info: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
79
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
80
|
+
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
81
|
+
Title: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
82
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
83
|
+
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
84
|
+
Description: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
85
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
86
|
+
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
87
|
+
Action: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
88
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
89
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
90
|
+
InputLabel: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "key" | keyof React.LabelHTMLAttributes<HTMLLabelElement>> & {
|
|
91
|
+
ref?: ((instance: HTMLLabelElement | null) => void) | React.RefObject<HTMLLabelElement> | null | undefined;
|
|
92
|
+
}, "key" | keyof React.LabelHTMLAttributes<HTMLLabelElement>> & React.RefAttributes<HTMLLabelElement>>;
|
|
93
|
+
Input: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
94
|
+
ref?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
95
|
+
}, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
96
|
+
};
|
|
97
|
+
export default FileUploadCard;
|
|
98
|
+
export declare const FileUploadCardContext: React.Context<{
|
|
99
|
+
/**
|
|
100
|
+
* Files to pass
|
|
101
|
+
*/
|
|
102
|
+
files: File[];
|
|
103
|
+
/**
|
|
104
|
+
* Callback fired when files have changed
|
|
105
|
+
*/
|
|
106
|
+
onFilesChange?: ((files: File[]) => void) | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Sets the state of the files within FileUploadCard
|
|
109
|
+
*/
|
|
110
|
+
setInternalFiles: (files: File[]) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Id to pass to input
|
|
113
|
+
*/
|
|
114
|
+
inputId?: string | undefined;
|
|
115
|
+
setInputId: (inputId: string) => void;
|
|
116
|
+
} | undefined>;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FileUploadCardContext = exports.FileUploadCard = void 0;
|
|
7
|
+
/*---------------------------------------------------------------------------------------------
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const utils_1 = require("../utils");
|
|
13
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
14
|
+
const FileEmptyCard_1 = require("./FileEmptyCard");
|
|
15
|
+
const utils_2 = require("../utils");
|
|
16
|
+
const toBytes = (bytes) => {
|
|
17
|
+
const units = [' bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
18
|
+
let i = 0;
|
|
19
|
+
while (bytes >= 1024 && ++i) {
|
|
20
|
+
bytes = bytes / 1024;
|
|
21
|
+
}
|
|
22
|
+
return bytes.toFixed(bytes < 10 && i > 0 ? 2 : 0) + units[i];
|
|
23
|
+
};
|
|
24
|
+
const toDate = (dateNumber) => {
|
|
25
|
+
const date = new Date(dateNumber);
|
|
26
|
+
return date.toDateString() + ' ' + date.toLocaleTimeString();
|
|
27
|
+
};
|
|
28
|
+
const FileUploadCardIcon = react_1.default.forwardRef((props, ref) => {
|
|
29
|
+
const { children, className, ...rest } = props;
|
|
30
|
+
return (react_1.default.createElement("span", { className: (0, classnames_1.default)('iui-file-card-icon', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : react_1.default.createElement(utils_1.SvgDocument, null)));
|
|
31
|
+
});
|
|
32
|
+
const FileUploadCardInfo = react_1.default.forwardRef((props, ref) => {
|
|
33
|
+
const { children, className, ...rest } = props;
|
|
34
|
+
return (react_1.default.createElement("span", { className: (0, classnames_1.default)('iui-file-card-text', className), ref: ref, ...rest }, children));
|
|
35
|
+
});
|
|
36
|
+
const FileUploadCardTitle = react_1.default.forwardRef((props, ref) => {
|
|
37
|
+
const { children, className, ...rest } = props;
|
|
38
|
+
const { files } = (0, utils_1.useSafeContext)(exports.FileUploadCardContext);
|
|
39
|
+
const title = files.length > 1 ? files.length + ' files selected' : files[0].name;
|
|
40
|
+
return (react_1.default.createElement("span", { className: (0, classnames_1.default)('iui-file-card-title', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : title));
|
|
41
|
+
});
|
|
42
|
+
const FileUploadCardDescription = react_1.default.forwardRef((props, ref) => {
|
|
43
|
+
const { children, className, ...rest } = props;
|
|
44
|
+
const { files } = (0, utils_1.useSafeContext)(exports.FileUploadCardContext);
|
|
45
|
+
let description = files.length > 1
|
|
46
|
+
? files[0].name + ', ' + files[1].name
|
|
47
|
+
: toBytes(files[0].size) + ' ' + toDate(files[0].lastModified);
|
|
48
|
+
if (files.length > 2) {
|
|
49
|
+
description += ', and ' + (files.length - 2) + ' others';
|
|
50
|
+
}
|
|
51
|
+
return (react_1.default.createElement("span", { className: (0, classnames_1.default)('iui-file-card-description', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : description));
|
|
52
|
+
});
|
|
53
|
+
const FileUploadCardAction = react_1.default.forwardRef((props, ref) => {
|
|
54
|
+
const { children, className, ...rest } = props;
|
|
55
|
+
return (react_1.default.createElement("div", { className: (0, classnames_1.default)('iui-file-card-action', className), ref: ref, ...rest }, children));
|
|
56
|
+
});
|
|
57
|
+
const FileUploadCardInputLabel = react_1.default.forwardRef((props, ref) => {
|
|
58
|
+
const { children, className, ...rest } = props;
|
|
59
|
+
const { inputId } = (0, utils_1.useSafeContext)(exports.FileUploadCardContext);
|
|
60
|
+
return (react_1.default.createElement("label", { className: (0, classnames_1.default)('iui-anchor', className), ref: ref, htmlFor: inputId, ...rest }, children));
|
|
61
|
+
});
|
|
62
|
+
const FileUploadCardInput = react_1.default.forwardRef((props, ref) => {
|
|
63
|
+
const { children, className, onChange, id, ...rest } = props;
|
|
64
|
+
const { files, onFilesChange, setInternalFiles, inputId, setInputId } = (0, utils_1.useSafeContext)(exports.FileUploadCardContext);
|
|
65
|
+
const setNativeFilesRef = react_1.default.useCallback((node) => {
|
|
66
|
+
var _a;
|
|
67
|
+
if (!node || !((_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.DataTransfer)) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const dataTransfer = new DataTransfer();
|
|
71
|
+
dataTransfer.items.clear();
|
|
72
|
+
Array.from(files).forEach((file) => dataTransfer.items.add(file));
|
|
73
|
+
node.files = dataTransfer.files;
|
|
74
|
+
}, [files]);
|
|
75
|
+
const refs = (0, utils_1.useMergedRefs)(ref, setNativeFilesRef);
|
|
76
|
+
if (id && id !== inputId) {
|
|
77
|
+
setInputId(id);
|
|
78
|
+
}
|
|
79
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
80
|
+
react_1.default.createElement("input", { className: (0, classnames_1.default)('iui-visually-hidden', className), type: 'file', onChange: (e) => {
|
|
81
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
82
|
+
if (!e.isDefaultPrevented()) {
|
|
83
|
+
const _files = Array.from(e.currentTarget.files || []);
|
|
84
|
+
onFilesChange === null || onFilesChange === void 0 ? void 0 : onFilesChange(_files);
|
|
85
|
+
setInternalFiles(_files);
|
|
86
|
+
}
|
|
87
|
+
}, ref: refs, id: id !== null && id !== void 0 ? id : inputId, ...rest }),
|
|
88
|
+
children));
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* Default card to be used with the `FileUpload` wrapper component for single-file uploading.
|
|
92
|
+
* @example
|
|
93
|
+
* <FileUploadCard />
|
|
94
|
+
* <FileUploadCard files={files} onFilesChange={(files) => setFiles(files)}>
|
|
95
|
+
* <FileUploadCard.Icon>
|
|
96
|
+
* <SvgSmileyHappyVery />
|
|
97
|
+
* </FileUploadCard.Icon>
|
|
98
|
+
* <FileUploadCard.Info>
|
|
99
|
+
* <FileUploadCard.Title>Custom File Name</FileUploadCard.Title>
|
|
100
|
+
* <FileUploadCard.Description>
|
|
101
|
+
* Custom File Description
|
|
102
|
+
* </FileUploadCard.Description>
|
|
103
|
+
* </FileUploadCard.Info>
|
|
104
|
+
* <FileUploadCard.Action>
|
|
105
|
+
* <Button
|
|
106
|
+
* onClick={() => {
|
|
107
|
+
* setFiles([]);
|
|
108
|
+
* }}
|
|
109
|
+
* />
|
|
110
|
+
* <FileUploadCard.Input name={fileInputId} ref={inputRef} />
|
|
111
|
+
* </FileUploadCard.Action>
|
|
112
|
+
* </FileUploadCard>
|
|
113
|
+
*/
|
|
114
|
+
exports.FileUploadCard = Object.assign(react_1.default.forwardRef((props, ref) => {
|
|
115
|
+
var _a;
|
|
116
|
+
const { className, children, files: filesProp, onFilesChange, emptyCard = react_1.default.createElement(FileEmptyCard_1.FileEmptyCard, null), input, ...rest } = props;
|
|
117
|
+
const [internalFiles, setInternalFiles] = react_1.default.useState();
|
|
118
|
+
const [inputId, setInputId] = react_1.default.useState((0, utils_2.useId)());
|
|
119
|
+
const files = (_a = filesProp !== null && filesProp !== void 0 ? filesProp : internalFiles) !== null && _a !== void 0 ? _a : [];
|
|
120
|
+
return (react_1.default.createElement(exports.FileUploadCardContext.Provider, { value: {
|
|
121
|
+
files,
|
|
122
|
+
onFilesChange,
|
|
123
|
+
setInternalFiles,
|
|
124
|
+
inputId,
|
|
125
|
+
setInputId,
|
|
126
|
+
} },
|
|
127
|
+
(files === null || files === void 0 ? void 0 : files.length) ? (react_1.default.createElement("div", { className: (0, classnames_1.default)('iui-file-card', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
128
|
+
react_1.default.createElement(exports.FileUploadCard.Icon, null),
|
|
129
|
+
react_1.default.createElement(exports.FileUploadCard.Info, null,
|
|
130
|
+
react_1.default.createElement(exports.FileUploadCard.Title, null),
|
|
131
|
+
react_1.default.createElement(exports.FileUploadCard.Description, null)),
|
|
132
|
+
react_1.default.createElement(exports.FileUploadCard.Action, null,
|
|
133
|
+
react_1.default.createElement(exports.FileUploadCard.InputLabel, null, "Replace")))))) : (emptyCard), input !== null && input !== void 0 ? input : react_1.default.createElement(exports.FileUploadCard.Input, null)));
|
|
134
|
+
}), {
|
|
135
|
+
Icon: FileUploadCardIcon,
|
|
136
|
+
Info: FileUploadCardInfo,
|
|
137
|
+
Title: FileUploadCardTitle,
|
|
138
|
+
Description: FileUploadCardDescription,
|
|
139
|
+
Action: FileUploadCardAction,
|
|
140
|
+
InputLabel: FileUploadCardInputLabel,
|
|
141
|
+
Input: FileUploadCardInput,
|
|
142
|
+
});
|
|
143
|
+
exports.default = exports.FileUploadCard;
|
|
144
|
+
exports.FileUploadCardContext = react_1.default.createContext(undefined);
|
|
@@ -30,7 +30,7 @@ export declare type FileUploadTemplateProps = {
|
|
|
30
30
|
* Optional children appended to the template.
|
|
31
31
|
*/
|
|
32
32
|
children?: React.ReactNode;
|
|
33
|
-
}
|
|
33
|
+
} & React.ComponentProps<'div'>;
|
|
34
34
|
/**
|
|
35
35
|
* Default template to be used with the `FileUpload` wrapper component.
|
|
36
36
|
* Contains a hidden input with styled labels (customizable).
|
|
@@ -9,6 +9,7 @@ exports.FileUploadTemplate = void 0;
|
|
|
9
9
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
10
|
*--------------------------------------------------------------------------------------------*/
|
|
11
11
|
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
12
13
|
const utils_1 = require("../utils");
|
|
13
14
|
require("@itwin/itwinui-css/css/file-upload.css");
|
|
14
15
|
/**
|
|
@@ -18,10 +19,10 @@ require("@itwin/itwinui-css/css/file-upload.css");
|
|
|
18
19
|
* <FileUploadTemplate onChange={(e) => console.log(e.target.files)} />
|
|
19
20
|
*/
|
|
20
21
|
const FileUploadTemplate = (props) => {
|
|
21
|
-
const { onChange, acceptMultiple = true, acceptType, label = 'Choose a file', subtitle = 'or drag & drop it here.', children, } = props;
|
|
22
|
+
const { onChange, acceptMultiple = true, acceptType, label = 'Choose a file', subtitle = 'or drag & drop it here.', children, className, ...rest } = props;
|
|
22
23
|
(0, utils_1.useTheme)();
|
|
23
|
-
return (react_1.default.createElement(
|
|
24
|
-
react_1.default.createElement(utils_1.SvgUpload, { className: 'iui-icon', "aria-hidden": true }),
|
|
24
|
+
return (react_1.default.createElement("div", { className: (0, classnames_1.default)('iui-file-upload-template', className), ...rest },
|
|
25
|
+
react_1.default.createElement(utils_1.SvgUpload, { className: 'iui-template-icon', "aria-hidden": true }),
|
|
25
26
|
react_1.default.createElement("div", { className: 'iui-template-text' },
|
|
26
27
|
react_1.default.createElement("label", { className: 'iui-anchor' },
|
|
27
28
|
react_1.default.createElement("input", { className: 'iui-browse-input', type: 'file', onChange: onChange, multiple: acceptMultiple, accept: acceptType }),
|
|
@@ -4,3 +4,7 @@ declare const _default: "./FileUpload";
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export { FileUploadTemplate } from './FileUploadTemplate';
|
|
6
6
|
export type { FileUploadTemplateProps } from './FileUploadTemplate';
|
|
7
|
+
export { FileUploadCard } from './FileUploadCard';
|
|
8
|
+
export type { FileUploadCardProps, FileUploadCardIconProps, FileUploadCardInfoProps, FileUploadCardTitleProps, FileUploadCardDescriptionProps, FileUploadCardActionProps, FileUploadCardInputLabelProps, FileUploadCardInputProps, } from './FileUploadCard';
|
|
9
|
+
export { FileEmptyCard } from './FileEmptyCard';
|
|
10
|
+
export type { FileEmptyCardProps, FileEmptyCardIconProps, FileEmptyCardTextProps, } from './FileEmptyCard';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FileUploadTemplate = exports.FileUpload = void 0;
|
|
3
|
+
exports.FileEmptyCard = exports.FileUploadCard = exports.FileUploadTemplate = exports.FileUpload = void 0;
|
|
4
4
|
/*---------------------------------------------------------------------------------------------
|
|
5
5
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
6
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -10,3 +10,7 @@ Object.defineProperty(exports, "FileUpload", { enumerable: true, get: function (
|
|
|
10
10
|
exports.default = './FileUpload';
|
|
11
11
|
var FileUploadTemplate_1 = require("./FileUploadTemplate");
|
|
12
12
|
Object.defineProperty(exports, "FileUploadTemplate", { enumerable: true, get: function () { return FileUploadTemplate_1.FileUploadTemplate; } });
|
|
13
|
+
var FileUploadCard_1 = require("./FileUploadCard");
|
|
14
|
+
Object.defineProperty(exports, "FileUploadCard", { enumerable: true, get: function () { return FileUploadCard_1.FileUploadCard; } });
|
|
15
|
+
var FileEmptyCard_1 = require("./FileEmptyCard");
|
|
16
|
+
Object.defineProperty(exports, "FileEmptyCard", { enumerable: true, get: function () { return FileEmptyCard_1.FileEmptyCard; } });
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PolymorphicForwardRefComponent, PolymorphicComponentProps } from '../utils';
|
|
3
3
|
import '@itwin/itwinui-css/css/header.css';
|
|
4
|
-
|
|
4
|
+
declare type HeaderLogoOwnProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Logo shown before the main content.
|
|
7
7
|
*/
|
|
8
8
|
logo: JSX.Element;
|
|
9
9
|
/**
|
|
10
10
|
* Click event handler.
|
|
11
|
-
*
|
|
11
|
+
* If passed, the component will be rendered as a `<button>` rather than `<div>`.
|
|
12
12
|
*/
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
} & CommonProps;
|
|
13
|
+
onClick?: (e: unknown) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare type HeaderLogoProps = PolymorphicComponentProps<'div', HeaderLogoOwnProps>;
|
|
19
16
|
/**
|
|
20
17
|
* Header Title section
|
|
21
18
|
* @example
|
|
@@ -24,5 +21,5 @@ export declare type HeaderLogoProps = {
|
|
|
24
21
|
* <HeaderLogo logo={<img src='image.png' />} />
|
|
25
22
|
* <HeaderLogo logo={<img src='data:image/png;base64,...' />}>Downloaded Image</HeaderLogo>
|
|
26
23
|
*/
|
|
27
|
-
export declare const HeaderLogo:
|
|
24
|
+
export declare const HeaderLogo: PolymorphicForwardRefComponent<"div", HeaderLogoOwnProps>;
|
|
28
25
|
export default HeaderLogo;
|
|
@@ -20,23 +20,18 @@ require("@itwin/itwinui-css/css/header.css");
|
|
|
20
20
|
* <HeaderLogo logo={<img src='image.png' />} />
|
|
21
21
|
* <HeaderLogo logo={<img src='data:image/png;base64,...' />}>Downloaded Image</HeaderLogo>
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
const { className, children, logo, onClick, ...rest } = props;
|
|
25
|
-
const keyDownHandler = (e) => {
|
|
26
|
-
if (onClick &&
|
|
27
|
-
(e.key === 'Enter' || e.key === ' ' || e.key === 'Spacebar')) {
|
|
28
|
-
e.preventDefault();
|
|
29
|
-
onClick();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
23
|
+
exports.HeaderLogo = react_1.default.forwardRef((props, ref) => {
|
|
24
|
+
const { className, children, logo, onClick, as: Element = !!onClick ? 'button' : 'div', ...rest } = props;
|
|
32
25
|
(0, utils_1.useTheme)();
|
|
33
|
-
return (react_1.default.createElement(
|
|
26
|
+
return (react_1.default.createElement(Element, { className: (0, classnames_1.default)('iui-header-brand', className), onClick: onClick,
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- TS complains here but it's ok; it is an implementation detail
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
ref: ref, ...rest },
|
|
34
30
|
react_1.default.isValidElement(logo)
|
|
35
31
|
? react_1.default.cloneElement(logo, {
|
|
36
32
|
className: (0, classnames_1.default)('iui-header-brand-icon', logo.props.className),
|
|
37
33
|
})
|
|
38
34
|
: undefined,
|
|
39
35
|
children && react_1.default.createElement("span", { className: 'iui-header-brand-label' }, children)));
|
|
40
|
-
};
|
|
41
|
-
exports.HeaderLogo = HeaderLogo;
|
|
36
|
+
});
|
|
42
37
|
exports.default = exports.HeaderLogo;
|
|
@@ -19,7 +19,12 @@ export declare type ToggleSwitchProps = {
|
|
|
19
19
|
* Icon inside the toggle switch. Shown only when toggle is checked.
|
|
20
20
|
*/
|
|
21
21
|
icon?: JSX.Element;
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Size of the toggle switch.
|
|
24
|
+
* @default 'default'
|
|
25
|
+
*/
|
|
26
|
+
size?: 'default' | 'small';
|
|
27
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'>;
|
|
23
28
|
/**
|
|
24
29
|
* A switch for turning on and off.
|
|
25
30
|
* @example
|
|
@@ -57,5 +62,10 @@ export declare const ToggleSwitch: React.ForwardRefExoticComponent<{
|
|
|
57
62
|
* Icon inside the toggle switch. Shown only when toggle is checked.
|
|
58
63
|
*/
|
|
59
64
|
icon?: JSX.Element | undefined;
|
|
60
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Size of the toggle switch.
|
|
67
|
+
* @default 'default'
|
|
68
|
+
*/
|
|
69
|
+
size?: "small" | "default" | undefined;
|
|
70
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & React.RefAttributes<HTMLInputElement>>;
|
|
61
71
|
export default ToggleSwitch;
|
|
@@ -31,7 +31,7 @@ require("@itwin/itwinui-css/css/toggle-switch.css");
|
|
|
31
31
|
* <ToggleSwitch label='With icon toggle' icon={<svg viewBox='0 0 16 16'><path d='M1 1v14h14V1H1zm13 1.7v10.6L8.7 8 14 2.7zM8 7.3L2.7 2h10.6L8 7.3zm-.7.7L2 13.3V2.7L7.3 8zm.7.7l5.3 5.3H2.7L8 8.7z' /></svg>} />
|
|
32
32
|
*/
|
|
33
33
|
exports.ToggleSwitch = react_1.default.forwardRef((props, ref) => {
|
|
34
|
-
const { disabled = false, labelPosition = 'right', icon, label, setFocus = false, className, style, ...rest } = props;
|
|
34
|
+
const { disabled = false, labelPosition = 'right', icon, label, setFocus = false, className, style, size = 'default', ...rest } = props;
|
|
35
35
|
(0, utils_1.useTheme)();
|
|
36
36
|
const inputElementRef = react_1.default.useRef(null);
|
|
37
37
|
const refs = (0, utils_1.useMergedRefs)(inputElementRef, ref);
|
|
@@ -45,7 +45,7 @@ exports.ToggleSwitch = react_1.default.forwardRef((props, ref) => {
|
|
|
45
45
|
'iui-disabled': disabled,
|
|
46
46
|
'iui-label-on-right': label && labelPosition === 'right',
|
|
47
47
|
'iui-label-on-left': label && labelPosition === 'left',
|
|
48
|
-
}, className), style: style },
|
|
48
|
+
}, className), "data-iui-size": size, style: style },
|
|
49
49
|
react_1.default.createElement("input", { className: 'iui-toggle-switch', type: 'checkbox', role: 'switch', disabled: disabled, ref: refs, ...rest }),
|
|
50
50
|
icon &&
|
|
51
51
|
react_1.default.cloneElement(icon, {
|
package/cjs/core/index.d.ts
CHANGED
|
@@ -34,8 +34,8 @@ export { ExpandableBlock } from './ExpandableBlock';
|
|
|
34
34
|
export type { ExpandableBlockProps } from './ExpandableBlock';
|
|
35
35
|
export { Fieldset } from './Fieldset';
|
|
36
36
|
export type { FieldsetProps } from './Fieldset';
|
|
37
|
-
export { FileUpload, FileUploadTemplate } from './FileUpload';
|
|
38
|
-
export type { FileUploadProps, FileUploadTemplateProps } from './FileUpload';
|
|
37
|
+
export { FileUpload, FileUploadTemplate, FileUploadCard, FileEmptyCard, } from './FileUpload';
|
|
38
|
+
export type { FileUploadProps, FileUploadTemplateProps, FileUploadCardProps, FileUploadCardIconProps, FileUploadCardInfoProps, FileUploadCardTitleProps, FileUploadCardDescriptionProps, FileUploadCardActionProps, FileUploadCardInputLabelProps, FileUploadCardInputProps, FileEmptyCardProps, FileEmptyCardIconProps, FileEmptyCardTextProps, } from './FileUpload';
|
|
39
39
|
export { Footer, defaultFooterElements } from './Footer';
|
|
40
40
|
export type { FooterProps, FooterElement, TitleTranslations } from './Footer';
|
|
41
41
|
export { Header, HeaderBreadcrumbs, HeaderButton, HeaderLogo } from './Header';
|
package/cjs/core/index.js
CHANGED
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.Flex = exports.Icon = exports.MiddleTextTruncation = exports.ColorValue = exports.useTheme = exports.getUserColor = exports.WorkflowDiagram = exports.Stepper = exports.Wizard = exports.Text = exports.KbdKeys = exports.Kbd = exports.Code = exports.Blockquote = exports.Title = exports.Subheading = exports.Small = exports.Leading = exports.Headline = void 0;
|
|
6
|
+
exports.Input = exports.InformationPanelContent = exports.InformationPanelBody = exports.InformationPanelHeader = exports.InformationPanelWrapper = exports.InformationPanel = exports.HorizontalTabs = exports.Tab = exports.Tabs = exports.VerticalTabs = exports.HeaderLogo = exports.HeaderButton = exports.HeaderBreadcrumbs = exports.Header = exports.defaultFooterElements = exports.Footer = exports.FileEmptyCard = exports.FileUploadCard = exports.FileUploadTemplate = exports.FileUpload = exports.Fieldset = exports.ExpandableBlock = exports.NonIdealState = exports.ErrorPage = exports.DropdownMenu = exports.Dialog = exports.generateLocalizedStrings = exports.DatePicker = exports.ComboBox = exports.ColorPalette = exports.ColorInputPanel = exports.ColorBuilder = exports.ColorSwatch = exports.ColorPicker = exports.Checkbox = exports.Carousel = exports.ButtonGroup = exports.SplitButton = exports.IdeasButton = exports.IconButton = exports.DropdownButton = exports.Button = exports.Breadcrumbs = exports.Badge = exports.Backdrop = exports.UserIconGroup = exports.AvatarGroup = exports.UserIcon = exports.Avatar = exports.Alert = void 0;
|
|
7
|
+
exports.TreeNodeExpander = exports.TreeNode = exports.Tree = exports.Tooltip = exports.ToggleSwitch = exports.ThemeProvider = exports.toaster = exports.TimePicker = exports.Tile = exports.Textarea = exports.TagContainer = exports.Tag = exports.SelectionColumn = exports.ExpanderColumn = exports.ActionColumn = exports.TablePaginator = exports.EditableCell = exports.DefaultCell = exports.FilterButtonBar = exports.BaseFilter = exports.tableFilters = exports.Table = exports.Surface = exports.StatusMessage = exports.Slider = exports.SkipToContentLink = exports.SidenavSubmenuHeader = exports.SidenavSubmenu = exports.SidenavButton = exports.SideNavigation = exports.Select = exports.RadioTileGroup = exports.RadioTile = exports.Radio = exports.ProgressRadial = exports.ProgressLinear = exports.NotificationMarker = exports.ModalContent = exports.ModalButtonBar = exports.Modal = exports.MenuItemSkeleton = exports.MenuExtraContent = exports.MenuDivider = exports.MenuItem = exports.Menu = exports.LabeledTextarea = exports.LabeledSelect = exports.InputGroup = exports.LabeledInput = exports.Label = void 0;
|
|
8
|
+
exports.Flex = exports.Icon = exports.MiddleTextTruncation = exports.ColorValue = exports.useTheme = exports.getUserColor = exports.WorkflowDiagram = exports.Stepper = exports.Wizard = exports.Text = exports.KbdKeys = exports.Kbd = exports.Code = exports.Blockquote = exports.Title = exports.Subheading = exports.Small = exports.Leading = exports.Headline = exports.Body = exports.Anchor = void 0;
|
|
9
9
|
/*---------------------------------------------------------------------------------------------
|
|
10
10
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
11
11
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -61,6 +61,8 @@ Object.defineProperty(exports, "Fieldset", { enumerable: true, get: function ()
|
|
|
61
61
|
var FileUpload_1 = require("./FileUpload");
|
|
62
62
|
Object.defineProperty(exports, "FileUpload", { enumerable: true, get: function () { return FileUpload_1.FileUpload; } });
|
|
63
63
|
Object.defineProperty(exports, "FileUploadTemplate", { enumerable: true, get: function () { return FileUpload_1.FileUploadTemplate; } });
|
|
64
|
+
Object.defineProperty(exports, "FileUploadCard", { enumerable: true, get: function () { return FileUpload_1.FileUploadCard; } });
|
|
65
|
+
Object.defineProperty(exports, "FileEmptyCard", { enumerable: true, get: function () { return FileUpload_1.FileEmptyCard; } });
|
|
64
66
|
var Footer_1 = require("./Footer");
|
|
65
67
|
Object.defineProperty(exports, "Footer", { enumerable: true, get: function () { return Footer_1.Footer; } });
|
|
66
68
|
Object.defineProperty(exports, "defaultFooterElements", { enumerable: true, get: function () { return Footer_1.defaultFooterElements; } });
|
|
@@ -30,3 +30,4 @@ __exportStar(require("./useSafeContext"), exports);
|
|
|
30
30
|
__exportStar(require("./useLatestRef"), exports);
|
|
31
31
|
__exportStar(require("./useIsomorphicLayoutEffect"), exports);
|
|
32
32
|
__exportStar(require("./useIsThemeAlreadySet"), exports);
|
|
33
|
+
__exportStar(require("./useId"), exports);
|