@itwin/itwinui-react 3.0.0-dev.6 → 3.0.0-dev.8
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 +101 -0
- package/cjs/core/Alert/Alert.d.ts +20 -9
- package/cjs/core/Alert/Alert.js +48 -10
- package/cjs/core/Avatar/Avatar.d.ts +3 -2
- package/cjs/core/Avatar/Avatar.js +21 -19
- package/cjs/core/AvatarGroup/AvatarGroup.js +3 -8
- package/cjs/core/ButtonGroup/ButtonGroup.js +41 -36
- package/cjs/core/Buttons/Button/Button.d.ts +15 -2
- package/cjs/core/Buttons/Button/Button.js +23 -9
- package/cjs/core/Buttons/DropdownButton/DropdownButton.js +1 -1
- package/cjs/core/Buttons/IconButton/IconButton.d.ts +5 -1
- package/cjs/core/Buttons/IconButton/IconButton.js +27 -38
- package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +9 -0
- package/cjs/core/Buttons/SplitButton/SplitButton.js +25 -13
- package/cjs/core/Carousel/Carousel.d.ts +6 -4
- package/cjs/core/Carousel/Carousel.js +2 -2
- package/cjs/core/Carousel/CarouselDot.js +1 -3
- package/cjs/core/Carousel/CarouselNavigation.d.ts +6 -4
- package/cjs/core/ColorPicker/ColorBuilder.js +2 -1
- package/cjs/core/ColorPicker/ColorInputPanel.js +172 -231
- package/cjs/core/ComboBox/ComboBox.js +3 -3
- package/cjs/core/ComboBox/ComboBoxDropdown.js +4 -9
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +3 -22
- package/cjs/core/ComboBox/ComboBoxInput.js +1 -1
- package/cjs/core/ComboBox/ComboBoxMenu.d.ts +2 -2
- package/cjs/core/ComboBox/ComboBoxMenu.js +5 -5
- package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +8 -6
- package/cjs/core/ComboBox/helpers.d.ts +1 -2
- package/cjs/core/DatePicker/DatePicker.d.ts +30 -8
- package/cjs/core/DatePicker/DatePicker.js +47 -6
- package/cjs/core/Dialog/Dialog.js +10 -17
- package/cjs/core/Dialog/DialogContext.d.ts +3 -4
- package/cjs/core/Dialog/DialogMain.js +5 -5
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +20 -14
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +39 -18
- package/cjs/core/FileUpload/FileUpload.d.ts +4 -0
- package/cjs/core/FileUpload/FileUpload.js +24 -3
- package/cjs/core/Header/HeaderBasicButton.js +3 -16
- package/cjs/core/Header/HeaderDropdownButton.js +1 -1
- package/cjs/core/Header/HeaderSplitButton.js +3 -4
- package/cjs/core/Input/Input.d.ts +4 -0
- package/cjs/core/Input/Input.js +2 -1
- package/cjs/core/InputGrid/InputGrid.d.ts +25 -0
- package/cjs/core/InputGrid/InputGrid.js +39 -0
- package/cjs/core/InputGrid/index.d.ts +3 -0
- package/cjs/core/InputGrid/index.js +15 -0
- package/cjs/core/InputGroup/InputGroup.d.ts +13 -0
- package/cjs/core/InputGroup/InputGroup.js +35 -9
- package/cjs/core/InputWithDecorations/InputWithDecorations.d.ts +39 -0
- package/cjs/core/InputWithDecorations/InputWithDecorations.js +81 -0
- package/cjs/core/InputWithDecorations/index.d.ts +3 -0
- package/cjs/core/InputWithDecorations/index.js +15 -0
- package/cjs/core/Label/Label.d.ts +5 -0
- package/cjs/core/Label/Label.js +2 -0
- package/cjs/core/LabeledInput/LabeledInput.d.ts +22 -16
- package/cjs/core/LabeledInput/LabeledInput.js +52 -29
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +17 -7
- package/cjs/core/LabeledSelect/LabeledSelect.js +36 -17
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +15 -5
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +12 -45
- package/cjs/core/Menu/Menu.d.ts +1 -1
- package/cjs/core/Menu/Menu.js +1 -1
- package/cjs/core/Menu/MenuDivider.d.ts +2 -1
- package/cjs/core/Menu/MenuDivider.js +1 -1
- package/cjs/core/Menu/MenuItem.d.ts +1 -1
- package/cjs/core/Menu/MenuItem.js +1 -0
- package/cjs/core/Menu/MenuItemSkeleton.d.ts +1 -1
- package/cjs/core/Menu/MenuItemSkeleton.js +0 -1
- package/cjs/core/ProgressIndicators/ProgressLinear.d.ts +4 -0
- package/cjs/core/ProgressIndicators/ProgressLinear.js +9 -1
- package/cjs/core/SearchBox/SearchBox.js +1 -1
- package/cjs/core/Select/Select.d.ts +4 -0
- package/cjs/core/Select/Select.js +12 -11
- package/cjs/core/SideNavigation/SideNavigation.d.ts +16 -0
- package/cjs/core/SideNavigation/SideNavigation.js +42 -9
- package/cjs/core/Slider/Slider.d.ts +24 -0
- package/cjs/core/Slider/Slider.js +58 -10
- package/cjs/core/Slider/Thumb.js +3 -2
- package/cjs/core/Slider/Track.d.ts +1 -1
- package/cjs/core/Slider/Track.js +17 -6
- package/cjs/core/StatusMessage/StatusMessage.d.ts +12 -2
- package/cjs/core/StatusMessage/StatusMessage.js +23 -9
- package/cjs/core/Stepper/Stepper.d.ts +26 -1
- package/cjs/core/Stepper/Stepper.js +35 -6
- package/cjs/core/Stepper/StepperStep.d.ts +17 -0
- package/cjs/core/Stepper/StepperStep.js +33 -8
- package/cjs/core/Stepper/WorkflowDiagram.d.ts +11 -1
- package/cjs/core/Stepper/WorkflowDiagram.js +23 -10
- package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +6 -1
- package/cjs/core/Stepper/WorkflowDiagramStep.js +9 -2
- package/cjs/core/Table/SubRowExpander.js +3 -1
- package/cjs/core/Table/Table.js +0 -1
- package/cjs/core/Table/TableCell.js +1 -1
- package/cjs/core/Table/TablePaginator.js +1 -3
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +6 -1
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +46 -18
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +2 -0
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -0
- package/cjs/core/Tabs/Tab.js +1 -2
- package/cjs/core/Textarea/Textarea.d.ts +7 -1
- package/cjs/core/Textarea/Textarea.js +6 -11
- package/cjs/core/ThemeProvider/ThemeContext.d.ts +1 -1
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +23 -3
- package/cjs/core/ThemeProvider/ThemeProvider.js +56 -23
- package/cjs/core/Tile/Tile.d.ts +142 -17
- package/cjs/core/Tile/Tile.js +107 -16
- package/cjs/core/Toast/Toast.d.ts +12 -4
- package/cjs/core/Toast/Toast.js +24 -13
- package/cjs/core/Tooltip/Tooltip.d.ts +35 -28
- package/cjs/core/Tooltip/Tooltip.js +116 -118
- package/cjs/core/TransferList/TransferList.js +4 -12
- package/cjs/core/Tree/TreeNode.js +1 -1
- package/cjs/core/index.d.ts +2 -0
- package/cjs/core/index.js +20 -4
- package/cjs/core/utils/components/ButtonBase.d.ts +14 -0
- package/cjs/core/utils/components/ButtonBase.js +46 -0
- package/cjs/core/utils/components/Icon.d.ts +5 -0
- package/cjs/core/utils/components/Icon.js +8 -1
- package/cjs/core/utils/components/InputContainer.d.ts +0 -1
- package/cjs/core/utils/components/InputContainer.js +14 -34
- package/cjs/core/utils/components/InputFlexContainer.d.ts +1 -0
- package/cjs/core/utils/components/InputFlexContainer.js +3 -1
- package/cjs/core/utils/components/Popover.js +5 -3
- package/cjs/core/utils/components/Portal.d.ts +27 -0
- package/cjs/core/utils/components/Portal.js +43 -0
- package/cjs/core/utils/components/VirtualScroll.js +4 -4
- package/cjs/core/utils/components/index.d.ts +2 -0
- package/cjs/core/utils/components/index.js +2 -0
- package/cjs/core/utils/functions/colors.d.ts +1 -1
- package/cjs/core/utils/functions/colors.js +1 -13
- package/cjs/core/utils/functions/index.d.ts +1 -0
- package/cjs/core/utils/functions/index.js +1 -0
- package/cjs/core/utils/functions/react.d.ts +8 -0
- package/cjs/core/utils/functions/react.js +40 -0
- package/cjs/core/utils/hooks/index.d.ts +1 -0
- package/cjs/core/utils/hooks/index.js +1 -0
- package/cjs/core/utils/hooks/useControlledState.d.ts +13 -0
- package/cjs/core/utils/hooks/useControlledState.js +39 -0
- package/cjs/core/utils/hooks/useGlobals.d.ts +1 -1
- package/cjs/styles.js +11 -35
- package/esm/core/Alert/Alert.d.ts +20 -9
- package/esm/core/Alert/Alert.js +49 -10
- package/esm/core/Avatar/Avatar.d.ts +3 -2
- package/esm/core/Avatar/Avatar.js +21 -17
- package/esm/core/AvatarGroup/AvatarGroup.js +3 -8
- package/esm/core/ButtonGroup/ButtonGroup.js +41 -36
- package/esm/core/Buttons/Button/Button.d.ts +15 -2
- package/esm/core/Buttons/Button/Button.js +18 -10
- package/esm/core/Buttons/DropdownButton/DropdownButton.js +1 -1
- package/esm/core/Buttons/IconButton/IconButton.d.ts +5 -1
- package/esm/core/Buttons/IconButton/IconButton.js +25 -37
- package/esm/core/Buttons/SplitButton/SplitButton.d.ts +9 -0
- package/esm/core/Buttons/SplitButton/SplitButton.js +31 -14
- package/esm/core/Carousel/Carousel.d.ts +6 -4
- package/esm/core/Carousel/Carousel.js +8 -3
- package/esm/core/Carousel/CarouselDot.js +2 -4
- package/esm/core/Carousel/CarouselNavigation.d.ts +6 -4
- package/esm/core/ColorPicker/ColorBuilder.js +2 -1
- package/esm/core/ColorPicker/ColorInputPanel.js +173 -232
- package/esm/core/ComboBox/ComboBox.js +3 -3
- package/esm/core/ComboBox/ComboBoxDropdown.js +4 -9
- package/esm/core/ComboBox/ComboBoxEndIcon.js +4 -25
- package/esm/core/ComboBox/ComboBoxInput.js +1 -1
- package/esm/core/ComboBox/ComboBoxMenu.d.ts +2 -2
- package/esm/core/ComboBox/ComboBoxMenu.js +5 -5
- package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxMenuItem.js +9 -7
- package/esm/core/ComboBox/helpers.d.ts +1 -2
- package/esm/core/DatePicker/DatePicker.d.ts +30 -8
- package/esm/core/DatePicker/DatePicker.js +33 -6
- package/esm/core/Dialog/Dialog.js +11 -23
- package/esm/core/Dialog/DialogContext.d.ts +3 -4
- package/esm/core/Dialog/DialogMain.js +5 -5
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +20 -14
- package/esm/core/ExpandableBlock/ExpandableBlock.js +41 -20
- package/esm/core/FileUpload/FileUpload.d.ts +4 -0
- package/esm/core/FileUpload/FileUpload.js +26 -3
- package/esm/core/Header/HeaderBasicButton.js +4 -17
- package/esm/core/Header/HeaderDropdownButton.js +1 -1
- package/esm/core/Header/HeaderSplitButton.js +9 -5
- package/esm/core/Input/Input.d.ts +4 -0
- package/esm/core/Input/Input.js +2 -1
- package/esm/core/InputGrid/InputGrid.d.ts +25 -0
- package/esm/core/InputGrid/InputGrid.js +35 -0
- package/esm/core/InputGrid/index.d.ts +3 -0
- package/esm/core/InputGrid/index.js +6 -0
- package/esm/core/InputGroup/InputGroup.d.ts +13 -0
- package/esm/core/InputGroup/InputGroup.js +34 -10
- package/esm/core/InputWithDecorations/InputWithDecorations.d.ts +39 -0
- package/esm/core/InputWithDecorations/InputWithDecorations.js +80 -0
- package/esm/core/InputWithDecorations/index.d.ts +3 -0
- package/esm/core/InputWithDecorations/index.js +6 -0
- package/esm/core/Label/Label.d.ts +5 -0
- package/esm/core/Label/Label.js +2 -0
- package/esm/core/LabeledInput/LabeledInput.d.ts +22 -16
- package/esm/core/LabeledInput/LabeledInput.js +53 -29
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +17 -7
- package/esm/core/LabeledSelect/LabeledSelect.js +37 -18
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +15 -5
- package/esm/core/LabeledTextarea/LabeledTextarea.js +14 -45
- package/esm/core/Menu/Menu.d.ts +1 -1
- package/esm/core/Menu/Menu.js +1 -1
- package/esm/core/Menu/MenuDivider.d.ts +2 -1
- package/esm/core/Menu/MenuDivider.js +1 -1
- package/esm/core/Menu/MenuItem.d.ts +1 -1
- package/esm/core/Menu/MenuItem.js +1 -0
- package/esm/core/Menu/MenuItemSkeleton.d.ts +1 -1
- package/esm/core/Menu/MenuItemSkeleton.js +0 -1
- package/esm/core/ProgressIndicators/ProgressLinear.d.ts +4 -0
- package/esm/core/ProgressIndicators/ProgressLinear.js +9 -1
- package/esm/core/SearchBox/SearchBox.js +1 -1
- package/esm/core/Select/Select.d.ts +4 -0
- package/esm/core/Select/Select.js +12 -11
- package/esm/core/SideNavigation/SideNavigation.d.ts +16 -0
- package/esm/core/SideNavigation/SideNavigation.js +33 -9
- package/esm/core/Slider/Slider.d.ts +24 -0
- package/esm/core/Slider/Slider.js +43 -10
- package/esm/core/Slider/Thumb.js +3 -2
- package/esm/core/Slider/Track.d.ts +1 -1
- package/esm/core/Slider/Track.js +14 -6
- package/esm/core/StatusMessage/StatusMessage.d.ts +12 -2
- package/esm/core/StatusMessage/StatusMessage.js +23 -16
- package/esm/core/Stepper/Stepper.d.ts +26 -1
- package/esm/core/Stepper/Stepper.js +32 -6
- package/esm/core/Stepper/StepperStep.d.ts +17 -0
- package/esm/core/Stepper/StepperStep.js +27 -8
- package/esm/core/Stepper/WorkflowDiagram.d.ts +11 -1
- package/esm/core/Stepper/WorkflowDiagram.js +10 -7
- package/esm/core/Stepper/WorkflowDiagramStep.d.ts +6 -1
- package/esm/core/Stepper/WorkflowDiagramStep.js +6 -2
- package/esm/core/Table/SubRowExpander.js +3 -1
- package/esm/core/Table/Table.js +0 -1
- package/esm/core/Table/TableCell.js +1 -1
- package/esm/core/Table/TablePaginator.js +2 -3
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +6 -1
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +45 -17
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +2 -0
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -0
- package/esm/core/Tabs/Tab.js +2 -3
- package/esm/core/Textarea/Textarea.d.ts +7 -1
- package/esm/core/Textarea/Textarea.js +6 -11
- package/esm/core/ThemeProvider/ThemeContext.d.ts +1 -1
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +23 -3
- package/esm/core/ThemeProvider/ThemeProvider.js +65 -24
- package/esm/core/Tile/Tile.d.ts +142 -17
- package/esm/core/Tile/Tile.js +107 -16
- package/esm/core/Toast/Toast.d.ts +12 -4
- package/esm/core/Toast/Toast.js +26 -13
- package/esm/core/Tooltip/Tooltip.d.ts +35 -28
- package/esm/core/Tooltip/Tooltip.js +119 -116
- package/esm/core/TransferList/TransferList.js +4 -9
- package/esm/core/Tree/TreeNode.js +1 -1
- package/esm/core/index.d.ts +2 -0
- package/esm/core/index.js +2 -0
- package/esm/core/utils/components/ButtonBase.d.ts +14 -0
- package/esm/core/utils/components/ButtonBase.js +42 -0
- package/esm/core/utils/components/Icon.d.ts +5 -0
- package/esm/core/utils/components/Icon.js +8 -1
- package/esm/core/utils/components/InputContainer.d.ts +0 -1
- package/esm/core/utils/components/InputContainer.js +14 -30
- package/esm/core/utils/components/InputFlexContainer.d.ts +1 -0
- package/esm/core/utils/components/InputFlexContainer.js +3 -1
- package/esm/core/utils/components/Popover.js +5 -3
- package/esm/core/utils/components/Portal.d.ts +27 -0
- package/esm/core/utils/components/Portal.js +36 -0
- package/esm/core/utils/components/VirtualScroll.js +4 -4
- package/esm/core/utils/components/index.d.ts +2 -0
- package/esm/core/utils/components/index.js +2 -0
- package/esm/core/utils/functions/colors.d.ts +1 -1
- package/esm/core/utils/functions/colors.js +1 -13
- package/esm/core/utils/functions/index.d.ts +1 -0
- package/esm/core/utils/functions/index.js +1 -0
- package/esm/core/utils/functions/react.d.ts +8 -0
- package/esm/core/utils/functions/react.js +35 -0
- package/esm/core/utils/hooks/index.d.ts +1 -0
- package/esm/core/utils/hooks/index.js +1 -0
- package/esm/core/utils/hooks/useControlledState.d.ts +13 -0
- package/esm/core/utils/hooks/useControlledState.js +34 -0
- package/esm/core/utils/hooks/useGlobals.d.ts +1 -1
- package/esm/styles.js +11 -35
- package/package.json +3 -3
- package/styles.css +49 -46
|
@@ -71,7 +71,6 @@ const ComboBox = (props) => {
|
|
|
71
71
|
// Refs get set in subcomponents
|
|
72
72
|
const inputRef = React.useRef(null);
|
|
73
73
|
const menuRef = React.useRef(null);
|
|
74
|
-
const toggleButtonRef = React.useRef(null);
|
|
75
74
|
const onChangeProp = (0, index_js_3.useLatestRef)(onChange);
|
|
76
75
|
const optionsRef = (0, index_js_3.useLatestRef)(options);
|
|
77
76
|
// Record to store all extra information (e.g. original indexes), where the key is the id of the option
|
|
@@ -368,7 +367,7 @@ const ComboBox = (props) => {
|
|
|
368
367
|
);
|
|
369
368
|
return React.createElement(
|
|
370
369
|
helpers_js_1.ComboBoxRefsContext.Provider,
|
|
371
|
-
{ value: { inputRef, menuRef,
|
|
370
|
+
{ value: { inputRef, menuRef, optionsExtraInfoRef } },
|
|
372
371
|
React.createElement(
|
|
373
372
|
helpers_js_1.ComboBoxActionContext.Provider,
|
|
374
373
|
{ value: dispatch },
|
|
@@ -389,12 +388,13 @@ const ComboBox = (props) => {
|
|
|
389
388
|
},
|
|
390
389
|
React.createElement(
|
|
391
390
|
ComboBoxInputContainer_js_1.ComboBoxInputContainer,
|
|
392
|
-
{
|
|
391
|
+
{ ...rest },
|
|
393
392
|
React.createElement(
|
|
394
393
|
React.Fragment,
|
|
395
394
|
null,
|
|
396
395
|
React.createElement(ComboBoxInput_js_1.ComboBoxInput, {
|
|
397
396
|
value: inputValue,
|
|
397
|
+
disabled: inputProps?.disabled,
|
|
398
398
|
...inputProps,
|
|
399
399
|
onChange: handleOnInput,
|
|
400
400
|
selectTags: isMultipleEnabled(selected, multiple)
|
|
@@ -17,7 +17,7 @@ exports.ComboBoxDropdown = React.forwardRef((props, forwardedRef) => {
|
|
|
17
17
|
const dispatch = (0, index_js_1.useSafeContext)(
|
|
18
18
|
helpers_js_1.ComboBoxActionContext,
|
|
19
19
|
);
|
|
20
|
-
const { inputRef
|
|
20
|
+
const { inputRef } = (0, index_js_1.useSafeContext)(
|
|
21
21
|
helpers_js_1.ComboBoxRefsContext,
|
|
22
22
|
);
|
|
23
23
|
// sync internal isOpen state with user's visible prop
|
|
@@ -29,14 +29,9 @@ exports.ComboBoxDropdown = React.forwardRef((props, forwardedRef) => {
|
|
|
29
29
|
return React.createElement(index_js_1.Popover, {
|
|
30
30
|
placement: 'bottom-start',
|
|
31
31
|
visible: isOpen,
|
|
32
|
-
onClickOutside: React.useCallback(
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
dispatch({ type: 'close' });
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
[dispatch, toggleButtonRef],
|
|
39
|
-
),
|
|
32
|
+
onClickOutside: React.useCallback(() => {
|
|
33
|
+
dispatch({ type: 'close' });
|
|
34
|
+
}, [dispatch]),
|
|
40
35
|
animation: 'shift-away',
|
|
41
36
|
duration: 200,
|
|
42
37
|
reference: inputRef,
|
|
@@ -9,40 +9,21 @@ const tslib_1 = require('tslib');
|
|
|
9
9
|
const classnames_1 = tslib_1.__importDefault(require('classnames'));
|
|
10
10
|
const React = tslib_1.__importStar(require('react'));
|
|
11
11
|
const index_js_1 = require('../utils/index.js');
|
|
12
|
-
const helpers_js_1 = require('./helpers.js');
|
|
13
12
|
exports.ComboBoxEndIcon = React.forwardRef((props, forwardedRef) => {
|
|
14
|
-
const {
|
|
15
|
-
className,
|
|
16
|
-
children,
|
|
17
|
-
onClick: onClickProp,
|
|
18
|
-
disabled,
|
|
19
|
-
isOpen,
|
|
20
|
-
...rest
|
|
21
|
-
} = props;
|
|
22
|
-
const dispatch = (0, index_js_1.useSafeContext)(
|
|
23
|
-
helpers_js_1.ComboBoxActionContext,
|
|
24
|
-
);
|
|
25
|
-
const { toggleButtonRef } = (0, index_js_1.useSafeContext)(
|
|
26
|
-
helpers_js_1.ComboBoxRefsContext,
|
|
27
|
-
);
|
|
28
|
-
const refs = (0, index_js_1.useMergedRefs)(toggleButtonRef, forwardedRef);
|
|
13
|
+
const { className, children, disabled, isOpen, ...rest } = props;
|
|
29
14
|
return React.createElement(
|
|
30
|
-
index_js_1.
|
|
15
|
+
index_js_1.Icon,
|
|
31
16
|
{
|
|
32
17
|
as: 'span',
|
|
33
|
-
ref:
|
|
18
|
+
ref: forwardedRef,
|
|
34
19
|
className: (0, classnames_1.default)(
|
|
35
20
|
'iui-end-icon',
|
|
36
21
|
{
|
|
37
|
-
'iui-actionable': !disabled,
|
|
38
22
|
'iui-disabled': disabled,
|
|
39
23
|
'iui-open': isOpen,
|
|
40
24
|
},
|
|
41
25
|
className,
|
|
42
26
|
),
|
|
43
|
-
onClick: (0, index_js_1.mergeEventHandlers)(onClickProp, () => {
|
|
44
|
-
dispatch({ type: isOpen ? 'close' : 'open' });
|
|
45
|
-
}),
|
|
46
27
|
...rest,
|
|
47
28
|
},
|
|
48
29
|
children ??
|
|
@@ -195,7 +195,7 @@ exports.ComboBoxInput = React.forwardRef((props, forwardedRef) => {
|
|
|
195
195
|
spellCheck: false,
|
|
196
196
|
autoCapitalize: 'none',
|
|
197
197
|
autoCorrect: 'off',
|
|
198
|
-
style: multiple ? {
|
|
198
|
+
style: multiple ? { paddingInlineStart: tagContainerWidth + 18 } : {},
|
|
199
199
|
'aria-describedby': multiple ? `${id}-selected-live` : undefined,
|
|
200
200
|
...rest,
|
|
201
201
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Menu } from '../Menu/index.js';
|
|
3
3
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
|
-
type ComboBoxMenuProps = Omit<React.ComponentPropsWithoutRef<typeof Menu>, 'onClick'> & React.ComponentPropsWithoutRef<'
|
|
5
|
-
export declare const ComboBoxMenu: PolymorphicForwardRefComponent<"
|
|
4
|
+
type ComboBoxMenuProps = Omit<React.ComponentPropsWithoutRef<typeof Menu>, 'onClick'> & React.ComponentPropsWithoutRef<'div'>;
|
|
5
|
+
export declare const ComboBoxMenu: PolymorphicForwardRefComponent<"div", ComboBoxMenuProps>;
|
|
6
6
|
export {};
|
|
@@ -48,11 +48,11 @@ const VirtualizedComboBoxMenu = React.forwardRef(
|
|
|
48
48
|
scrollToIndex: focusedVisibleIndex,
|
|
49
49
|
});
|
|
50
50
|
const surfaceStyles = {
|
|
51
|
-
minWidth,
|
|
51
|
+
minInlineSize: minWidth,
|
|
52
52
|
// set as constant because we don't want it shifting when items are unmounted
|
|
53
|
-
|
|
53
|
+
maxInlineSize: minWidth,
|
|
54
54
|
// max-height must be on the outermost element for virtual scroll
|
|
55
|
-
|
|
55
|
+
maxBlockSize: 'calc((var(--iui-component-height) - 1px) * 8.5)',
|
|
56
56
|
overflowY: isOverflowOverlaySupported() ? 'overlay' : 'auto',
|
|
57
57
|
...style,
|
|
58
58
|
};
|
|
@@ -94,8 +94,8 @@ exports.ComboBoxMenu = React.forwardRef((props, forwardedRef) => {
|
|
|
94
94
|
const refs = (0, index_js_3.useMergedRefs)(menuRef, forwardedRef);
|
|
95
95
|
const styles = React.useMemo(
|
|
96
96
|
() => ({
|
|
97
|
-
minWidth,
|
|
98
|
-
|
|
97
|
+
minInlineSize: minWidth,
|
|
98
|
+
maxInlineSize: `min(${minWidth * 2}px, 90vw)`,
|
|
99
99
|
}),
|
|
100
100
|
[minWidth],
|
|
101
101
|
);
|
|
@@ -4,5 +4,5 @@ import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
|
4
4
|
type ComboBoxMenuItemProps = MenuItemProps & {
|
|
5
5
|
index: number;
|
|
6
6
|
};
|
|
7
|
-
export declare const ComboBoxMenuItem: React.MemoExoticComponent<PolymorphicForwardRefComponent<"
|
|
7
|
+
export declare const ComboBoxMenuItem: React.MemoExoticComponent<PolymorphicForwardRefComponent<"div", ComboBoxMenuItemProps>>;
|
|
8
8
|
export {};
|
|
@@ -37,6 +37,7 @@ exports.ComboBoxMenuItem = React.memo(
|
|
|
37
37
|
return React.createElement(
|
|
38
38
|
ListItem_js_1.ListItem,
|
|
39
39
|
{
|
|
40
|
+
as: 'div',
|
|
40
41
|
actionable: true,
|
|
41
42
|
size: size,
|
|
42
43
|
active: isSelected,
|
|
@@ -68,12 +69,13 @@ exports.ComboBoxMenuItem = React.memo(
|
|
|
68
69
|
sublabel,
|
|
69
70
|
),
|
|
70
71
|
),
|
|
71
|
-
endIcon
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
endIcon ||
|
|
73
|
+
(isSelected &&
|
|
74
|
+
React.createElement(
|
|
75
|
+
ListItem_js_1.ListItem.Icon,
|
|
76
|
+
{ as: 'span', 'aria-hidden': true },
|
|
77
|
+
endIcon ?? React.createElement(index_js_1.SvgCheckmark, null),
|
|
78
|
+
)),
|
|
77
79
|
);
|
|
78
80
|
}),
|
|
79
81
|
);
|
|
@@ -25,8 +25,7 @@ export declare const comboBoxReducer: (state: {
|
|
|
25
25
|
};
|
|
26
26
|
export declare const ComboBoxRefsContext: React.Context<{
|
|
27
27
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
28
|
-
menuRef: React.RefObject<
|
|
29
|
-
toggleButtonRef: React.RefObject<HTMLSpanElement>;
|
|
28
|
+
menuRef: React.RefObject<HTMLElement>;
|
|
30
29
|
optionsExtraInfoRef: React.MutableRefObject<Record<string, {
|
|
31
30
|
__originalIndex: number;
|
|
32
31
|
}>>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
3
|
import type { TimePickerProps } from '../TimePicker/TimePicker.js';
|
|
4
|
+
export type DatePickerLocalizedNames = {
|
|
5
|
+
[key in 'months' | 'shortDays' | 'days']: string[];
|
|
6
|
+
};
|
|
3
7
|
/**
|
|
4
8
|
* Generate localized months and days strings using `Intl.DateTimeFormat` for passed locale to use in DatePicker component.
|
|
5
9
|
* If locale is not passed, browser locale will be used.
|
|
6
10
|
*/
|
|
7
|
-
export declare const generateLocalizedStrings: (locale?: string) =>
|
|
8
|
-
months: string[];
|
|
9
|
-
shortDays: string[];
|
|
10
|
-
days: string[];
|
|
11
|
-
};
|
|
11
|
+
export declare const generateLocalizedStrings: (locale?: string) => DatePickerLocalizedNames;
|
|
12
12
|
export type DateRangePickerProps = {
|
|
13
13
|
/**
|
|
14
14
|
* Enable date range support.
|
|
@@ -42,9 +42,7 @@ type DatePickerProps = {
|
|
|
42
42
|
* Pass localized week days (start from sunday) and months.
|
|
43
43
|
* Use helper function `generateLocalizedStrings` to generate strings using `Intl.DateTimeFormat`.
|
|
44
44
|
*/
|
|
45
|
-
localizedNames?:
|
|
46
|
-
[key in 'months' | 'shortDays' | 'days']: string[];
|
|
47
|
-
};
|
|
45
|
+
localizedNames?: DatePickerLocalizedNames;
|
|
48
46
|
/**
|
|
49
47
|
* Set focus on selected day or today.
|
|
50
48
|
* @default false
|
|
@@ -60,6 +58,30 @@ type DatePickerProps = {
|
|
|
60
58
|
* @default false
|
|
61
59
|
*/
|
|
62
60
|
showYearSelection?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Allows props to be passed for calendar month year, referring to the div that wraps around the month/year and the next/previous buttons.
|
|
63
|
+
*/
|
|
64
|
+
monthYearProps?: React.ComponentProps<'div'>;
|
|
65
|
+
/**
|
|
66
|
+
* Allows props to be passed for only month, referring to span that wraps around the month title.
|
|
67
|
+
*/
|
|
68
|
+
monthProps?: React.ComponentProps<'span'>;
|
|
69
|
+
/**
|
|
70
|
+
* Allows props to be passed for week days, referring to div that wraps around the week day title.
|
|
71
|
+
*/
|
|
72
|
+
weekDayProps?: React.ComponentProps<'div'>;
|
|
73
|
+
/**
|
|
74
|
+
* Allows props to be passed for individual day , referring to div element the wraps around single day number.
|
|
75
|
+
*/
|
|
76
|
+
dayProps?: React.ComponentProps<'div'>;
|
|
77
|
+
/**
|
|
78
|
+
* Allows props to be passed for calendar, referring to div that is used for listbox for wraping days and weeks.
|
|
79
|
+
*/
|
|
80
|
+
calendarProps?: React.ComponentProps<'div'>;
|
|
81
|
+
/**
|
|
82
|
+
* Allows props to be passed for weeks, referring to div that wraps around weeks.
|
|
83
|
+
*/
|
|
84
|
+
weekProps?: React.ComponentProps<'div'>;
|
|
63
85
|
/**
|
|
64
86
|
* Will disable dates for which this function returns true.
|
|
65
87
|
* Disabled dates cannot be selected.
|
|
@@ -139,6 +139,12 @@ exports.DatePicker = React.forwardRef((props, forwardedRef) => {
|
|
|
139
139
|
enableRangeSelect = false,
|
|
140
140
|
startDate,
|
|
141
141
|
endDate,
|
|
142
|
+
monthYearProps,
|
|
143
|
+
calendarProps,
|
|
144
|
+
monthProps,
|
|
145
|
+
weekDayProps,
|
|
146
|
+
dayProps,
|
|
147
|
+
weekProps,
|
|
142
148
|
isDateDisabled,
|
|
143
149
|
...rest
|
|
144
150
|
} = props;
|
|
@@ -407,6 +413,7 @@ exports.DatePicker = React.forwardRef((props, forwardedRef) => {
|
|
|
407
413
|
}
|
|
408
414
|
return dayClass;
|
|
409
415
|
};
|
|
416
|
+
const dateTableId = (0, index_js_1.useId)();
|
|
410
417
|
return React.createElement(
|
|
411
418
|
index_js_1.Box,
|
|
412
419
|
{
|
|
@@ -419,7 +426,14 @@ exports.DatePicker = React.forwardRef((props, forwardedRef) => {
|
|
|
419
426
|
null,
|
|
420
427
|
React.createElement(
|
|
421
428
|
index_js_1.Box,
|
|
422
|
-
{
|
|
429
|
+
{
|
|
430
|
+
as: 'div',
|
|
431
|
+
...monthYearProps,
|
|
432
|
+
className: (0, classnames_1.default)(
|
|
433
|
+
'iui-calendar-month-year',
|
|
434
|
+
monthYearProps?.className,
|
|
435
|
+
),
|
|
436
|
+
},
|
|
423
437
|
showYearSelection &&
|
|
424
438
|
React.createElement(
|
|
425
439
|
index_js_2.IconButton,
|
|
@@ -448,8 +462,13 @@ exports.DatePicker = React.forwardRef((props, forwardedRef) => {
|
|
|
448
462
|
index_js_1.Box,
|
|
449
463
|
{
|
|
450
464
|
as: 'span',
|
|
451
|
-
|
|
465
|
+
id: dateTableId,
|
|
452
466
|
title: monthNames[displayedMonthIndex],
|
|
467
|
+
...monthProps,
|
|
468
|
+
className: (0, classnames_1.default)(
|
|
469
|
+
'iui-calendar-month',
|
|
470
|
+
monthProps?.className,
|
|
471
|
+
),
|
|
453
472
|
},
|
|
454
473
|
monthNames[displayedMonthIndex],
|
|
455
474
|
),
|
|
@@ -480,20 +499,37 @@ exports.DatePicker = React.forwardRef((props, forwardedRef) => {
|
|
|
480
499
|
),
|
|
481
500
|
React.createElement(
|
|
482
501
|
index_js_1.Box,
|
|
483
|
-
{
|
|
502
|
+
{
|
|
503
|
+
as: 'div',
|
|
504
|
+
...weekDayProps,
|
|
505
|
+
className: (0, classnames_1.default)(
|
|
506
|
+
'iui-calendar-weekdays',
|
|
507
|
+
weekDayProps?.className,
|
|
508
|
+
),
|
|
509
|
+
},
|
|
484
510
|
shortDays.map((day, index) =>
|
|
485
511
|
React.createElement('div', { key: day, title: longDays[index] }, day),
|
|
486
512
|
),
|
|
487
513
|
),
|
|
488
514
|
React.createElement(
|
|
489
515
|
'div',
|
|
490
|
-
{
|
|
516
|
+
{
|
|
517
|
+
onKeyDown: handleCalendarKeyDown,
|
|
518
|
+
role: 'listbox',
|
|
519
|
+
'aria-labelledby': dateTableId,
|
|
520
|
+
...calendarProps,
|
|
521
|
+
},
|
|
491
522
|
weeks.map((weekDays, weekIndex) => {
|
|
492
523
|
return React.createElement(
|
|
493
524
|
index_js_1.Box,
|
|
494
525
|
{
|
|
526
|
+
as: 'div',
|
|
495
527
|
key: `week-${displayedMonthIndex}-${weekIndex}`,
|
|
496
|
-
|
|
528
|
+
...weekProps,
|
|
529
|
+
className: (0, classnames_1.default)(
|
|
530
|
+
'iui-calendar-week',
|
|
531
|
+
weekProps?.className,
|
|
532
|
+
),
|
|
497
533
|
},
|
|
498
534
|
weekDays.map((weekDay, dayIndex) => {
|
|
499
535
|
const dateValue = weekDay.getDate();
|
|
@@ -501,8 +537,8 @@ exports.DatePicker = React.forwardRef((props, forwardedRef) => {
|
|
|
501
537
|
return React.createElement(
|
|
502
538
|
index_js_1.Box,
|
|
503
539
|
{
|
|
540
|
+
as: 'div',
|
|
504
541
|
key: `day-${displayedMonthIndex}-${dayIndex}`,
|
|
505
|
-
className: getDayClass(weekDay),
|
|
506
542
|
onClick: () => !isDisabled && onDayClick(weekDay),
|
|
507
543
|
role: 'option',
|
|
508
544
|
tabIndex: isSameDay(weekDay, focusedDay) ? 0 : -1,
|
|
@@ -511,6 +547,11 @@ exports.DatePicker = React.forwardRef((props, forwardedRef) => {
|
|
|
511
547
|
isSameDay(weekDay, focusedDay) &&
|
|
512
548
|
needFocus.current &&
|
|
513
549
|
element?.focus(),
|
|
550
|
+
...dayProps,
|
|
551
|
+
className: (0, classnames_1.default)(
|
|
552
|
+
getDayClass(weekDay),
|
|
553
|
+
dayProps?.className,
|
|
554
|
+
),
|
|
514
555
|
},
|
|
515
556
|
dateValue,
|
|
516
557
|
);
|
|
@@ -7,7 +7,6 @@ const tslib_1 = require('tslib');
|
|
|
7
7
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
8
|
*--------------------------------------------------------------------------------------------*/
|
|
9
9
|
const React = tslib_1.__importStar(require('react'));
|
|
10
|
-
const ReactDOM = tslib_1.__importStar(require('react-dom'));
|
|
11
10
|
const classnames_1 = tslib_1.__importDefault(require('classnames'));
|
|
12
11
|
const DialogTitleBar_js_1 = require('./DialogTitleBar.js');
|
|
13
12
|
const DialogContent_js_1 = require('./DialogContent.js');
|
|
@@ -35,21 +34,6 @@ const DialogComponent = React.forwardRef((props, ref) => {
|
|
|
35
34
|
...rest
|
|
36
35
|
} = props;
|
|
37
36
|
const dialogRootRef = React.useRef(null);
|
|
38
|
-
const context = (0, index_js_1.useGlobals)();
|
|
39
|
-
const isClient = (0, index_js_1.useIsClient)();
|
|
40
|
-
const portalTo =
|
|
41
|
-
typeof portal !== 'boolean'
|
|
42
|
-
? portal.to
|
|
43
|
-
: portal
|
|
44
|
-
? context?.portalContainerRef?.current ??
|
|
45
|
-
(0, index_js_1.getDocument)()?.body
|
|
46
|
-
: null;
|
|
47
|
-
const dialog = React.createElement(index_js_1.Box, {
|
|
48
|
-
className: (0, classnames_1.default)('iui-dialog-wrapper', className),
|
|
49
|
-
'data-iui-relative': relativeTo === 'container',
|
|
50
|
-
ref: (0, index_js_1.useMergedRefs)(ref, dialogRootRef),
|
|
51
|
-
...rest,
|
|
52
|
-
});
|
|
53
37
|
return React.createElement(
|
|
54
38
|
DialogContext_js_1.DialogContext.Provider,
|
|
55
39
|
{
|
|
@@ -69,7 +53,16 @@ const DialogComponent = React.forwardRef((props, ref) => {
|
|
|
69
53
|
placement,
|
|
70
54
|
},
|
|
71
55
|
},
|
|
72
|
-
|
|
56
|
+
React.createElement(
|
|
57
|
+
index_js_1.Portal,
|
|
58
|
+
{ portal: portal },
|
|
59
|
+
React.createElement(index_js_1.Box, {
|
|
60
|
+
className: (0, classnames_1.default)('iui-dialog-wrapper', className),
|
|
61
|
+
'data-iui-relative': relativeTo === 'container',
|
|
62
|
+
ref: (0, index_js_1.useMergedRefs)(ref, dialogRootRef),
|
|
63
|
+
...rest,
|
|
64
|
+
}),
|
|
65
|
+
),
|
|
73
66
|
);
|
|
74
67
|
});
|
|
75
68
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PortalProps } from '../utils/index.js';
|
|
2
3
|
export type DialogContextProps = {
|
|
3
4
|
/**
|
|
4
5
|
* Flag whether dialog should be shown.
|
|
@@ -67,11 +68,9 @@ export type DialogContextProps = {
|
|
|
67
68
|
*
|
|
68
69
|
* Can be set to an object with a `to` property to portal into a specific element.
|
|
69
70
|
*
|
|
70
|
-
*
|
|
71
|
+
* Defaults to false if using `Dialog` and true if using `Modal`.
|
|
71
72
|
*/
|
|
72
|
-
portal?:
|
|
73
|
-
to: HTMLElement;
|
|
74
|
-
};
|
|
73
|
+
portal?: PortalProps['portal'];
|
|
75
74
|
/**
|
|
76
75
|
* Dialog root ref. For internal use.
|
|
77
76
|
*/
|
|
@@ -122,10 +122,10 @@ exports.DialogMain = React.forwardRef((props, ref) => {
|
|
|
122
122
|
);
|
|
123
123
|
setStyle((oldStyle) => ({
|
|
124
124
|
...oldStyle,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
inlineSize: rect?.width,
|
|
126
|
+
blockSize: rect?.height,
|
|
127
|
+
insetInlineStart: dialogRef.current?.offsetLeft,
|
|
128
|
+
insetBlockStart: dialogRef.current?.offsetTop,
|
|
129
129
|
transform: `translate(${translateX}px,${translateY}px)`,
|
|
130
130
|
}));
|
|
131
131
|
}, [isDraggable, isOpen]);
|
|
@@ -167,7 +167,7 @@ exports.DialogMain = React.forwardRef((props, ref) => {
|
|
|
167
167
|
onResizeStart: () => {
|
|
168
168
|
if (!hasBeenResized.current) {
|
|
169
169
|
hasBeenResized.current = true;
|
|
170
|
-
setResizeStyle({
|
|
170
|
+
setResizeStyle({ maxInlineSize: '100%' });
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
onResizeEnd: setResizeStyle,
|
|
@@ -36,9 +36,11 @@ type ExpandableBlockOwnProps = {
|
|
|
36
36
|
*/
|
|
37
37
|
disabled?: boolean;
|
|
38
38
|
};
|
|
39
|
-
type
|
|
39
|
+
type ExpandableBlockTriggerOwnProps = {
|
|
40
40
|
label?: React.ReactNode;
|
|
41
|
+
caption?: React.ReactNode;
|
|
41
42
|
expandIcon?: React.ReactNode;
|
|
43
|
+
endIcon?: React.ReactNode;
|
|
42
44
|
};
|
|
43
45
|
type ExpandableBlockContentOwnProps = {
|
|
44
46
|
innerProps?: React.ComponentPropsWithoutRef<'div'>;
|
|
@@ -46,29 +48,32 @@ type ExpandableBlockContentOwnProps = {
|
|
|
46
48
|
/**
|
|
47
49
|
* Expandable block with customizable Title, Caption, Content and EndIcon subcomponents.
|
|
48
50
|
* @example
|
|
49
|
-
* <ExpandableBlock>
|
|
50
|
-
* <ExpandableBlock.
|
|
51
|
+
* <ExpandableBlock.Wrapper>
|
|
52
|
+
* <ExpandableBlock.Trigger>
|
|
51
53
|
* <ExpandableBlock.ExpandIcon/>
|
|
52
54
|
* <ExpandableBlock.LabelArea>
|
|
53
55
|
* <ExpandableBlock.Title/>
|
|
54
56
|
* <ExpandableBlock.Caption/>
|
|
55
57
|
* </ExpandableBlock.LabelArea>
|
|
56
58
|
* <ExpandableBlock.EndIcon/>
|
|
57
|
-
* </ExpandableBlock.
|
|
59
|
+
* </ExpandableBlock.Trigger>
|
|
58
60
|
* <ExpandableBlock.Content/>
|
|
59
|
-
* </ExpandableBlock>
|
|
61
|
+
* </ExpandableBlock.Wrapper>
|
|
60
62
|
*/
|
|
61
|
-
export declare const ExpandableBlock: PolymorphicForwardRefComponent<"div", ExpandableBlockOwnProps
|
|
63
|
+
export declare const ExpandableBlock: PolymorphicForwardRefComponent<"div", ExpandableBlockOwnProps & {
|
|
64
|
+
title?: React.ReactNode;
|
|
65
|
+
} & Pick<ExpandableBlockTriggerOwnProps, "caption" | "endIcon">> & {
|
|
66
|
+
Wrapper: PolymorphicForwardRefComponent<"div", ExpandableBlockOwnProps>;
|
|
62
67
|
/**
|
|
63
68
|
* `Header` container that contains `ExpandIcon`, `LabelArea` and `EndIcon` subcomponents
|
|
64
69
|
* @example
|
|
65
|
-
* <ExpandableBlock.
|
|
70
|
+
* <ExpandableBlock.Trigger>
|
|
66
71
|
* <ExpandableBlock.ExpandIcon/>
|
|
67
72
|
* <ExpandableBlock.LabelArea/>
|
|
68
73
|
* <ExpandableBlock.EndIcon/>
|
|
69
|
-
* </ExpandableBlock.
|
|
74
|
+
* </ExpandableBlock.Trigger>
|
|
70
75
|
*/
|
|
71
|
-
|
|
76
|
+
Trigger: PolymorphicForwardRefComponent<"button", ExpandableBlockTriggerOwnProps>;
|
|
72
77
|
/**
|
|
73
78
|
* The expanding icon on the left of header
|
|
74
79
|
*/
|
|
@@ -94,24 +99,25 @@ export declare const ExpandableBlock: PolymorphicForwardRefComponent<"div", Expa
|
|
|
94
99
|
* Svg icon displayed at the end of the main text.
|
|
95
100
|
* Will override status icon if specified. Used inside `Header` subcomponent.
|
|
96
101
|
* @example
|
|
97
|
-
* <ExpandableBlock.
|
|
102
|
+
* <ExpandableBlock.Trigger>
|
|
98
103
|
* <ExpandableBlock.EndIcon> <SvgIcon/> </ExpandableBlock.EndIcon>
|
|
99
|
-
* <ExpandableBlock.
|
|
104
|
+
* <ExpandableBlock.Trigger/>
|
|
100
105
|
*/
|
|
101
106
|
EndIcon: PolymorphicForwardRefComponent<"span", Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
102
107
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
103
|
-
}, "fill" | "as" | "key" | "size" | keyof React.HTMLAttributes<HTMLSpanElement
|
|
108
|
+
}, "fill" | "as" | "key" | "size" | keyof React.HTMLAttributes<HTMLSpanElement> | "padded"> & {
|
|
104
109
|
size?: "small" | "large" | "auto" | "medium" | import("../utils/types.js").AnyString | undefined;
|
|
105
110
|
fill?: "default" | "informational" | "negative" | "positive" | "warning" | import("../utils/types.js").AnyString | undefined;
|
|
111
|
+
padded?: boolean | undefined;
|
|
106
112
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
107
113
|
as?: "span" | undefined;
|
|
108
114
|
}, "ref">>;
|
|
109
115
|
/**
|
|
110
116
|
* Content shown in the block's body when fully expanded.
|
|
111
117
|
* @example
|
|
112
|
-
* <ExpandableBlock>
|
|
118
|
+
* <ExpandableBlock.Wrapper>
|
|
113
119
|
* <ExpandableBlock.Content> Content </ExpandableBlock.Content>
|
|
114
|
-
* </ExpandableBlock>
|
|
120
|
+
* </ExpandableBlock.Wrapper>
|
|
115
121
|
*/
|
|
116
122
|
Content: PolymorphicForwardRefComponent<"div", ExpandableBlockContentOwnProps>;
|
|
117
123
|
};
|