@itwin/core-react 3.6.0-dev.8 → 3.7.0-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/CHANGELOG.md +34 -1
- package/LICENSE.md +1 -1
- package/lib/cjs/core-react/button/Button.d.ts +4 -4
- package/lib/cjs/core-react/button/Button.js +3 -3
- package/lib/cjs/core-react/button/Button.js.map +1 -1
- package/lib/cjs/core-react/checkbox/Checkbox.d.ts +2 -2
- package/lib/cjs/core-react/checkbox/Checkbox.js +1 -1
- package/lib/cjs/core-react/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts +3 -3
- package/lib/cjs/core-react/dialog/DialogButtonDef.js +2 -2
- package/lib/cjs/core-react/dialog/DialogButtonDef.js.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +2 -2
- package/lib/cjs/core-react/expandable/ExpandableBlock.js +1 -1
- package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +1 -1
- package/lib/cjs/core-react/form/Field.d.ts +2 -2
- package/lib/cjs/core-react/form/Field.js +1 -1
- package/lib/cjs/core-react/form/Field.js.map +1 -1
- package/lib/cjs/core-react/form/Form.d.ts +8 -8
- package/lib/cjs/core-react/form/Form.js +4 -4
- package/lib/cjs/core-react/form/Form.js.map +1 -1
- package/lib/cjs/core-react/icons/SvgSprite.d.ts +2 -2
- package/lib/cjs/core-react/icons/SvgSprite.js +1 -1
- package/lib/cjs/core-react/icons/SvgSprite.js.map +1 -1
- package/lib/cjs/core-react/inputs/Input.d.ts +2 -2
- package/lib/cjs/core-react/inputs/Input.js +1 -1
- package/lib/cjs/core-react/inputs/Input.js.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledInput.d.ts +2 -2
- package/lib/cjs/core-react/inputs/LabeledInput.js +1 -1
- package/lib/cjs/core-react/inputs/LabeledInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +2 -2
- package/lib/cjs/core-react/inputs/LabeledTextarea.js +1 -1
- package/lib/cjs/core-react/inputs/LabeledTextarea.js.map +1 -1
- package/lib/cjs/core-react/inputs/Textarea.d.ts +2 -2
- package/lib/cjs/core-react/inputs/Textarea.js +1 -1
- package/lib/cjs/core-react/inputs/Textarea.js.map +1 -1
- package/lib/cjs/core-react/loading/Spinner.d.ts +3 -3
- package/lib/cjs/core-react/loading/Spinner.js +2 -2
- package/lib/cjs/core-react/loading/Spinner.js.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts +1 -1
- package/lib/cjs/core-react/messagebox/MessageSeverity.js +1 -1
- package/lib/cjs/core-react/messagebox/MessageSeverity.js.map +1 -1
- package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +2 -2
- package/lib/cjs/core-react/progress-indicators/ProgressBar.js +1 -1
- package/lib/cjs/core-react/progress-indicators/ProgressBar.js.map +1 -1
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +2 -2
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js +1 -1
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js.map +1 -1
- package/lib/cjs/core-react/radio/Radio.d.ts +2 -2
- package/lib/cjs/core-react/radio/Radio.js +1 -1
- package/lib/cjs/core-react/radio/Radio.js.map +1 -1
- package/lib/cjs/core-react/select/LabeledSelect.d.ts +2 -2
- package/lib/cjs/core-react/select/LabeledSelect.js +1 -1
- package/lib/cjs/core-react/select/LabeledSelect.js.map +1 -1
- package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +2 -2
- package/lib/cjs/core-react/select/LabeledThemedSelect.js +1 -1
- package/lib/cjs/core-react/select/LabeledThemedSelect.js.map +1 -1
- package/lib/cjs/core-react/select/Select.d.ts +3 -3
- package/lib/cjs/core-react/select/Select.js +1 -1
- package/lib/cjs/core-react/select/Select.js.map +1 -1
- package/lib/cjs/core-react/select/ThemedSelect.d.ts +4 -4
- package/lib/cjs/core-react/select/ThemedSelect.js +1 -1
- package/lib/cjs/core-react/select/ThemedSelect.js.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.js +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/cjs/core-react/slider/Slider.d.ts +1 -1
- package/lib/cjs/core-react/slider/Slider.js +1 -1
- package/lib/cjs/core-react/slider/Slider.js.map +1 -1
- package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +2 -2
- package/lib/cjs/core-react/splitbutton/SplitButton.js +1 -1
- package/lib/cjs/core-react/splitbutton/SplitButton.js.map +1 -1
- package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +1 -1
- package/lib/cjs/core-react/tabs/HorizontalTabs.js +1 -1
- package/lib/cjs/core-react/tabs/HorizontalTabs.js.map +1 -1
- package/lib/cjs/core-react/text/Headline.d.ts +1 -1
- package/lib/cjs/core-react/text/Headline.js +1 -1
- package/lib/cjs/core-react/text/Headline.js.map +1 -1
- package/lib/cjs/core-react/text/LeadingText.d.ts +1 -1
- package/lib/cjs/core-react/text/LeadingText.js +1 -1
- package/lib/cjs/core-react/text/LeadingText.js.map +1 -1
- package/lib/cjs/core-react/text/LeadingText2.d.ts +1 -1
- package/lib/cjs/core-react/text/LeadingText2.js +1 -1
- package/lib/cjs/core-react/text/LeadingText2.js.map +1 -1
- package/lib/cjs/core-react/text/SmallText.d.ts +1 -1
- package/lib/cjs/core-react/text/SmallText.js +1 -1
- package/lib/cjs/core-react/text/SmallText.js.map +1 -1
- package/lib/cjs/core-react/text/Subheading.d.ts +1 -1
- package/lib/cjs/core-react/text/Subheading.js +1 -1
- package/lib/cjs/core-react/text/Subheading.js.map +1 -1
- package/lib/cjs/core-react/text/Subheading2.d.ts +1 -1
- package/lib/cjs/core-react/text/Subheading2.js +1 -1
- package/lib/cjs/core-react/text/Subheading2.js.map +1 -1
- package/lib/cjs/core-react/text/Title.d.ts +1 -1
- package/lib/cjs/core-react/text/Title.js +1 -1
- package/lib/cjs/core-react/text/Title.js.map +1 -1
- package/lib/cjs/core-react/text/Title2.d.ts +1 -1
- package/lib/cjs/core-react/text/Title2.js +1 -1
- package/lib/cjs/core-react/text/Title2.js.map +1 -1
- package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +1 -1
- package/lib/cjs/core-react/tiles/FeaturedTile.js +1 -1
- package/lib/cjs/core-react/tiles/FeaturedTile.js.map +1 -1
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +1 -1
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js +1 -1
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js.map +1 -1
- package/lib/cjs/core-react/tiles/MinimalTile.d.ts +1 -1
- package/lib/cjs/core-react/tiles/MinimalTile.js +1 -1
- package/lib/cjs/core-react/tiles/MinimalTile.js.map +1 -1
- package/lib/cjs/core-react/tiles/Tile.d.ts +2 -2
- package/lib/cjs/core-react/tiles/Tile.js +1 -1
- package/lib/cjs/core-react/tiles/Tile.js.map +1 -1
- package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +2 -2
- package/lib/cjs/core-react/toggle/LabeledToggle.js +1 -1
- package/lib/cjs/core-react/toggle/LabeledToggle.js.map +1 -1
- package/lib/cjs/core-react/toggle/Toggle.d.ts +4 -4
- package/lib/cjs/core-react/toggle/Toggle.d.ts.map +1 -1
- package/lib/cjs/core-react/toggle/Toggle.js +2 -2
- package/lib/cjs/core-react/toggle/Toggle.js.map +1 -1
- package/lib/cjs/core-react/tooltip/Tooltip.d.ts +3 -3
- package/lib/cjs/core-react/tooltip/Tooltip.js +1 -1
- package/lib/cjs/core-react/tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/core-react/utils/PointProps.d.ts +1 -1
- package/lib/cjs/core-react/utils/PointProps.js.map +1 -1
- package/lib/cjs/core-react/utils/UiEvent.d.ts +1 -1
- package/lib/cjs/core-react/utils/UiEvent.js +1 -1
- package/lib/cjs/core-react/utils/UiEvent.js.map +1 -1
- package/lib/esm/core-react/button/Button.d.ts +4 -4
- package/lib/esm/core-react/button/Button.js +3 -3
- package/lib/esm/core-react/button/Button.js.map +1 -1
- package/lib/esm/core-react/checkbox/Checkbox.d.ts +2 -2
- package/lib/esm/core-react/checkbox/Checkbox.js +1 -1
- package/lib/esm/core-react/checkbox/Checkbox.js.map +1 -1
- package/lib/esm/core-react/dialog/DialogButtonDef.d.ts +3 -3
- package/lib/esm/core-react/dialog/DialogButtonDef.js +2 -2
- package/lib/esm/core-react/dialog/DialogButtonDef.js.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +2 -2
- package/lib/esm/core-react/expandable/ExpandableBlock.js +1 -1
- package/lib/esm/core-react/expandable/ExpandableBlock.js.map +1 -1
- package/lib/esm/core-react/form/Field.d.ts +2 -2
- package/lib/esm/core-react/form/Field.js +1 -1
- package/lib/esm/core-react/form/Field.js.map +1 -1
- package/lib/esm/core-react/form/Form.d.ts +8 -8
- package/lib/esm/core-react/form/Form.js +4 -4
- package/lib/esm/core-react/form/Form.js.map +1 -1
- package/lib/esm/core-react/icons/SvgSprite.d.ts +2 -2
- package/lib/esm/core-react/icons/SvgSprite.js +1 -1
- package/lib/esm/core-react/icons/SvgSprite.js.map +1 -1
- package/lib/esm/core-react/inputs/Input.d.ts +2 -2
- package/lib/esm/core-react/inputs/Input.js +1 -1
- package/lib/esm/core-react/inputs/Input.js.map +1 -1
- package/lib/esm/core-react/inputs/LabeledInput.d.ts +2 -2
- package/lib/esm/core-react/inputs/LabeledInput.js +1 -1
- package/lib/esm/core-react/inputs/LabeledInput.js.map +1 -1
- package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +2 -2
- package/lib/esm/core-react/inputs/LabeledTextarea.js +1 -1
- package/lib/esm/core-react/inputs/LabeledTextarea.js.map +1 -1
- package/lib/esm/core-react/inputs/Textarea.d.ts +2 -2
- package/lib/esm/core-react/inputs/Textarea.js +1 -1
- package/lib/esm/core-react/inputs/Textarea.js.map +1 -1
- package/lib/esm/core-react/loading/Spinner.d.ts +3 -3
- package/lib/esm/core-react/loading/Spinner.js +2 -2
- package/lib/esm/core-react/loading/Spinner.js.map +1 -1
- package/lib/esm/core-react/messagebox/MessageSeverity.d.ts +1 -1
- package/lib/esm/core-react/messagebox/MessageSeverity.js +1 -1
- package/lib/esm/core-react/messagebox/MessageSeverity.js.map +1 -1
- package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +2 -2
- package/lib/esm/core-react/progress-indicators/ProgressBar.js +1 -1
- package/lib/esm/core-react/progress-indicators/ProgressBar.js.map +1 -1
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +2 -2
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.js +1 -1
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.js.map +1 -1
- package/lib/esm/core-react/radio/Radio.d.ts +2 -2
- package/lib/esm/core-react/radio/Radio.js +1 -1
- package/lib/esm/core-react/radio/Radio.js.map +1 -1
- package/lib/esm/core-react/select/LabeledSelect.d.ts +2 -2
- package/lib/esm/core-react/select/LabeledSelect.js +1 -1
- package/lib/esm/core-react/select/LabeledSelect.js.map +1 -1
- package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +2 -2
- package/lib/esm/core-react/select/LabeledThemedSelect.js +1 -1
- package/lib/esm/core-react/select/LabeledThemedSelect.js.map +1 -1
- package/lib/esm/core-react/select/Select.d.ts +3 -3
- package/lib/esm/core-react/select/Select.js +1 -1
- package/lib/esm/core-react/select/Select.js.map +1 -1
- package/lib/esm/core-react/select/ThemedSelect.d.ts +4 -4
- package/lib/esm/core-react/select/ThemedSelect.js +1 -1
- package/lib/esm/core-react/select/ThemedSelect.js.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.js +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/esm/core-react/slider/Slider.d.ts +1 -1
- package/lib/esm/core-react/slider/Slider.js +1 -1
- package/lib/esm/core-react/slider/Slider.js.map +1 -1
- package/lib/esm/core-react/splitbutton/SplitButton.d.ts +2 -2
- package/lib/esm/core-react/splitbutton/SplitButton.js +1 -1
- package/lib/esm/core-react/splitbutton/SplitButton.js.map +1 -1
- package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +1 -1
- package/lib/esm/core-react/tabs/HorizontalTabs.js +1 -1
- package/lib/esm/core-react/tabs/HorizontalTabs.js.map +1 -1
- package/lib/esm/core-react/text/Headline.d.ts +1 -1
- package/lib/esm/core-react/text/Headline.js +1 -1
- package/lib/esm/core-react/text/Headline.js.map +1 -1
- package/lib/esm/core-react/text/LeadingText.d.ts +1 -1
- package/lib/esm/core-react/text/LeadingText.js +1 -1
- package/lib/esm/core-react/text/LeadingText.js.map +1 -1
- package/lib/esm/core-react/text/LeadingText2.d.ts +1 -1
- package/lib/esm/core-react/text/LeadingText2.js +1 -1
- package/lib/esm/core-react/text/LeadingText2.js.map +1 -1
- package/lib/esm/core-react/text/SmallText.d.ts +1 -1
- package/lib/esm/core-react/text/SmallText.js +1 -1
- package/lib/esm/core-react/text/SmallText.js.map +1 -1
- package/lib/esm/core-react/text/Subheading.d.ts +1 -1
- package/lib/esm/core-react/text/Subheading.js +1 -1
- package/lib/esm/core-react/text/Subheading.js.map +1 -1
- package/lib/esm/core-react/text/Subheading2.d.ts +1 -1
- package/lib/esm/core-react/text/Subheading2.js +1 -1
- package/lib/esm/core-react/text/Subheading2.js.map +1 -1
- package/lib/esm/core-react/text/Title.d.ts +1 -1
- package/lib/esm/core-react/text/Title.js +1 -1
- package/lib/esm/core-react/text/Title.js.map +1 -1
- package/lib/esm/core-react/text/Title2.d.ts +1 -1
- package/lib/esm/core-react/text/Title2.js +1 -1
- package/lib/esm/core-react/text/Title2.js.map +1 -1
- package/lib/esm/core-react/tiles/FeaturedTile.d.ts +1 -1
- package/lib/esm/core-react/tiles/FeaturedTile.js +1 -1
- package/lib/esm/core-react/tiles/FeaturedTile.js.map +1 -1
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +1 -1
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.js +1 -1
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.js.map +1 -1
- package/lib/esm/core-react/tiles/MinimalTile.d.ts +1 -1
- package/lib/esm/core-react/tiles/MinimalTile.js +1 -1
- package/lib/esm/core-react/tiles/MinimalTile.js.map +1 -1
- package/lib/esm/core-react/tiles/Tile.d.ts +2 -2
- package/lib/esm/core-react/tiles/Tile.js +1 -1
- package/lib/esm/core-react/tiles/Tile.js.map +1 -1
- package/lib/esm/core-react/toggle/LabeledToggle.d.ts +2 -2
- package/lib/esm/core-react/toggle/LabeledToggle.js +1 -1
- package/lib/esm/core-react/toggle/LabeledToggle.js.map +1 -1
- package/lib/esm/core-react/toggle/Toggle.d.ts +4 -4
- package/lib/esm/core-react/toggle/Toggle.d.ts.map +1 -1
- package/lib/esm/core-react/toggle/Toggle.js +2 -2
- package/lib/esm/core-react/toggle/Toggle.js.map +1 -1
- package/lib/esm/core-react/tooltip/Tooltip.d.ts +3 -3
- package/lib/esm/core-react/tooltip/Tooltip.js +1 -1
- package/lib/esm/core-react/tooltip/Tooltip.js.map +1 -1
- package/lib/esm/core-react/utils/PointProps.d.ts +1 -1
- package/lib/esm/core-react/utils/PointProps.js.map +1 -1
- package/lib/esm/core-react/utils/UiEvent.d.ts +1 -1
- package/lib/esm/core-react/utils/UiEvent.js +1 -1
- package/lib/esm/core-react/utils/UiEvent.js.map +1 -1
- package/package.json +20 -10
|
@@ -9,7 +9,7 @@ import * as React from "react";
|
|
|
9
9
|
import { Tile } from "./Tile";
|
|
10
10
|
/** Minimal [[Tile]] component
|
|
11
11
|
* @beta
|
|
12
|
-
* @deprecated Use Tile in itwinui-react instead
|
|
12
|
+
* @deprecated in 3.0. Use Tile in itwinui-react instead
|
|
13
13
|
*/
|
|
14
14
|
export function MinimalTile(props) {
|
|
15
15
|
return React.createElement(Tile, { ...props, minimal: true }); // eslint-disable-line deprecation/deprecation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinimalTile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/MinimalTile.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAgB;IAC1C,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,OAAO,EAAE,IAAI,GAAI,CAAC,CAAE,8CAA8C;AAC5F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tile, TileProps } from \"./Tile\";\r\n\r\n/** Minimal [[Tile]] component\r\n * @beta\r\n * @deprecated Use Tile in itwinui-react instead\r\n */\r\nexport function MinimalTile(props: TileProps) { // eslint-disable-line deprecation/deprecation\r\n return <Tile {...props} minimal={true} />; // eslint-disable-line deprecation/deprecation\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"MinimalTile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/MinimalTile.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAgB;IAC1C,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,OAAO,EAAE,IAAI,GAAI,CAAC,CAAE,8CAA8C;AAC5F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tile, TileProps } from \"./Tile\";\r\n\r\n/** Minimal [[Tile]] component\r\n * @beta\r\n * @deprecated in 3.0. Use Tile in itwinui-react instead\r\n */\r\nexport function MinimalTile(props: TileProps) { // eslint-disable-line deprecation/deprecation\r\n return <Tile {...props} minimal={true} />; // eslint-disable-line deprecation/deprecation\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import { CommonDivProps } from "../utils/Props";
|
|
6
6
|
/** Properties for the [[Tile]] component
|
|
7
7
|
* @beta
|
|
8
|
-
* @deprecated Use TileProps in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use TileProps in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export interface TileProps extends CommonDivProps {
|
|
11
11
|
title: string;
|
|
@@ -21,7 +21,7 @@ export interface TileProps extends CommonDivProps {
|
|
|
21
21
|
export declare type TileDefaultProps = Pick<TileProps, "stepNum">;
|
|
22
22
|
/** The Tile React component is a container for rendering elements that can be grouped together.
|
|
23
23
|
* @beta
|
|
24
|
-
* @deprecated Use Tile in itwinui-react instead
|
|
24
|
+
* @deprecated in 3.0. Use Tile in itwinui-react instead
|
|
25
25
|
*/
|
|
26
26
|
export declare class Tile extends React.Component<TileProps> {
|
|
27
27
|
/** @internal */
|
|
@@ -10,7 +10,7 @@ import * as React from "react";
|
|
|
10
10
|
import { Icon } from "../icons/IconComponent";
|
|
11
11
|
/** The Tile React component is a container for rendering elements that can be grouped together.
|
|
12
12
|
* @beta
|
|
13
|
-
* @deprecated Use Tile in itwinui-react instead
|
|
13
|
+
* @deprecated in 3.0. Use Tile in itwinui-react instead
|
|
14
14
|
*/
|
|
15
15
|
export class Tile extends React.Component {
|
|
16
16
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","sourceRoot":"","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AAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;gBAC3E,6BAAK,SAAS,EAAC,aAAa,IACzB,IAAI,CACD;gBACN,2BAAG,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAK,CAChD;YACH,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;gBACzC,6BAAK,SAAS,EAAC,iBAAiB,IAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CAEJ,CACP,CAAC;IACJ,CAAC;;AArCD,gBAAgB;AACO,iBAAY,GAAqB;IACtD,OAAO,EAAE,CAAC;CACX,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Tile]] component\r\n * @beta\r\n * @deprecated Use TileProps in itwinui-react instead\r\n */\r\nexport interface TileProps extends CommonDivProps {\r\n title: string;\r\n icon?: string | React.ReactNode;\r\n featured?: boolean;\r\n minimal?: boolean;\r\n href?: string;\r\n onClick?: (e: any) => any;\r\n stepNum?: number;\r\n stepCount?: number;\r\n}\r\n\r\n/** @internal */\r\nexport type TileDefaultProps = Pick<TileProps, \"stepNum\">; // eslint-disable-line deprecation/deprecation\r\n\r\n/** The Tile React component is a container for rendering elements that can be grouped together.\r\n * @beta\r\n * @deprecated Use Tile in itwinui-react instead\r\n */\r\nexport class Tile extends React.Component<TileProps> { // eslint-disable-line deprecation/deprecation\r\n\r\n /** @internal */\r\n public static readonly defaultProps: TileDefaultProps = {\r\n stepNum: 0,\r\n };\r\n\r\n /** @internal */\r\n public override render(): JSX.Element {\r\n const stepType =\r\n (this.props.stepCount && this.props.stepCount < 13)\r\n ? Math.floor(this.props.stepNum! * 12 / (this.props.stepCount - 1))\r\n : this.props.stepNum! % 16;\r\n const stepClass = `uicore-step-${stepType}`;\r\n\r\n const classNames = classnames(\r\n \"uicore-tiles-tile\",\r\n stepClass,\r\n this.props.featured && \"uicore-featured\",\r\n this.props.minimal && \"uicore-minimal\",\r\n );\r\n\r\n const icon: React.ReactNode = (typeof this.props.icon === \"string\") ? <Icon iconSpec={this.props.icon} /> : this.props.icon;\r\n\r\n return (\r\n <div className={classNames} style={this.props.style}>\r\n <a className=\"uicore-link\" href={this.props.href} onClick={this.props.onClick}>\r\n <div className=\"uicore-icon\">\r\n {icon}\r\n </div>\r\n <p className=\"uicore-title\">{this.props.title}</p>\r\n </a>\r\n {this.props.children && !this.props.minimal &&\r\n <div className=\"uicore-children\">\r\n {this.props.children}\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/Tile.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAqB9C;;;GAGG;AACH,MAAM,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAoB;IAOlD,gBAAgB;IACA,MAAM;QACpB,MAAM,QAAQ,GACZ,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;YACjD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAQ,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;YACnE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAQ,GAAG,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,eAAe,QAAQ,EAAE,CAAC;QAE5C,MAAM,UAAU,GAAG,UAAU,CAC3B,mBAAmB,EACnB,SAAS,EACT,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,gBAAgB,CACvC,CAAC;QAEF,MAAM,IAAI,GAAoB,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,oBAAC,IAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAE5H,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACjD,2BAAG,SAAS,EAAC,aAAa,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;gBAC3E,6BAAK,SAAS,EAAC,aAAa,IACzB,IAAI,CACD;gBACN,2BAAG,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAK,CAChD;YACH,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;gBACzC,6BAAK,SAAS,EAAC,iBAAiB,IAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CAEJ,CACP,CAAC;IACJ,CAAC;;AArCD,gBAAgB;AACO,iBAAY,GAAqB;IACtD,OAAO,EAAE,CAAC;CACX,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { CommonDivProps } from \"../utils/Props\";\r\n\r\n/** Properties for the [[Tile]] component\r\n * @beta\r\n * @deprecated in 3.0. Use TileProps in itwinui-react instead\r\n */\r\nexport interface TileProps extends CommonDivProps {\r\n title: string;\r\n icon?: string | React.ReactNode;\r\n featured?: boolean;\r\n minimal?: boolean;\r\n href?: string;\r\n onClick?: (e: any) => any;\r\n stepNum?: number;\r\n stepCount?: number;\r\n}\r\n\r\n/** @internal */\r\nexport type TileDefaultProps = Pick<TileProps, \"stepNum\">; // eslint-disable-line deprecation/deprecation\r\n\r\n/** The Tile React component is a container for rendering elements that can be grouped together.\r\n * @beta\r\n * @deprecated in 3.0. Use Tile in itwinui-react instead\r\n */\r\nexport class Tile extends React.Component<TileProps> { // eslint-disable-line deprecation/deprecation\r\n\r\n /** @internal */\r\n public static readonly defaultProps: TileDefaultProps = {\r\n stepNum: 0,\r\n };\r\n\r\n /** @internal */\r\n public override render(): JSX.Element {\r\n const stepType =\r\n (this.props.stepCount && this.props.stepCount < 13)\r\n ? Math.floor(this.props.stepNum! * 12 / (this.props.stepCount - 1))\r\n : this.props.stepNum! % 16;\r\n const stepClass = `uicore-step-${stepType}`;\r\n\r\n const classNames = classnames(\r\n \"uicore-tiles-tile\",\r\n stepClass,\r\n this.props.featured && \"uicore-featured\",\r\n this.props.minimal && \"uicore-minimal\",\r\n );\r\n\r\n const icon: React.ReactNode = (typeof this.props.icon === \"string\") ? <Icon iconSpec={this.props.icon} /> : this.props.icon;\r\n\r\n return (\r\n <div className={classNames} style={this.props.style}>\r\n <a className=\"uicore-link\" href={this.props.href} onClick={this.props.onClick}>\r\n <div className=\"uicore-icon\">\r\n {icon}\r\n </div>\r\n <p className=\"uicore-title\">{this.props.title}</p>\r\n </a>\r\n {this.props.children && !this.props.minimal &&\r\n <div className=\"uicore-children\">\r\n {this.props.children}\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -6,7 +6,7 @@ import * as React from "react";
|
|
|
6
6
|
import { ToggleSwitchProps } from "@itwin/itwinui-react";
|
|
7
7
|
/** Properties for [[LabeledToggle]]
|
|
8
8
|
* @public
|
|
9
|
-
* @deprecated Use ToggleSwitchProps from itwinui-react instead
|
|
9
|
+
* @deprecated in 3.0. Use ToggleSwitchProps from itwinui-react instead
|
|
10
10
|
*/
|
|
11
11
|
export interface LabeledToggleProps extends ToggleSwitchProps {
|
|
12
12
|
/** Text that will be shown next to the Toggle. */
|
|
@@ -18,7 +18,7 @@ export interface LabeledToggleProps extends ToggleSwitchProps {
|
|
|
18
18
|
}
|
|
19
19
|
/** Toggle component with a Label to the right
|
|
20
20
|
* @public
|
|
21
|
-
* @deprecated Use ToggleSwitch from itwinui-react with `labelPosition="right"` instead
|
|
21
|
+
* @deprecated in 3.0. Use ToggleSwitch from itwinui-react with `labelPosition="right"` instead
|
|
22
22
|
*/
|
|
23
23
|
export declare class LabeledToggle extends React.PureComponent<LabeledToggleProps> {
|
|
24
24
|
render(): JSX.Element;
|
|
@@ -11,7 +11,7 @@ import * as React from "react";
|
|
|
11
11
|
import { ToggleSwitch } from "@itwin/itwinui-react";
|
|
12
12
|
/** Toggle component with a Label to the right
|
|
13
13
|
* @public
|
|
14
|
-
* @deprecated Use ToggleSwitch from itwinui-react with `labelPosition="right"` instead
|
|
14
|
+
* @deprecated in 3.0. Use ToggleSwitch from itwinui-react with `labelPosition="right"` instead
|
|
15
15
|
*/
|
|
16
16
|
export class LabeledToggle extends React.PureComponent {
|
|
17
17
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledToggle.js","sourceRoot":"","sources":["../../../../src/core-react/toggle/LabeledToggle.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAqB,MAAM,sBAAsB,CAAC;AAevE;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,aAAiC;IACxD,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzE,OAAO,CACL,+BAAO,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,CACnD,4BAA4B,EAC5B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB;YACC,oBAAC,YAAY,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI;YAC9D,KAAK;gBACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,IAAG,KAAK,CAAO,CAErE,CACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Toggle\r\n */\r\n\r\nimport \"./LabeledToggle.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ToggleSwitch, ToggleSwitchProps } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties for [[LabeledToggle]]\r\n * @public\r\n * @deprecated Use ToggleSwitchProps from itwinui-react instead\r\n */\r\nexport interface LabeledToggleProps extends ToggleSwitchProps {\r\n /** Text that will be shown next to the Toggle. */\r\n label?: string;\r\n /** Custom CSS class name for the label */\r\n labelClassName?: string;\r\n /** Custom CSS Style for the label */\r\n labelStyle?: React.CSSProperties;\r\n}\r\n\r\n/** Toggle component with a Label to the right\r\n * @public\r\n * @deprecated Use ToggleSwitch from itwinui-react with `labelPosition=\"right\"` instead\r\n */\r\nexport class LabeledToggle extends React.PureComponent<LabeledToggleProps> { // eslint-disable-line deprecation/deprecation\r\n public override render(): JSX.Element {\r\n const { label, labelClassName, className, style, ...props } = this.props;\r\n\r\n return (\r\n <label style={this.props.style} className={classnames(\r\n \"core-inputs-labeled-toggle\",\r\n this.props.disabled && \"uicore-disabled\",\r\n this.props.className,\r\n )}>\r\n <ToggleSwitch className={className} style={style} {...props} />\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)}>{label}</div>\r\n }\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LabeledToggle.js","sourceRoot":"","sources":["../../../../src/core-react/toggle/LabeledToggle.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAqB,MAAM,sBAAsB,CAAC;AAevE;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,aAAiC;IACxD,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzE,OAAO,CACL,+BAAO,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,CACnD,4BAA4B,EAC5B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB;YACC,oBAAC,YAAY,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI;YAC9D,KAAK;gBACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,IAAG,KAAK,CAAO,CAErE,CACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Toggle\r\n */\r\n\r\nimport \"./LabeledToggle.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ToggleSwitch, ToggleSwitchProps } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties for [[LabeledToggle]]\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitchProps from itwinui-react instead\r\n */\r\nexport interface LabeledToggleProps extends ToggleSwitchProps {\r\n /** Text that will be shown next to the Toggle. */\r\n label?: string;\r\n /** Custom CSS class name for the label */\r\n labelClassName?: string;\r\n /** Custom CSS Style for the label */\r\n labelStyle?: React.CSSProperties;\r\n}\r\n\r\n/** Toggle component with a Label to the right\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitch from itwinui-react with `labelPosition=\"right\"` instead\r\n */\r\nexport class LabeledToggle extends React.PureComponent<LabeledToggleProps> { // eslint-disable-line deprecation/deprecation\r\n public override render(): JSX.Element {\r\n const { label, labelClassName, className, style, ...props } = this.props;\r\n\r\n return (\r\n <label style={this.props.style} className={classnames(\r\n \"core-inputs-labeled-toggle\",\r\n this.props.disabled && \"uicore-disabled\",\r\n this.props.className,\r\n )}>\r\n <ToggleSwitch className={className} style={style} {...props} />\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)}>{label}</div>\r\n }\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -6,7 +6,7 @@ import * as React from "react";
|
|
|
6
6
|
import { CommonProps } from "../utils/Props";
|
|
7
7
|
/** Toggle display types
|
|
8
8
|
* @public
|
|
9
|
-
* @deprecated
|
|
9
|
+
* @deprecated in 3.0. Use ToggleSwitch from @itwin/itwinui-react and its standard theming.
|
|
10
10
|
*/
|
|
11
11
|
export declare enum ToggleButtonType {
|
|
12
12
|
/** Primary (green) background */
|
|
@@ -16,7 +16,7 @@ export declare enum ToggleButtonType {
|
|
|
16
16
|
}
|
|
17
17
|
/** Properties for [[Toggle]] component
|
|
18
18
|
* @public
|
|
19
|
-
* @deprecated Use ToggleSwitchProps in itwinui-react instead
|
|
19
|
+
* @deprecated in 3.0. Use ToggleSwitchProps in itwinui-react instead
|
|
20
20
|
*/
|
|
21
21
|
export interface ToggleProps extends CommonProps {
|
|
22
22
|
/** Indicates whether the Toggle is disabled (default is false) */
|
|
@@ -28,7 +28,7 @@ export interface ToggleProps extends CommonProps {
|
|
|
28
28
|
/** Show a check mark icon when the toggle is "on" (false is default) */
|
|
29
29
|
showCheckmark?: boolean;
|
|
30
30
|
/** Button type, either Primary or Blue (Blue is default).
|
|
31
|
-
* @deprecated */
|
|
31
|
+
* @deprecated in 3.0. Use icon in ToggleSwitch props from @itwin/itwinui-react */
|
|
32
32
|
buttonType?: ToggleButtonType;
|
|
33
33
|
/** Function called when the toggle state is changed */
|
|
34
34
|
onChange?: (checked: boolean) => any;
|
|
@@ -46,7 +46,7 @@ export interface ToggleProps extends CommonProps {
|
|
|
46
46
|
/**
|
|
47
47
|
* Toggle React component to show an "on" or "off" state
|
|
48
48
|
* @public
|
|
49
|
-
* @deprecated Use ToggleSwitch in itwinui-react instead
|
|
49
|
+
* @deprecated in 3.0. Use ToggleSwitch in itwinui-react instead
|
|
50
50
|
*/
|
|
51
51
|
export declare const Toggle: (props: ToggleProps) => JSX.Element | null;
|
|
52
52
|
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/core-react/toggle/Toggle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,iCAAiC;IACjC,OAAO,IAAA;IACP,sBAAsB;IACtB,IAAI,IAAA;CACL;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wEAAwE;IACxE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;
|
|
1
|
+
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/core-react/toggle/Toggle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,iCAAiC;IACjC,OAAO,IAAA;IACP,sBAAsB;IACtB,IAAI,IAAA;CACL;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wEAAwE;IACxE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;sFACkF;IAClF,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,GAAG,CAAC;IACrC,mDAAmD;IACnD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,GAAG,CAAC;IAC1C,yCAAyC;IACzC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACnC;AA6GD;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,GAAG,CAAC,OAAO,GAAG,IAAuB,CAAC"}
|
|
@@ -11,7 +11,7 @@ import * as React from "react";
|
|
|
11
11
|
import { useRefs } from "../utils/hooks/useRefs";
|
|
12
12
|
/** Toggle display types
|
|
13
13
|
* @public
|
|
14
|
-
* @deprecated
|
|
14
|
+
* @deprecated in 3.0. Use ToggleSwitch from @itwin/itwinui-react and its standard theming.
|
|
15
15
|
*/
|
|
16
16
|
export var ToggleButtonType;
|
|
17
17
|
(function (ToggleButtonType) {
|
|
@@ -96,7 +96,7 @@ function ForwardRefToggle(props, ref) {
|
|
|
96
96
|
/**
|
|
97
97
|
* Toggle React component to show an "on" or "off" state
|
|
98
98
|
* @public
|
|
99
|
-
* @deprecated Use ToggleSwitch in itwinui-react instead
|
|
99
|
+
* @deprecated in 3.0. Use ToggleSwitch in itwinui-react instead
|
|
100
100
|
*/
|
|
101
101
|
export const Toggle = ForwardRefToggle; // eslint-disable-line deprecation/deprecation
|
|
102
102
|
//# sourceMappingURL=Toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../../src/core-react/toggle/Toggle.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAA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K,gBAAgB,CAAC,OAAO,IAAI,qBAAqB,EAAE,8CAA8C;IAChH,KAAK,CAAC,KAAK,IAAI,mBAAmB,EAClC,OAAO,IAAI,qBAAqB,EAChC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACnC,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,MAAM,iBAAiB,GAAwB;QAC7C,KAAK,EAAE,MAAM,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC;QAC7B,SAAS,EAAE,cAAc,SAAS,EAAE,KAAK;QACzC,GAAG,EAAE,OAAO;QACZ,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,OAAO;KACd,CAAC;IACF,MAAM,eAAe,GAAG,UAAU,CAChC,oBAAoB,EACpB,QAAQ,IAAI,eAAe,CAC5B,CAAC;IAEF,OAAO,CACL,+BAAO,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU;QAC9F,+BAAO,IAAI,EAAC,UAAU,EAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAC,mBAAmB,EAC7D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAC1C,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAClD,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI;QACxB,8BAAM,SAAS,EAAC,wBAAwB,GAAG;QAC3C,8BAAM,SAAS,EAAE,kBAAkB,GAAI;QACvC,8BAAM,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,GAAI,CACxD,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAA+C,gBAAgB,CAAC,CAAG,8CAA8C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Toggle\r\n */\r\n\r\nimport \"./Toggle.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\n\r\n/** Toggle display types\r\n * @public\r\n * @deprecated\r\n */\r\nexport enum ToggleButtonType {\r\n /** Primary (green) background */\r\n Primary,\r\n /** Blue background */\r\n Blue,\r\n}\r\n\r\n/** Properties for [[Toggle]] component\r\n * @public\r\n * @deprecated Use ToggleSwitchProps in itwinui-react instead\r\n */\r\nexport interface ToggleProps extends CommonProps {\r\n /** Indicates whether the Toggle is disabled (default is false) */\r\n disabled?: boolean;\r\n /** Indicates whether the Toggle is \"on\" or \"off\" (default is false) */\r\n isOn?: boolean;\r\n /** Show the toggle rounded or square (rounded is default) */\r\n rounded?: boolean;\r\n /** Show a check mark icon when the toggle is \"on\" (false is default) */\r\n showCheckmark?: boolean;\r\n /** Button type, either Primary or Blue (Blue is default).\r\n * @deprecated */\r\n buttonType?: ToggleButtonType; // eslint-disable-line deprecation/deprecation\r\n /** Function called when the toggle state is changed */\r\n onChange?: (checked: boolean) => any;\r\n /** Function called when the toggle loses focus */\r\n onBlur?: (event: React.FocusEvent) => any;\r\n /** Use larger size (default is false) */\r\n large?: boolean;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n /** Tooltip text */\r\n title?: string;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\nconst ForwardRefToggle = React.forwardRef<HTMLInputElement, ToggleProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefToggle(props, ref) {\r\n const inputElement = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElement, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n const padding = 2;\r\n const defaultHeight = props.large ? 32 : 21;\r\n const [height, setHeight] = React.useState(defaultHeight);\r\n const [width, setWidth] = React.useState(defaultHeight * 2);\r\n const [checked, setChecked] = React.useState(props.isOn ? true : false);\r\n const [toggling, setToggling] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (props.setFocus && inputElement.current)\r\n inputElement.current.focus();\r\n }, [props]);\r\n\r\n React.useEffect(() => {\r\n setChecked(props.isOn ? true : false);\r\n }, [props.isOn]);\r\n\r\n const handleChange = React.useCallback(() => {\r\n const newChecked = !checked;\r\n\r\n setToggling(true);\r\n setChecked(newChecked);\r\n\r\n // istanbul ignore else\r\n if (props.onChange)\r\n props.onChange(newChecked);\r\n\r\n setTimeout(() => {\r\n // istanbul ignore else\r\n if (inputElement.current)\r\n setToggling(false);\r\n }, 250);\r\n }, [props, checked]);\r\n\r\n const handleBlur = React.useCallback((event: React.FocusEvent) => {\r\n // istanbul ignore else\r\n if (props.onBlur)\r\n props.onBlur(event);\r\n }, [props]);\r\n\r\n const handleCheckboxBlur = React.useCallback((event: React.FocusEvent) => {\r\n event.stopPropagation();\r\n }, []);\r\n\r\n const setHeightFromRef = React.useCallback((el: HTMLLabelElement | null) => {\r\n if (el !== null) {\r\n // istanbul ignore next\r\n if (el.clientHeight > 0 && el.clientWidth > 0) {\r\n setHeight(el.clientHeight);\r\n setWidth(el.clientWidth);\r\n }\r\n }\r\n }, []);\r\n\r\n const getOffset = (): number => {\r\n return (checked) ? width - height : 0;\r\n };\r\n\r\n /** Default props */\r\n const rounded = props.rounded !== undefined ? props.rounded : true;\r\n const showCheckmark = props.showCheckmark !== undefined ? props.showCheckmark : false;\r\n const buttonType = props.buttonType !== undefined ? props.buttonType : ToggleButtonType.Blue; // eslint-disable-line deprecation/deprecation\r\n\r\n const halfHeight = height / 2;\r\n const checkmarkClassName = classnames(\r\n \"core-toggle-checkmark\",\r\n \"icon\", \"icon-checkmark\",\r\n showCheckmark && \"core-visible\",\r\n toggling && \"core-toggling\",\r\n );\r\n const toggleStyle: React.CSSProperties = { borderRadius: rounded ? halfHeight : 3, fontSize: halfHeight, ...props.style };\r\n const toggleClassName = classnames(\r\n \"core-toggle\",\r\n buttonType === ToggleButtonType.Primary && \"core-toggle-primary\", // eslint-disable-line deprecation/deprecation\r\n props.large && \"core-toggle-large\",\r\n rounded && \"core-toggle-rounded\",\r\n props.disabled && \"uicore-disabled\",\r\n props.className);\r\n const toggleHandleStyle: React.CSSProperties = {\r\n width: height - (padding * 2),\r\n transform: `translateX(${getOffset()}px)`,\r\n top: padding,\r\n bottom: padding,\r\n left: padding,\r\n };\r\n const handleClassName = classnames(\r\n \"core-toggle-handle\",\r\n toggling && \"core-toggling\",\r\n );\r\n\r\n return (\r\n <label ref={setHeightFromRef} style={toggleStyle} className={toggleClassName} onBlur={handleBlur}>\r\n <input type=\"checkbox\" ref={refs} className=\"core-toggle-input\"\r\n checked={checked} disabled={props.disabled}\r\n onChange={handleChange} onBlur={handleCheckboxBlur}\r\n title={props.title} />\r\n <span className=\"core-toggle-background\" />\r\n <span className={checkmarkClassName} />\r\n <span className={handleClassName} style={toggleHandleStyle} />\r\n </label>\r\n );\r\n }\r\n);\r\n\r\n/**\r\n * Toggle React component to show an \"on\" or \"off\" state\r\n * @public\r\n * @deprecated Use ToggleSwitch in itwinui-react instead\r\n */\r\nexport const Toggle: (props: ToggleProps) => JSX.Element | null = ForwardRefToggle; // eslint-disable-line deprecation/deprecation\r\n"]}
|
|
1
|
+
{"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../../src/core-react/toggle/Toggle.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,iCAAiC;IACjC,6DAAO,CAAA;IACP,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C,KAAK,EAAE,MAAM,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC;QAC7B,SAAS,EAAE,cAAc,SAAS,EAAE,KAAK;QACzC,GAAG,EAAE,OAAO;QACZ,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,OAAO;KACd,CAAC;IACF,MAAM,eAAe,GAAG,UAAU,CAChC,oBAAoB,EACpB,QAAQ,IAAI,eAAe,CAC5B,CAAC;IAEF,OAAO,CACL,+BAAO,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU;QAC9F,+BAAO,IAAI,EAAC,UAAU,EAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAC,mBAAmB,EAC7D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAC1C,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAClD,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI;QACxB,8BAAM,SAAS,EAAC,wBAAwB,GAAG;QAC3C,8BAAM,SAAS,EAAE,kBAAkB,GAAI;QACvC,8BAAM,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,GAAI,CACxD,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAA+C,gBAAgB,CAAC,CAAG,8CAA8C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Toggle\r\n */\r\n\r\nimport \"./Toggle.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\n\r\n/** Toggle display types\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitch from @itwin/itwinui-react and its standard theming.\r\n */\r\nexport enum ToggleButtonType {\r\n /** Primary (green) background */\r\n Primary,\r\n /** Blue background */\r\n Blue,\r\n}\r\n\r\n/** Properties for [[Toggle]] component\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitchProps in itwinui-react instead\r\n */\r\nexport interface ToggleProps extends CommonProps {\r\n /** Indicates whether the Toggle is disabled (default is false) */\r\n disabled?: boolean;\r\n /** Indicates whether the Toggle is \"on\" or \"off\" (default is false) */\r\n isOn?: boolean;\r\n /** Show the toggle rounded or square (rounded is default) */\r\n rounded?: boolean;\r\n /** Show a check mark icon when the toggle is \"on\" (false is default) */\r\n showCheckmark?: boolean;\r\n /** Button type, either Primary or Blue (Blue is default).\r\n * @deprecated in 3.0. Use icon in ToggleSwitch props from @itwin/itwinui-react */\r\n buttonType?: ToggleButtonType; // eslint-disable-line deprecation/deprecation\r\n /** Function called when the toggle state is changed */\r\n onChange?: (checked: boolean) => any;\r\n /** Function called when the toggle loses focus */\r\n onBlur?: (event: React.FocusEvent) => any;\r\n /** Use larger size (default is false) */\r\n large?: boolean;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n /** Tooltip text */\r\n title?: string;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\nconst ForwardRefToggle = React.forwardRef<HTMLInputElement, ToggleProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefToggle(props, ref) {\r\n const inputElement = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElement, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n const padding = 2;\r\n const defaultHeight = props.large ? 32 : 21;\r\n const [height, setHeight] = React.useState(defaultHeight);\r\n const [width, setWidth] = React.useState(defaultHeight * 2);\r\n const [checked, setChecked] = React.useState(props.isOn ? true : false);\r\n const [toggling, setToggling] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (props.setFocus && inputElement.current)\r\n inputElement.current.focus();\r\n }, [props]);\r\n\r\n React.useEffect(() => {\r\n setChecked(props.isOn ? true : false);\r\n }, [props.isOn]);\r\n\r\n const handleChange = React.useCallback(() => {\r\n const newChecked = !checked;\r\n\r\n setToggling(true);\r\n setChecked(newChecked);\r\n\r\n // istanbul ignore else\r\n if (props.onChange)\r\n props.onChange(newChecked);\r\n\r\n setTimeout(() => {\r\n // istanbul ignore else\r\n if (inputElement.current)\r\n setToggling(false);\r\n }, 250);\r\n }, [props, checked]);\r\n\r\n const handleBlur = React.useCallback((event: React.FocusEvent) => {\r\n // istanbul ignore else\r\n if (props.onBlur)\r\n props.onBlur(event);\r\n }, [props]);\r\n\r\n const handleCheckboxBlur = React.useCallback((event: React.FocusEvent) => {\r\n event.stopPropagation();\r\n }, []);\r\n\r\n const setHeightFromRef = React.useCallback((el: HTMLLabelElement | null) => {\r\n if (el !== null) {\r\n // istanbul ignore next\r\n if (el.clientHeight > 0 && el.clientWidth > 0) {\r\n setHeight(el.clientHeight);\r\n setWidth(el.clientWidth);\r\n }\r\n }\r\n }, []);\r\n\r\n const getOffset = (): number => {\r\n return (checked) ? width - height : 0;\r\n };\r\n\r\n /** Default props */\r\n const rounded = props.rounded !== undefined ? props.rounded : true;\r\n const showCheckmark = props.showCheckmark !== undefined ? props.showCheckmark : false;\r\n const buttonType = props.buttonType !== undefined ? props.buttonType : ToggleButtonType.Blue; // eslint-disable-line deprecation/deprecation\r\n\r\n const halfHeight = height / 2;\r\n const checkmarkClassName = classnames(\r\n \"core-toggle-checkmark\",\r\n \"icon\", \"icon-checkmark\",\r\n showCheckmark && \"core-visible\",\r\n toggling && \"core-toggling\",\r\n );\r\n const toggleStyle: React.CSSProperties = { borderRadius: rounded ? halfHeight : 3, fontSize: halfHeight, ...props.style };\r\n const toggleClassName = classnames(\r\n \"core-toggle\",\r\n buttonType === ToggleButtonType.Primary && \"core-toggle-primary\", // eslint-disable-line deprecation/deprecation\r\n props.large && \"core-toggle-large\",\r\n rounded && \"core-toggle-rounded\",\r\n props.disabled && \"uicore-disabled\",\r\n props.className);\r\n const toggleHandleStyle: React.CSSProperties = {\r\n width: height - (padding * 2),\r\n transform: `translateX(${getOffset()}px)`,\r\n top: padding,\r\n bottom: padding,\r\n left: padding,\r\n };\r\n const handleClassName = classnames(\r\n \"core-toggle-handle\",\r\n toggling && \"core-toggling\",\r\n );\r\n\r\n return (\r\n <label ref={setHeightFromRef} style={toggleStyle} className={toggleClassName} onBlur={handleBlur}>\r\n <input type=\"checkbox\" ref={refs} className=\"core-toggle-input\"\r\n checked={checked} disabled={props.disabled}\r\n onChange={handleChange} onBlur={handleCheckboxBlur}\r\n title={props.title} />\r\n <span className=\"core-toggle-background\" />\r\n <span className={checkmarkClassName} />\r\n <span className={handleClassName} style={toggleHandleStyle} />\r\n </label>\r\n );\r\n }\r\n);\r\n\r\n/**\r\n * Toggle React component to show an \"on\" or \"off\" state\r\n * @public\r\n * @deprecated in 3.0. Use ToggleSwitch in itwinui-react instead\r\n */\r\nexport const Toggle: (props: ToggleProps) => JSX.Element | null = ForwardRefToggle; // eslint-disable-line deprecation/deprecation\r\n"]}
|
|
@@ -7,12 +7,12 @@ import { CommonProps } from "../utils/Props";
|
|
|
7
7
|
import { RelativePosition } from "@itwin/appui-abstract";
|
|
8
8
|
/** Available tooltip placements.
|
|
9
9
|
* @beta
|
|
10
|
-
* @deprecated Use Placement in itwinui-react instead
|
|
10
|
+
* @deprecated in 3.0. Use Placement in itwinui-react instead
|
|
11
11
|
*/
|
|
12
12
|
export declare type TooltipPlacement = "bottom" | "left" | "right" | "top";
|
|
13
13
|
/** Properties for the [[Tooltip]] component
|
|
14
14
|
* @beta
|
|
15
|
-
* @deprecated Use TooltipProps in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use TooltipProps in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
export interface TooltipProps extends CommonProps {
|
|
18
18
|
/** Tooltip content. */
|
|
@@ -26,7 +26,7 @@ export interface TooltipProps extends CommonProps {
|
|
|
26
26
|
}
|
|
27
27
|
/** Component that displays tooltip for a specified target element.
|
|
28
28
|
* @beta
|
|
29
|
-
* @deprecated Use Tooltip in itwinui-react instead
|
|
29
|
+
* @deprecated in 3.0. Use Tooltip in itwinui-react instead
|
|
30
30
|
*/
|
|
31
31
|
export declare function Tooltip(props: TooltipProps): JSX.Element;
|
|
32
32
|
/** @internal */
|
|
@@ -13,7 +13,7 @@ import { Popup } from "../popup/Popup";
|
|
|
13
13
|
import { RelativePosition } from "@itwin/appui-abstract";
|
|
14
14
|
/** Component that displays tooltip for a specified target element.
|
|
15
15
|
* @beta
|
|
16
|
-
* @deprecated Use Tooltip in itwinui-react instead
|
|
16
|
+
* @deprecated in 3.0. Use Tooltip in itwinui-react instead
|
|
17
17
|
*/
|
|
18
18
|
export function Tooltip(props) {
|
|
19
19
|
const { visible, target, placement } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../src/core-react/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,gBAAgB,CAAC;AACxB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAuBzD;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAmB;IACzC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,UAAU,GAAG,GAAG,EA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AAK,OAAO;YACV,OAAO,gBAAgB,CAAC,KAAK,CAAC;QAChC,KAAK,SAAS,CAAC;QACf,KAAK,KAAK;YACR,OAAO,gBAAgB,CAAC,GAAG,CAAC;KAC/B;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tooltip\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport \"./Tooltip.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Popup } from \"../popup/Popup\";\r\nimport { RelativePosition } from \"@itwin/appui-abstract\";\r\n\r\n/** Available tooltip placements.\r\n * @beta\r\n * @deprecated Use Placement in itwinui-react instead\r\n */\r\nexport type TooltipPlacement = \"bottom\" | \"left\" | \"right\" | \"top\";\r\n\r\n/** Properties for the [[Tooltip]] component\r\n * @beta\r\n * @deprecated Use TooltipProps in itwinui-react instead\r\n */\r\nexport interface TooltipProps extends CommonProps {\r\n /** Tooltip content. */\r\n children?: React.ReactNode;\r\n /** Target element of a tooltip. */\r\n target?: HTMLElement;\r\n /** Allows to control tooltip visibility state. */\r\n visible?: boolean;\r\n /** Preferred tooltip placement. Defaults to `top`. */\r\n placement?: TooltipPlacement;\r\n}\r\n\r\n/** Component that displays tooltip for a specified target element.\r\n * @beta\r\n * @deprecated Use Tooltip in itwinui-react instead\r\n */\r\nexport function Tooltip(props: TooltipProps) {\r\n const { visible, target, placement } = props;\r\n const [open, setOpen] = React.useState(false);\r\n React.useEffect(() => {\r\n const mouseenter = () => {\r\n setOpen(true);\r\n };\r\n const mouseleave = () => {\r\n setOpen(false);\r\n };\r\n visible === undefined && target && target.addEventListener(\"mouseenter\", mouseenter);\r\n visible === undefined && target && target.addEventListener(\"mouseleave\", mouseleave);\r\n return () => {\r\n visible === undefined && target && target.removeEventListener(\"mouseenter\", mouseenter);\r\n visible === undefined && target && target.removeEventListener(\"mouseleave\", mouseleave);\r\n };\r\n }, [visible, target]);\r\n const className = classnames(\r\n \"core-tooltip-tooltip\",\r\n props.className,\r\n );\r\n return (\r\n <Popup\r\n className={className}\r\n isOpen={props.visible === undefined ? open : props.visible}\r\n position={placementToPosition(placement)}\r\n showShadow={false}\r\n target={target}\r\n >\r\n {props.children}\r\n </Popup>\r\n );\r\n}\r\n\r\n/** @internal */\r\nexport function placementToPosition(placement: TooltipPlacement | undefined): RelativePosition {\r\n switch (placement) {\r\n case \"bottom\":\r\n return RelativePosition.Bottom;\r\n case \"left\":\r\n return RelativePosition.Left;\r\n case \"right\":\r\n return RelativePosition.Right;\r\n case undefined:\r\n case \"top\":\r\n return RelativePosition.Top;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../src/core-react/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,gBAAgB,CAAC;AACxB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAuBzD;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAmB;IACzC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,UAAU,GAAG,GAAG,EAAE;YACtB,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC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ChC,KAAK,SAAS,CAAC;QACf,KAAK,KAAK;YACR,OAAO,gBAAgB,CAAC,GAAG,CAAC;KAC/B;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tooltip\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport \"./Tooltip.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Popup } from \"../popup/Popup\";\r\nimport { RelativePosition } from \"@itwin/appui-abstract\";\r\n\r\n/** Available tooltip placements.\r\n * @beta\r\n * @deprecated in 3.0. Use Placement in itwinui-react instead\r\n */\r\nexport type TooltipPlacement = \"bottom\" | \"left\" | \"right\" | \"top\";\r\n\r\n/** Properties for the [[Tooltip]] component\r\n * @beta\r\n * @deprecated in 3.0. Use TooltipProps in itwinui-react instead\r\n */\r\nexport interface TooltipProps extends CommonProps {\r\n /** Tooltip content. */\r\n children?: React.ReactNode;\r\n /** Target element of a tooltip. */\r\n target?: HTMLElement;\r\n /** Allows to control tooltip visibility state. */\r\n visible?: boolean;\r\n /** Preferred tooltip placement. Defaults to `top`. */\r\n placement?: TooltipPlacement;\r\n}\r\n\r\n/** Component that displays tooltip for a specified target element.\r\n * @beta\r\n * @deprecated in 3.0. Use Tooltip in itwinui-react instead\r\n */\r\nexport function Tooltip(props: TooltipProps) {\r\n const { visible, target, placement } = props;\r\n const [open, setOpen] = React.useState(false);\r\n React.useEffect(() => {\r\n const mouseenter = () => {\r\n setOpen(true);\r\n };\r\n const mouseleave = () => {\r\n setOpen(false);\r\n };\r\n visible === undefined && target && target.addEventListener(\"mouseenter\", mouseenter);\r\n visible === undefined && target && target.addEventListener(\"mouseleave\", mouseleave);\r\n return () => {\r\n visible === undefined && target && target.removeEventListener(\"mouseenter\", mouseenter);\r\n visible === undefined && target && target.removeEventListener(\"mouseleave\", mouseleave);\r\n };\r\n }, [visible, target]);\r\n const className = classnames(\r\n \"core-tooltip-tooltip\",\r\n props.className,\r\n );\r\n return (\r\n <Popup\r\n className={className}\r\n isOpen={props.visible === undefined ? open : props.visible}\r\n position={placementToPosition(placement)}\r\n showShadow={false}\r\n target={target}\r\n >\r\n {props.children}\r\n </Popup>\r\n );\r\n}\r\n\r\n/** @internal */\r\nexport function placementToPosition(placement: TooltipPlacement | undefined): RelativePosition {\r\n switch (placement) {\r\n case \"bottom\":\r\n return RelativePosition.Bottom;\r\n case \"left\":\r\n return RelativePosition.Left;\r\n case \"right\":\r\n return RelativePosition.Right;\r\n case undefined:\r\n case \"top\":\r\n return RelativePosition.Top;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointProps.js","sourceRoot":"","sources":["../../../../src/core-react/utils/PointProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Describes 2d points.\r\n * @public\r\n * @deprecated Use [PointProps]($appui-abstract) instead\r\n */\r\nexport interface PointProps {\r\n readonly x: number;\r\n readonly y: number;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"PointProps.js","sourceRoot":"","sources":["../../../../src/core-react/utils/PointProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Describes 2d points.\r\n * @public\r\n * @deprecated in 3.0. Use [PointProps]($appui-abstract) instead\r\n */\r\nexport interface PointProps {\r\n readonly x: number;\r\n readonly y: number;\r\n}\r\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { BeUiEvent } from "@itwin/core-bentley";
|
|
5
5
|
/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.
|
|
6
|
-
* @public @deprecated Use UiEvent in appui-abstract instead
|
|
6
|
+
* @public @deprecated in 3.0. Use UiEvent in appui-abstract instead
|
|
7
7
|
*/
|
|
8
8
|
export declare class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> {
|
|
9
9
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { BeUiEvent } from "@itwin/core-bentley";
|
|
9
9
|
/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.
|
|
10
|
-
* @public @deprecated Use UiEvent in appui-abstract instead
|
|
10
|
+
* @public @deprecated in 3.0. Use UiEvent in appui-abstract instead
|
|
11
11
|
*/
|
|
12
12
|
export class UiEvent extends BeUiEvent {
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiEvent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/UiEvent.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,OAAoB,SAAQ,SAAqB;CAAI","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\n\r\n/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.\r\n * @public @deprecated Use UiEvent in appui-abstract instead\r\n */\r\nexport class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> { }\r\n"]}
|
|
1
|
+
{"version":3,"file":"UiEvent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/UiEvent.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,OAAoB,SAAQ,SAAqB;CAAI","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\n\r\n/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.\r\n * @public @deprecated in 3.0. Use UiEvent in appui-abstract instead\r\n */\r\nexport class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> { }\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0-dev.1",
|
|
4
4
|
"description": "iTwin.js UI core components",
|
|
5
5
|
"main": "lib/cjs/core-react.js",
|
|
6
6
|
"module": "lib/esm/core-react.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"url": "http://www.bentley.com"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@itwin/appui-abstract": "^3.
|
|
26
|
-
"@itwin/core-bentley": "^3.
|
|
25
|
+
"@itwin/appui-abstract": "^3.7.0-dev.1",
|
|
26
|
+
"@itwin/core-bentley": "^3.7.0-dev.1",
|
|
27
27
|
"react": "^17.0.0",
|
|
28
28
|
"react-dom": "^17.0.0"
|
|
29
29
|
},
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"NOTE: All tools used by scripts in this package must be listed as devDependencies"
|
|
33
33
|
],
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@itwin/appui-abstract": "3.
|
|
36
|
-
"@itwin/build-tools": "3.
|
|
37
|
-
"@itwin/core-bentley": "3.
|
|
38
|
-
"@itwin/core-common": "3.
|
|
39
|
-
"@itwin/core-i18n": "3.
|
|
40
|
-
"@itwin/eslint-plugin": "3.
|
|
35
|
+
"@itwin/appui-abstract": "3.7.0-dev.1",
|
|
36
|
+
"@itwin/build-tools": "3.7.0-dev.1",
|
|
37
|
+
"@itwin/core-bentley": "3.7.0-dev.1",
|
|
38
|
+
"@itwin/core-common": "3.7.0-dev.1",
|
|
39
|
+
"@itwin/core-i18n": "3.7.0-dev.1",
|
|
40
|
+
"@itwin/eslint-plugin": "3.7.0-dev.1",
|
|
41
41
|
"@testing-library/dom": "^8.11.2",
|
|
42
42
|
"@testing-library/react": "^12.0.0",
|
|
43
43
|
"@testing-library/react-hooks": "^7.0.2",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@bentley/icons-generic-webfont": "^1.0.15",
|
|
85
85
|
"@itwin/itwinui-css": "0.x",
|
|
86
|
-
"@itwin/itwinui-react": "~1.
|
|
86
|
+
"@itwin/itwinui-react": "~1.46.0",
|
|
87
87
|
"classnames": "^2.3.1",
|
|
88
88
|
"dompurify": "^2.0.12",
|
|
89
89
|
"lodash": "^4.17.10",
|
|
@@ -112,6 +112,16 @@
|
|
|
112
112
|
"extends": [
|
|
113
113
|
"plugin:@itwin/ui",
|
|
114
114
|
"plugin:@itwin/jsdoc"
|
|
115
|
+
],
|
|
116
|
+
"overrides": [
|
|
117
|
+
{
|
|
118
|
+
"files": [
|
|
119
|
+
"src/test/**/*"
|
|
120
|
+
],
|
|
121
|
+
"rules": {
|
|
122
|
+
"deprecation/deprecation": "off"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
115
125
|
]
|
|
116
126
|
},
|
|
117
127
|
"scripts": {
|