@itwin/itwinui-react 3.0.0-dev.12 → 3.0.0-dev.14
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 +43 -0
- package/cjs/core/Carousel/Carousel.d.ts +12 -5
- package/cjs/core/Carousel/Carousel.js +9 -39
- package/cjs/core/Carousel/CarouselContext.d.ts +0 -4
- package/cjs/core/Carousel/CarouselDot.js +1 -1
- package/cjs/core/Carousel/CarouselDotsList.js +26 -2
- package/cjs/core/Carousel/CarouselNavigation.d.ts +1 -1
- package/cjs/core/Carousel/CarouselNavigation.js +4 -17
- package/cjs/core/Carousel/CarouselSlide.d.ts +1 -1
- package/cjs/core/Carousel/CarouselSlide.js +12 -2
- package/cjs/core/Carousel/CarouselSlider.d.ts +1 -1
- package/cjs/core/Carousel/CarouselSlider.js +2 -2
- package/cjs/core/ColorPicker/ColorBuilder.js +2 -0
- package/cjs/core/ColorPicker/ColorInputPanel.js +24 -4
- package/cjs/core/ColorPicker/ColorPalette.js +2 -80
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.js +25 -15
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/cjs/core/LabeledSelect/LabeledSelect.js +3 -3
- package/cjs/core/Select/Select.d.ts +1 -1
- package/cjs/core/Select/Select.js +6 -4
- package/cjs/core/Slider/Slider.d.ts +2 -6
- package/cjs/core/Slider/Slider.js +8 -22
- package/cjs/core/Slider/Thumb.d.ts +1 -2
- package/cjs/core/Slider/Thumb.js +1 -5
- package/cjs/core/Tabs/Tabs.d.ts +222 -52
- package/cjs/core/Tabs/Tabs.js +429 -375
- package/cjs/core/ThemeProvider/ThemeProvider.js +3 -1
- package/cjs/core/Tile/Tile.js +11 -10
- package/cjs/core/utils/hooks/useOverflow.js +3 -1
- package/cjs/index.d.ts +1 -2
- package/cjs/index.js +1 -2
- package/cjs/styles.js +10 -10
- package/esm/core/Carousel/Carousel.d.ts +12 -5
- package/esm/core/Carousel/Carousel.js +9 -39
- package/esm/core/Carousel/CarouselContext.d.ts +0 -4
- package/esm/core/Carousel/CarouselDot.js +1 -1
- package/esm/core/Carousel/CarouselDotsList.js +26 -2
- package/esm/core/Carousel/CarouselNavigation.d.ts +1 -1
- package/esm/core/Carousel/CarouselNavigation.js +5 -22
- package/esm/core/Carousel/CarouselSlide.d.ts +1 -1
- package/esm/core/Carousel/CarouselSlide.js +15 -3
- package/esm/core/Carousel/CarouselSlider.d.ts +1 -1
- package/esm/core/Carousel/CarouselSlider.js +2 -2
- package/esm/core/ColorPicker/ColorBuilder.js +2 -0
- package/esm/core/ColorPicker/ColorInputPanel.js +25 -5
- package/esm/core/ColorPicker/ColorPalette.js +3 -83
- package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/esm/core/ColorPicker/ColorSwatch.js +18 -12
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/esm/core/LabeledSelect/LabeledSelect.js +3 -2
- package/esm/core/Select/Select.d.ts +1 -1
- package/esm/core/Select/Select.js +3 -3
- package/esm/core/Slider/Slider.d.ts +2 -6
- package/esm/core/Slider/Slider.js +8 -19
- package/esm/core/Slider/Thumb.d.ts +1 -2
- package/esm/core/Slider/Thumb.js +1 -5
- package/esm/core/Tabs/Tabs.d.ts +222 -52
- package/esm/core/Tabs/Tabs.js +424 -368
- package/esm/core/ThemeProvider/ThemeProvider.js +3 -1
- package/esm/core/Tile/Tile.js +11 -10
- package/esm/core/utils/hooks/useOverflow.js +3 -1
- package/esm/index.d.ts +1 -2
- package/esm/index.js +1 -2
- package/esm/styles.js +10 -10
- package/package.json +2 -2
- package/styles.css +33 -47
- package/cjs/core/Tabs/Tab.d.ts +0 -40
- package/cjs/core/Tabs/Tab.js +0 -65
- package/esm/core/Tabs/Tab.d.ts +0 -40
- package/esm/core/Tabs/Tab.js +0 -57
package/cjs/core/Tabs/Tab.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
-
type TabProps = {
|
|
4
|
-
/**
|
|
5
|
-
* The main label shown in the tab.
|
|
6
|
-
*/
|
|
7
|
-
label?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Secondary label shown below the main label.
|
|
10
|
-
*/
|
|
11
|
-
sublabel?: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Svg icon shown before the labels.
|
|
14
|
-
*/
|
|
15
|
-
startIcon?: JSX.Element;
|
|
16
|
-
/**
|
|
17
|
-
* Control whether the tab is disabled.
|
|
18
|
-
*/
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Custom content appended to the tab.
|
|
22
|
-
*/
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Whether the tab has active styling.
|
|
26
|
-
*
|
|
27
|
-
* This will be automatically set by the parent `Tabs` component.
|
|
28
|
-
*/
|
|
29
|
-
active?: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Individual tab component to be used in the `labels` prop of `Tabs`.
|
|
33
|
-
* @example
|
|
34
|
-
* const tabs = [
|
|
35
|
-
* <Tab label='Label 1' sublabel='Description 1' />,
|
|
36
|
-
* <Tab label='Label 2' startIcon={<SvgPlaceholder />} />,
|
|
37
|
-
* ];
|
|
38
|
-
*/
|
|
39
|
-
export declare const Tab: PolymorphicForwardRefComponent<"button", TabProps>;
|
|
40
|
-
export default Tab;
|
package/cjs/core/Tabs/Tab.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
exports.Tab = void 0;
|
|
4
|
-
const tslib_1 = require('tslib');
|
|
5
|
-
/*---------------------------------------------------------------------------------------------
|
|
6
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
7
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
8
|
-
*--------------------------------------------------------------------------------------------*/
|
|
9
|
-
const classnames_1 = tslib_1.__importDefault(require('classnames'));
|
|
10
|
-
const React = tslib_1.__importStar(require('react'));
|
|
11
|
-
const index_js_1 = require('../utils/index.js');
|
|
12
|
-
/**
|
|
13
|
-
* Individual tab component to be used in the `labels` prop of `Tabs`.
|
|
14
|
-
* @example
|
|
15
|
-
* const tabs = [
|
|
16
|
-
* <Tab label='Label 1' sublabel='Description 1' />,
|
|
17
|
-
* <Tab label='Label 2' startIcon={<SvgPlaceholder />} />,
|
|
18
|
-
* ];
|
|
19
|
-
*/
|
|
20
|
-
exports.Tab = React.forwardRef((props, forwardedRef) => {
|
|
21
|
-
const {
|
|
22
|
-
label,
|
|
23
|
-
sublabel,
|
|
24
|
-
startIcon,
|
|
25
|
-
children,
|
|
26
|
-
active = false,
|
|
27
|
-
className,
|
|
28
|
-
...rest
|
|
29
|
-
} = props;
|
|
30
|
-
return React.createElement(
|
|
31
|
-
index_js_1.ButtonBase,
|
|
32
|
-
{
|
|
33
|
-
className: (0, classnames_1.default)(
|
|
34
|
-
'iui-tab',
|
|
35
|
-
{ 'iui-active': active },
|
|
36
|
-
className,
|
|
37
|
-
),
|
|
38
|
-
role: 'tab',
|
|
39
|
-
tabIndex: -1,
|
|
40
|
-
ref: forwardedRef,
|
|
41
|
-
...rest,
|
|
42
|
-
},
|
|
43
|
-
!!startIcon
|
|
44
|
-
? React.createElement(
|
|
45
|
-
index_js_1.Box,
|
|
46
|
-
{ as: 'span', className: 'iui-tab-icon', 'aria-hidden': true },
|
|
47
|
-
startIcon,
|
|
48
|
-
)
|
|
49
|
-
: null,
|
|
50
|
-
label &&
|
|
51
|
-
React.createElement(
|
|
52
|
-
index_js_1.Box,
|
|
53
|
-
{ as: 'span', className: 'iui-tab-label' },
|
|
54
|
-
React.createElement('div', null, label),
|
|
55
|
-
sublabel &&
|
|
56
|
-
React.createElement(
|
|
57
|
-
index_js_1.Box,
|
|
58
|
-
{ className: 'iui-tab-description' },
|
|
59
|
-
sublabel,
|
|
60
|
-
),
|
|
61
|
-
),
|
|
62
|
-
children,
|
|
63
|
-
);
|
|
64
|
-
});
|
|
65
|
-
exports.default = exports.Tab;
|
package/esm/core/Tabs/Tab.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
-
type TabProps = {
|
|
4
|
-
/**
|
|
5
|
-
* The main label shown in the tab.
|
|
6
|
-
*/
|
|
7
|
-
label?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Secondary label shown below the main label.
|
|
10
|
-
*/
|
|
11
|
-
sublabel?: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Svg icon shown before the labels.
|
|
14
|
-
*/
|
|
15
|
-
startIcon?: JSX.Element;
|
|
16
|
-
/**
|
|
17
|
-
* Control whether the tab is disabled.
|
|
18
|
-
*/
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Custom content appended to the tab.
|
|
22
|
-
*/
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Whether the tab has active styling.
|
|
26
|
-
*
|
|
27
|
-
* This will be automatically set by the parent `Tabs` component.
|
|
28
|
-
*/
|
|
29
|
-
active?: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Individual tab component to be used in the `labels` prop of `Tabs`.
|
|
33
|
-
* @example
|
|
34
|
-
* const tabs = [
|
|
35
|
-
* <Tab label='Label 1' sublabel='Description 1' />,
|
|
36
|
-
* <Tab label='Label 2' startIcon={<SvgPlaceholder />} />,
|
|
37
|
-
* ];
|
|
38
|
-
*/
|
|
39
|
-
export declare const Tab: PolymorphicForwardRefComponent<"button", TabProps>;
|
|
40
|
-
export default Tab;
|
package/esm/core/Tabs/Tab.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import cx from 'classnames';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import { Box, ButtonBase } from '../utils/index.js';
|
|
8
|
-
/**
|
|
9
|
-
* Individual tab component to be used in the `labels` prop of `Tabs`.
|
|
10
|
-
* @example
|
|
11
|
-
* const tabs = [
|
|
12
|
-
* <Tab label='Label 1' sublabel='Description 1' />,
|
|
13
|
-
* <Tab label='Label 2' startIcon={<SvgPlaceholder />} />,
|
|
14
|
-
* ];
|
|
15
|
-
*/
|
|
16
|
-
export const Tab = React.forwardRef((props, forwardedRef) => {
|
|
17
|
-
const {
|
|
18
|
-
label,
|
|
19
|
-
sublabel,
|
|
20
|
-
startIcon,
|
|
21
|
-
children,
|
|
22
|
-
active = false,
|
|
23
|
-
className,
|
|
24
|
-
...rest
|
|
25
|
-
} = props;
|
|
26
|
-
return React.createElement(
|
|
27
|
-
ButtonBase,
|
|
28
|
-
{
|
|
29
|
-
className: cx('iui-tab', { 'iui-active': active }, className),
|
|
30
|
-
role: 'tab',
|
|
31
|
-
tabIndex: -1,
|
|
32
|
-
ref: forwardedRef,
|
|
33
|
-
...rest,
|
|
34
|
-
},
|
|
35
|
-
!!startIcon
|
|
36
|
-
? React.createElement(
|
|
37
|
-
Box,
|
|
38
|
-
{ as: 'span', className: 'iui-tab-icon', 'aria-hidden': true },
|
|
39
|
-
startIcon,
|
|
40
|
-
)
|
|
41
|
-
: null,
|
|
42
|
-
label &&
|
|
43
|
-
React.createElement(
|
|
44
|
-
Box,
|
|
45
|
-
{ as: 'span', className: 'iui-tab-label' },
|
|
46
|
-
React.createElement('div', null, label),
|
|
47
|
-
sublabel &&
|
|
48
|
-
React.createElement(
|
|
49
|
-
Box,
|
|
50
|
-
{ className: 'iui-tab-description' },
|
|
51
|
-
sublabel,
|
|
52
|
-
),
|
|
53
|
-
),
|
|
54
|
-
children,
|
|
55
|
-
);
|
|
56
|
-
});
|
|
57
|
-
export default Tab;
|