@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
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import { CommonProps } from "../utils/Props";
|
|
6
6
|
/** Properties for [[Textarea]] component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use TextareaProps in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use TextareaProps in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonProps {
|
|
11
11
|
/** Number of textarea rows. Default is 3. */
|
|
@@ -17,7 +17,7 @@ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextArea
|
|
|
17
17
|
}
|
|
18
18
|
/** Basic textarea component
|
|
19
19
|
* @public
|
|
20
|
-
* @deprecated Use Textarea in itwinui-react instead
|
|
20
|
+
* @deprecated in 3.0. Use Textarea in itwinui-react instead
|
|
21
21
|
*/
|
|
22
22
|
export declare const Textarea: (props: TextareaProps) => JSX.Element | null;
|
|
23
23
|
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -27,7 +27,7 @@ function ForwardRefTextarea(props, ref) {
|
|
|
27
27
|
});
|
|
28
28
|
/** Basic textarea component
|
|
29
29
|
* @public
|
|
30
|
-
* @deprecated Use Textarea in itwinui-react instead
|
|
30
|
+
* @deprecated in 3.0. Use Textarea in itwinui-react instead
|
|
31
31
|
*/
|
|
32
32
|
export const Textarea = ForwardRefTextarea; // eslint-disable-line deprecation/deprecation
|
|
33
33
|
//# sourceMappingURL=Textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Textarea.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,QAAQ,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAgBjD,0GAA0G;AAC1G,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAyC,8CAA8C;AAChI,SAAS,kBAAkB,CAAC,KAAK,EAAE,GAAG;IACpC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC,CAAC,wDAAwD;IAC3H,MAAM,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAsB,IAAI,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC,CAAE,uGAAuG;IAEvJ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,kBAAkB,CAAC,OAAO,IAAI,QAAQ;YACxC,kBAAkB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAA4C,EAAE,EAAE;QACrF,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,gBAAgB,OAAK,UAAU,EAC9B,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,UAAU,CAAC,wBAAwB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC/E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAiD,kBAAkB,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 Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Textarea as ITwinUI_Textarea } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[Textarea]] component\r\n * @public\r\n * @deprecated Use TextareaProps in itwinui-react instead\r\n */\r\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonProps {\r\n /** Number of textarea rows. Default is 3. */\r\n rows?: number;\r\n /** Indicates whether to set focus to the textarea element */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLTextAreaElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefTextarea(props, ref) {\r\n const { className, style, rows, setFocus, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const textRows = undefined !== rows ? rows : 3;\r\n const textAreaElementRef = React.useRef<HTMLTextAreaElement>(null);\r\n const refs = useRefs(textAreaElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n if (textAreaElementRef.current && setFocus)\r\n textAreaElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLTextAreaElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Textarea {...otherProps}\r\n ref={refs}\r\n rows={textRows}\r\n onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-textarea\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic textarea component\r\n * @public\r\n * @deprecated Use Textarea in itwinui-react instead\r\n */\r\nexport const Textarea: (props: TextareaProps) => JSX.Element | null = ForwardRefTextarea; // eslint-disable-line deprecation/deprecation\r\n"]}
|
|
1
|
+
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/core-react/inputs/Textarea.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAA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,MAAM,CAAC,MAAM,QAAQ,GAAiD,kBAAkB,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 Inputs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Textarea as ITwinUI_Textarea } from \"@itwin/itwinui-react\";\r\nimport { useRefs } from \"../utils/hooks/useRefs\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[Textarea]] component\r\n * @public\r\n * @deprecated in 3.0. Use TextareaProps in itwinui-react instead\r\n */\r\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonProps {\r\n /** Number of textarea rows. Default is 3. */\r\n rows?: number;\r\n /** Indicates whether to set focus to the textarea element */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLTextAreaElement>;\r\n}\r\n\r\n// Defined using following pattern (const Input at bottom) to ensure useful API documentation is extracted\r\nconst ForwardRefTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( // eslint-disable-line deprecation/deprecation\r\n function ForwardRefTextarea(props, ref) {\r\n const { className, style, rows, setFocus, ...otherProps } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const textRows = undefined !== rows ? rows : 3;\r\n const textAreaElementRef = React.useRef<HTMLTextAreaElement>(null);\r\n const refs = useRefs(textAreaElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n if (textAreaElementRef.current && setFocus)\r\n textAreaElementRef.current.focus();\r\n }, [setFocus]);\r\n\r\n const handleFocus = React.useCallback((event: React.FocusEvent<HTMLTextAreaElement>) => {\r\n event.currentTarget.select();\r\n }, []);\r\n\r\n return (\r\n <ITwinUI_Textarea {...otherProps}\r\n ref={refs}\r\n rows={textRows}\r\n onFocus={handleFocus}\r\n className={classnames(\"uicore-inputs-textarea\", className)} style={style} />\r\n );\r\n }\r\n);\r\n\r\n/** Basic textarea component\r\n * @public\r\n * @deprecated in 3.0. Use Textarea in itwinui-react instead\r\n */\r\nexport const Textarea: (props: TextareaProps) => JSX.Element | null = ForwardRefTextarea; // eslint-disable-line deprecation/deprecation\r\n"]}
|
|
@@ -5,7 +5,7 @@ import "./Spinner.scss";
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
/** Size for [[Spinner]] component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use `size` in ProgressRadialProps in itwinui-react instead.
|
|
8
|
+
* @deprecated in 3.0. Use `size` in ProgressRadialProps in itwinui-react instead.
|
|
9
9
|
*/
|
|
10
10
|
export declare enum SpinnerSize {
|
|
11
11
|
/** width/height of 16px */
|
|
@@ -19,7 +19,7 @@ export declare enum SpinnerSize {
|
|
|
19
19
|
}
|
|
20
20
|
/** Properties for [[Spinner]] component
|
|
21
21
|
* @public
|
|
22
|
-
* @deprecated Use ProgressRadialProps in itwinui-react instead.
|
|
22
|
+
* @deprecated in 3.0. Use ProgressRadialProps in itwinui-react instead.
|
|
23
23
|
*/
|
|
24
24
|
export interface SpinnerProps {
|
|
25
25
|
/** Size of spinner */
|
|
@@ -30,7 +30,7 @@ export interface SpinnerProps {
|
|
|
30
30
|
/**
|
|
31
31
|
* An indeterminate spinner component.
|
|
32
32
|
* @public
|
|
33
|
-
* @deprecated Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
|
|
33
|
+
* @deprecated in 3.0. Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
|
|
34
34
|
*/
|
|
35
35
|
export declare class Spinner extends React.PureComponent<SpinnerProps> {
|
|
36
36
|
render(): JSX.Element;
|
|
@@ -11,7 +11,7 @@ import * as React from "react";
|
|
|
11
11
|
// cspell:ignore xlarge
|
|
12
12
|
/** Size for [[Spinner]] component
|
|
13
13
|
* @public
|
|
14
|
-
* @deprecated Use `size` in ProgressRadialProps in itwinui-react instead.
|
|
14
|
+
* @deprecated in 3.0. Use `size` in ProgressRadialProps in itwinui-react instead.
|
|
15
15
|
*/
|
|
16
16
|
export var SpinnerSize;
|
|
17
17
|
(function (SpinnerSize) {
|
|
@@ -27,7 +27,7 @@ export var SpinnerSize;
|
|
|
27
27
|
/**
|
|
28
28
|
* An indeterminate spinner component.
|
|
29
29
|
* @public
|
|
30
|
-
* @deprecated Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
|
|
30
|
+
* @deprecated in 3.0. Use ProgressRadial in itwinui-react with `indeterminate` prop instead.
|
|
31
31
|
*/
|
|
32
32
|
export class Spinner extends React.PureComponent {
|
|
33
33
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../src/core-react/loading/Spinner.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,4CAA4C;AAC5C,uBAAuB;AAEvB;;;GAGG;AACH,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,2BAA2B;IAC3B,+CAAK,CAAA;IACL,2BAA2B;IAC3B,iDAAM,CAAA;IACN,2BAA2B;IAC3B,+CAAK,CAAA;IACL,2BAA2B;IAC3B,iDAAM,CAAA;AACR,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAaD;;;;GAIG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,aAA2B;IAE5C,MAAM;QACpB,IAAI,SAAiB,CAAC;QAEtB,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;YACtB,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;aAC9B;YACH,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;gBACvB,KAAK,WAAW,CAAC,KAAK;oBACpB,SAAS,GAAG,oBAAoB,CAAC;oBACjC,MAAM;gBACR,KAAK,WAAW,CAAC,KAAK;oBACpB,SAAS,GAAG,oBAAoB,CAAC;oBACjC,MAAM;gBACR,KAAK,WAAW,CAAC,MAAM;oBACrB,SAAS,GAAG,qBAAqB,CAAC;oBAClC,MAAM;gBACR,KAAK,WAAW,CAAC,MAAM,CAAC;gBACxB;oBACE,SAAS,GAAG,qBAAqB,CAAC;oBAClC,MAAM;aACT;SACF;QAED,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,GAAI,CAC9B,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 Loading\r\n */\r\n\r\nimport \"./Spinner.scss\";\r\nimport * as React from \"react\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n// cspell:ignore xlarge\r\n\r\n/** Size for [[Spinner]] component\r\n * @public\r\n * @deprecated Use `size` in ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport enum SpinnerSize {\r\n /** width/height of 16px */\r\n Small,\r\n /** width/height of 32px */\r\n Medium,\r\n /** width/height of 64px */\r\n Large,\r\n /** width/height of 96px */\r\n XLarge,\r\n}\r\n\r\n/** Properties for [[Spinner]] component\r\n * @public\r\n * @deprecated Use ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport interface SpinnerProps {\r\n /** Size of spinner */\r\n size?: SpinnerSize;\r\n /** CSS class for size of spinner */\r\n sizeClass?: string;\r\n}\r\n\r\n/**\r\n * An indeterminate spinner component.\r\n * @public\r\n * @deprecated Use ProgressRadial in itwinui-react with `indeterminate` prop instead.\r\n */\r\nexport class Spinner extends React.PureComponent<SpinnerProps> {\r\n\r\n public override render() {\r\n let sizeClass: string;\r\n\r\n if (this.props.sizeClass)\r\n sizeClass = this.props.sizeClass;\r\n else {\r\n switch (this.props.size) {\r\n case SpinnerSize.Small:\r\n sizeClass = \"core-spinner-small\";\r\n break;\r\n case SpinnerSize.Large:\r\n sizeClass = \"core-spinner-large\";\r\n break;\r\n case SpinnerSize.XLarge:\r\n sizeClass = \"core-spinner-xlarge\";\r\n break;\r\n case SpinnerSize.Medium:\r\n default:\r\n sizeClass = \"core-spinner-medium\";\r\n break;\r\n }\r\n }\r\n\r\n return (\r\n <div className={sizeClass} />\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../src/core-react/loading/Spinner.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,4CAA4C;AAC5C,uBAAuB;AAEvB;;;GAGG;AACH,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,2BAA2B;IAC3B,+CAAK,CAAA;IACL,2BAA2B;IAC3B,iDAAM,CAAA;IACN,2BAA2B;IAC3B,+CAAK,CAAA;IACL,2BAA2B;IAC3B,iDAAM,CAAA;AACR,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAaD;;;;GAIG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,aAA2B;IAE5C,MAAM;QACpB,IAAI,SAAiB,CAAC;QAEtB,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;YACtB,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;aAC9B;YACH,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;gBACvB,KAAK,WAAW,CAAC,KAAK;oBACpB,SAAS,GAAG,oBAAoB,CAAC;oBACjC,MAAM;gBACR,KAAK,WAAW,CAAC,KAAK;oBACpB,SAAS,GAAG,oBAAoB,CAAC;oBACjC,MAAM;gBACR,KAAK,WAAW,CAAC,MAAM;oBACrB,SAAS,GAAG,qBAAqB,CAAC;oBAClC,MAAM;gBACR,KAAK,WAAW,CAAC,MAAM,CAAC;gBACxB;oBACE,SAAS,GAAG,qBAAqB,CAAC;oBAClC,MAAM;aACT;SACF;QAED,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,GAAI,CAC9B,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 Loading\r\n */\r\n\r\nimport \"./Spinner.scss\";\r\nimport * as React from \"react\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n// cspell:ignore xlarge\r\n\r\n/** Size for [[Spinner]] component\r\n * @public\r\n * @deprecated in 3.0. Use `size` in ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport enum SpinnerSize {\r\n /** width/height of 16px */\r\n Small,\r\n /** width/height of 32px */\r\n Medium,\r\n /** width/height of 64px */\r\n Large,\r\n /** width/height of 96px */\r\n XLarge,\r\n}\r\n\r\n/** Properties for [[Spinner]] component\r\n * @public\r\n * @deprecated in 3.0. Use ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport interface SpinnerProps {\r\n /** Size of spinner */\r\n size?: SpinnerSize;\r\n /** CSS class for size of spinner */\r\n sizeClass?: string;\r\n}\r\n\r\n/**\r\n * An indeterminate spinner component.\r\n * @public\r\n * @deprecated in 3.0. Use ProgressRadial in itwinui-react with `indeterminate` prop instead.\r\n */\r\nexport class Spinner extends React.PureComponent<SpinnerProps> {\r\n\r\n public override render() {\r\n let sizeClass: string;\r\n\r\n if (this.props.sizeClass)\r\n sizeClass = this.props.sizeClass;\r\n else {\r\n switch (this.props.size) {\r\n case SpinnerSize.Small:\r\n sizeClass = \"core-spinner-small\";\r\n break;\r\n case SpinnerSize.Large:\r\n sizeClass = \"core-spinner-large\";\r\n break;\r\n case SpinnerSize.XLarge:\r\n sizeClass = \"core-spinner-xlarge\";\r\n break;\r\n case SpinnerSize.Medium:\r\n default:\r\n sizeClass = \"core-spinner-medium\";\r\n break;\r\n }\r\n }\r\n\r\n return (\r\n <div className={sizeClass} />\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageSeverity.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageSeverity.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;IAGI;AACJ,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,mEAAe,CAAA;IACf,6DAAY,CAAA;IACZ,2DAAW,CAAA;IACX,uDAAS,CAAA;IACT,uDAAS,CAAA;AACX,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B","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 Dialog\r\n */\r\n\r\n/** Message Severity enum.\r\n * @public\r\n * @deprecated Use [MessageSeverity]($appui-abstract) instead\r\n */\r\nexport enum MessageSeverity {\r\n None = 0,\r\n Information = 1,\r\n Question = 2,\r\n Warning = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"MessageSeverity.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageSeverity.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;IAGI;AACJ,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,mEAAe,CAAA;IACf,6DAAY,CAAA;IACZ,2DAAW,CAAA;IACX,uDAAS,CAAA;IACT,uDAAS,CAAA;AACX,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B","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 Dialog\r\n */\r\n\r\n/** Message Severity enum.\r\n * @public\r\n * @deprecated in 3.0. Use [MessageSeverity]($appui-abstract) instead\r\n */\r\nexport enum MessageSeverity {\r\n None = 0,\r\n Information = 1,\r\n Question = 2,\r\n Warning = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { CommonProps } from "../utils/Props";
|
|
6
6
|
/** Properties for [[ProgressBar]] component
|
|
7
7
|
* @beta
|
|
8
|
-
* @deprecated Use ProgressLinearProps in itwinui-react instead.
|
|
8
|
+
* @deprecated in 3.0. Use ProgressLinearProps in itwinui-react instead.
|
|
9
9
|
*/
|
|
10
10
|
export interface ProgressBarProps extends CommonProps {
|
|
11
11
|
/** Height (in pixels) of the progress bar. (defaults to 4px) */
|
|
@@ -23,7 +23,7 @@ export interface ProgressBarProps extends CommonProps {
|
|
|
23
23
|
* ProgressBar React component shows a horizontal progress bar.
|
|
24
24
|
* The determinate bar reflects a percentage and the indeterminate bar continuously animates.
|
|
25
25
|
* @beta
|
|
26
|
-
* @deprecated Use ProgressLinear in itwinui-react instead.
|
|
26
|
+
* @deprecated in 3.0. Use ProgressLinear in itwinui-react instead.
|
|
27
27
|
*/
|
|
28
28
|
export declare function ProgressBar(props: ProgressBarProps): JSX.Element;
|
|
29
29
|
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -12,7 +12,7 @@ import { percentInRange } from "../loading/LoadingBar";
|
|
|
12
12
|
* ProgressBar React component shows a horizontal progress bar.
|
|
13
13
|
* The determinate bar reflects a percentage and the indeterminate bar continuously animates.
|
|
14
14
|
* @beta
|
|
15
|
-
* @deprecated Use ProgressLinear in itwinui-react instead.
|
|
15
|
+
* @deprecated in 3.0. Use ProgressLinear in itwinui-react instead.
|
|
16
16
|
*/
|
|
17
17
|
export function ProgressBar(props) {
|
|
18
18
|
const percent = props.percent !== undefined ? percentInRange(props.percent) : 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../../src/core-react/progress-indicators/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAmBvD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,MAAM,UAAU,GAAwB;QACtC,GAAG,KAAK,CAAC,KAAK;QACd,MAAM,EAAE,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS;KAC3E,CAAC;IACF,MAAM,UAAU,GAAwB;QACtC,KAAK,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,SAAS;KACxD,CAAC;IACF,MAAM,UAAU,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,mCAAmC,CAAC;IAClH,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC;IACjF,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC;IACvF,MAAM,GAAG,GAAG,CACV,6BAAK,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,UAAU;QACnF,6BAAK,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAI,CAC7C,CACP,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzB,GAAG,CAAC,CAAC;QACL,CACE,6BAAK,SAAS,EAAC,6BAA6B;YACzC,GAAG;YACJ,6BAAK,SAAS,EAAC,cAAc;gBAC1B,cAAc,IAAI;oBAAE,kCAAO,KAAK,CAAC,SAAS,CAAQ;oBAAA,kCAAO,KAAK,CAAC,UAAU,CAAQ,CAAG;gBACpF,CAAC,cAAc,IAAI;oBAAG,KAAK,CAAC,SAAS;oBAAE,KAAK,CAAC,UAAU,CAAI,CACxD,CACF,CACP,CAAC;IAEJ,OAAO,OAAO,CAAC;AACjB,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 Loading\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { percentInRange } from \"../loading/LoadingBar\";\r\n\r\n/** Properties for [[ProgressBar]] component\r\n * @beta\r\n * @deprecated Use ProgressLinearProps in itwinui-react instead.\r\n */\r\nexport interface ProgressBarProps extends CommonProps {\r\n /** Height (in pixels) of the progress bar. (defaults to 4px) */\r\n barHeight?: number;\r\n /** Indicates whether the progress bar is determinate showing a percentage or indeterminate continuously animating. (defaults to false) */\r\n indeterminate?: boolean;\r\n /** One of two possible labels. If only one label is given it will be centered. Otherwise, this label is shown on the left. */\r\n labelLeft?: string;\r\n /** One of two possible labels. If only one label is given it will be centered. Otherwise, this label is shown on the right. */\r\n labelRight?: string;\r\n /** Percent for determinate progress bar. */\r\n percent?: number;\r\n}\r\n\r\n/**\r\n * ProgressBar React component shows a horizontal progress bar.\r\n * The determinate bar reflects a percentage and the indeterminate bar continuously animates.\r\n * @beta\r\n * @deprecated Use ProgressLinear in itwinui-react instead.\r\n */\r\nexport function ProgressBar(props: ProgressBarProps) { // eslint-disable-line deprecation/deprecation\r\n const percent = props.percent !== undefined ? percentInRange(props.percent) : 0;\r\n const outerStyle: React.CSSProperties = {\r\n ...props.style,\r\n height: props.barHeight !== undefined ? `${props.barHeight}px` : undefined,\r\n };\r\n const innerStyle: React.CSSProperties = {\r\n width: !props.indeterminate ? `${percent}%` : undefined,\r\n };\r\n const innerClass = !props.indeterminate ? \"uicore-progress-bar-determinate\" : \"uicore-progress-bar-indeterminate\";\r\n const hasLabel = props.labelLeft !== undefined || props.labelRight !== undefined;\r\n const multipleLabels = props.labelLeft !== undefined && props.labelRight !== undefined;\r\n const bar = (\r\n <div className={classnames(\"uicore-progress-bar\", props.className)} style={outerStyle}>\r\n <div className={innerClass} style={innerStyle} />\r\n </div>\r\n );\r\n const content = !hasLabel ?\r\n bar :\r\n (\r\n <div className=\"uicore-progress-bar-labeled\">\r\n {bar}\r\n <div className=\"uicore-label\">\r\n {multipleLabels && <><span>{props.labelLeft}</span><span>{props.labelRight}</span></>}\r\n {!multipleLabels && <>{props.labelLeft}{props.labelRight}</>}\r\n </div>\r\n </div>\r\n );\r\n\r\n return content;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../../src/core-react/progress-indicators/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAmBvD;;;;;GAKG;AACH,MAA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,UAAU,CAAQ,CAAG;gBACpF,CAAC,cAAc,IAAI;oBAAG,KAAK,CAAC,SAAS;oBAAE,KAAK,CAAC,UAAU,CAAI,CACxD,CACF,CACP,CAAC;IAEJ,OAAO,OAAO,CAAC;AACjB,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 Loading\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { percentInRange } from \"../loading/LoadingBar\";\r\n\r\n/** Properties for [[ProgressBar]] component\r\n * @beta\r\n * @deprecated in 3.0. Use ProgressLinearProps in itwinui-react instead.\r\n */\r\nexport interface ProgressBarProps extends CommonProps {\r\n /** Height (in pixels) of the progress bar. (defaults to 4px) */\r\n barHeight?: number;\r\n /** Indicates whether the progress bar is determinate showing a percentage or indeterminate continuously animating. (defaults to false) */\r\n indeterminate?: boolean;\r\n /** One of two possible labels. If only one label is given it will be centered. Otherwise, this label is shown on the left. */\r\n labelLeft?: string;\r\n /** One of two possible labels. If only one label is given it will be centered. Otherwise, this label is shown on the right. */\r\n labelRight?: string;\r\n /** Percent for determinate progress bar. */\r\n percent?: number;\r\n}\r\n\r\n/**\r\n * ProgressBar React component shows a horizontal progress bar.\r\n * The determinate bar reflects a percentage and the indeterminate bar continuously animates.\r\n * @beta\r\n * @deprecated in 3.0. Use ProgressLinear in itwinui-react instead.\r\n */\r\nexport function ProgressBar(props: ProgressBarProps) { // eslint-disable-line deprecation/deprecation\r\n const percent = props.percent !== undefined ? percentInRange(props.percent) : 0;\r\n const outerStyle: React.CSSProperties = {\r\n ...props.style,\r\n height: props.barHeight !== undefined ? `${props.barHeight}px` : undefined,\r\n };\r\n const innerStyle: React.CSSProperties = {\r\n width: !props.indeterminate ? `${percent}%` : undefined,\r\n };\r\n const innerClass = !props.indeterminate ? \"uicore-progress-bar-determinate\" : \"uicore-progress-bar-indeterminate\";\r\n const hasLabel = props.labelLeft !== undefined || props.labelRight !== undefined;\r\n const multipleLabels = props.labelLeft !== undefined && props.labelRight !== undefined;\r\n const bar = (\r\n <div className={classnames(\"uicore-progress-bar\", props.className)} style={outerStyle}>\r\n <div className={innerClass} style={innerStyle} />\r\n </div>\r\n );\r\n const content = !hasLabel ?\r\n bar :\r\n (\r\n <div className=\"uicore-progress-bar-labeled\">\r\n {bar}\r\n <div className=\"uicore-label\">\r\n {multipleLabels && <><span>{props.labelLeft}</span><span>{props.labelRight}</span></>}\r\n {!multipleLabels && <>{props.labelLeft}{props.labelRight}</>}\r\n </div>\r\n </div>\r\n );\r\n\r\n return content;\r\n}\r\n"]}
|
|
@@ -7,7 +7,7 @@ import { SpinnerSize } from "../loading/Spinner";
|
|
|
7
7
|
/**
|
|
8
8
|
* Properties for [[ProgressSpinner]] component
|
|
9
9
|
* @beta
|
|
10
|
-
* @deprecated Use ProgressRadialProps in itwinui-react instead.
|
|
10
|
+
* @deprecated in 3.0. Use ProgressRadialProps in itwinui-react instead.
|
|
11
11
|
*/
|
|
12
12
|
export interface ProgressSpinnerProps extends CommonProps {
|
|
13
13
|
/**
|
|
@@ -43,7 +43,7 @@ export interface ProgressSpinnerProps extends CommonProps {
|
|
|
43
43
|
/**
|
|
44
44
|
* Circular Progress Indicator that supports determinate and indeterminate modes.
|
|
45
45
|
* @beta
|
|
46
|
-
* @deprecated Use ProgressRadial in itwinui-react instead.
|
|
46
|
+
* @deprecated in 3.0. Use ProgressRadial in itwinui-react instead.
|
|
47
47
|
*/
|
|
48
48
|
export declare function ProgressSpinner(props: ProgressSpinnerProps): JSX.Element;
|
|
49
49
|
//# sourceMappingURL=ProgressSpinner.d.ts.map
|
|
@@ -12,7 +12,7 @@ import { SpinnerSize } from "../loading/Spinner";
|
|
|
12
12
|
/**
|
|
13
13
|
* Circular Progress Indicator that supports determinate and indeterminate modes.
|
|
14
14
|
* @beta
|
|
15
|
-
* @deprecated Use ProgressRadial in itwinui-react instead.
|
|
15
|
+
* @deprecated in 3.0. Use ProgressRadial in itwinui-react instead.
|
|
16
16
|
*/
|
|
17
17
|
export function ProgressSpinner(props) {
|
|
18
18
|
const { value = 0, indeterminate = false, success = false, error = false, style = {}, size, children, } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressSpinner.js","sourceRoot":"","sources":["../../../../src/core-react/progress-indicators/ProgressSpinner.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAuCjD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EACJ,KAAK,GAAG,CAAC,EACT,aAAa,GAAG,KAAK,EACrB,OAAO,GAAG,KAAK,EACf,KAAK,GAAG,KAAK,EACb,KAAK,GAAG,EAAE,EACV,IAAI,EACJ,QAAQ,GACT,GAAG,KAAK,CAAC;IAEV,IAAI,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IAChC,MAAM,SAAS,GAAwB,EAAE,CAAC;IAC1C,mCAAmC;IACnC,MAAM,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,IAAI,OAAwB,CAAC;IAE7B,IAAI,KAAK,EAAE;QACT,cAAc,GAAG,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,GAAG,oBAAC,IAAI,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AC;gBACV,MAAM;YACR,KAAK,WAAW,CAAC,MAAM,EAAG,8CAA8C;gBACtE,IAAI,GAAG,EAAE,CAAC;gBACV,MAAM;YACR,KAAK,WAAW,CAAC,KAAK,EAAI,8CAA8C;gBACtE,IAAI,GAAG,EAAE,CAAC;gBACV,MAAM;YACR,KAAK,WAAW,CAAC,MAAM,EAAG,8CAA8C;gBACtE,IAAI,GAAG,EAAE,CAAC;gBACV,MAAM;SACT;KACF;IACD,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/C,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC,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 Loading\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { SpinnerSize } from \"../loading/Spinner\";\r\n\r\n/**\r\n * Properties for [[ProgressSpinner]] component\r\n * @beta\r\n * @deprecated Use ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport interface ProgressSpinnerProps extends CommonProps {\r\n /**\r\n * Spinner percentage. Should be a number between 0 and 100.\r\n * @default 0\r\n */\r\n value?: number;\r\n /**\r\n * Spinner variant. If true, value will be ignored.\r\n * @default false\r\n */\r\n indeterminate?: boolean;\r\n /**\r\n * If true, spinner will be full, green, and display a checkmark.\r\n * @default false\r\n */\r\n success?: boolean;\r\n /**\r\n * If true, spinner will be full, red, and display an X.\r\n * @default false\r\n */\r\n error?: boolean;\r\n /**\r\n * Size of spinner\r\n * @default width/height of 40px\r\n */\r\n size?: SpinnerSize; // eslint-disable-line deprecation/deprecation\r\n /**\r\n * Child components\r\n */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Circular Progress Indicator that supports determinate and indeterminate modes.\r\n * @beta\r\n * @deprecated Use ProgressRadial in itwinui-react instead.\r\n */\r\nexport function ProgressSpinner(props: ProgressSpinnerProps) { // eslint-disable-line deprecation/deprecation\r\n const {\r\n value = 0,\r\n indeterminate = false,\r\n success = false,\r\n error = false,\r\n style = {},\r\n size,\r\n children,\r\n } = props;\r\n\r\n let outerClassName = classnames(\"uicore-progress-spinner\");\r\n const outerStyle = { ...style };\r\n const fillStyle: React.CSSProperties = {};\r\n // Ensure value is bounded 0 - 100;\r\n const dashOffset = 100 - Math.min(Math.max(value, 0), 100);\r\n let content: React.ReactNode;\r\n\r\n if (error) {\r\n outerClassName = classnames(outerClassName, \"error\");\r\n content = <Icon iconSpec=\"icon-close-2\" />;\r\n } else if (success) {\r\n outerClassName = classnames(outerClassName, \"success\");\r\n content = (\r\n <Icon iconSpec=\"icon-checkmark\" />\r\n );\r\n } else if (indeterminate) {\r\n outerClassName = classnames(outerClassName, \"indeterminate\");\r\n content = children;\r\n } else {\r\n outerClassName = classnames(outerClassName, \"determinate\");\r\n fillStyle.strokeDashoffset = dashOffset;\r\n content = children;\r\n }\r\n\r\n setDefaultDimensions(outerStyle, size);\r\n\r\n return (\r\n <div className={outerClassName} style={outerStyle}>\r\n <svg className=\"spinner\" viewBox=\"0 0 40 40\">\r\n <circle className=\"shape\" cx=\"20\" cy=\"20\" r=\"15.91549\" />\r\n <circle\r\n className=\"fill\"\r\n cx=\"20\"\r\n cy=\"20\"\r\n r=\"15.91549\"\r\n style={fillStyle}\r\n />\r\n </svg>\r\n {content && <span className=\"uicore-progress-spinner-content\">{content}</span>}\r\n </div>\r\n );\r\n}\r\n\r\nconst setDefaultDimensions = (style: React.CSSProperties, inSize?: SpinnerSize) => { // eslint-disable-line deprecation/deprecation\r\n let size = 40;\r\n\r\n if (inSize !== undefined) {\r\n switch (inSize) {\r\n case SpinnerSize.Small: // eslint-disable-line deprecation/deprecation\r\n size = 16;\r\n break;\r\n case SpinnerSize.Medium: // eslint-disable-line deprecation/deprecation\r\n size = 32;\r\n break;\r\n case SpinnerSize.Large: // eslint-disable-line deprecation/deprecation\r\n size = 64;\r\n break;\r\n case SpinnerSize.XLarge: // eslint-disable-line deprecation/deprecation\r\n size = 96;\r\n break;\r\n }\r\n }\r\n style.width = style.width ? style.width : size;\r\n style.height = style.height ? style.height : size;\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"ProgressSpinner.js","sourceRoot":"","sources":["../../../../src/core-react/progress-indicators/ProgressSpinner.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAuCjD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EACJ,KAAK,GAAG,CAAC,EACT,aAAa,GAAG,KAAK,EACrB,OAAO,GAAG,KAAK,EACf,KAAK,GAAG,KAAK,EACb,KAAK,GAAG,EAAE,EACV,IAAI,EACJ,QAAQ,GACT,GAAG,KAAK,CAAC;IAEV,IAAI,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IAChC,MAAM,SAAS,GAAwB,EAAE,CAAC;IAC1C,mCAAmC;IACnC,MAAM,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,IA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IAEd,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,QAAQ,MAAM,EAAE;YACd,KAAK,WAAW,CAAC,KAAK,EAAI,8CAA8C;gBACtE,IAAI,GAAG,EAAE,CAAC;gBACV,MAAM;YACR,KAAK,WAAW,CAAC,MAAM,EAAG,8CAA8C;gBACtE,IAAI,GAAG,EAAE,CAAC;gBACV,MAAM;YACR,KAAK,WAAW,CAAC,KAAK,EAAI,8CAA8C;gBACtE,IAAI,GAAG,EAAE,CAAC;gBACV,MAAM;YACR,KAAK,WAAW,CAAC,MAAM,EAAG,8CAA8C;gBACtE,IAAI,GAAG,EAAE,CAAC;gBACV,MAAM;SACT;KACF;IACD,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/C,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC,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 Loading\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { SpinnerSize } from \"../loading/Spinner\";\r\n\r\n/**\r\n * Properties for [[ProgressSpinner]] component\r\n * @beta\r\n * @deprecated in 3.0. Use ProgressRadialProps in itwinui-react instead.\r\n */\r\nexport interface ProgressSpinnerProps extends CommonProps {\r\n /**\r\n * Spinner percentage. Should be a number between 0 and 100.\r\n * @default 0\r\n */\r\n value?: number;\r\n /**\r\n * Spinner variant. If true, value will be ignored.\r\n * @default false\r\n */\r\n indeterminate?: boolean;\r\n /**\r\n * If true, spinner will be full, green, and display a checkmark.\r\n * @default false\r\n */\r\n success?: boolean;\r\n /**\r\n * If true, spinner will be full, red, and display an X.\r\n * @default false\r\n */\r\n error?: boolean;\r\n /**\r\n * Size of spinner\r\n * @default width/height of 40px\r\n */\r\n size?: SpinnerSize; // eslint-disable-line deprecation/deprecation\r\n /**\r\n * Child components\r\n */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Circular Progress Indicator that supports determinate and indeterminate modes.\r\n * @beta\r\n * @deprecated in 3.0. Use ProgressRadial in itwinui-react instead.\r\n */\r\nexport function ProgressSpinner(props: ProgressSpinnerProps) { // eslint-disable-line deprecation/deprecation\r\n const {\r\n value = 0,\r\n indeterminate = false,\r\n success = false,\r\n error = false,\r\n style = {},\r\n size,\r\n children,\r\n } = props;\r\n\r\n let outerClassName = classnames(\"uicore-progress-spinner\");\r\n const outerStyle = { ...style };\r\n const fillStyle: React.CSSProperties = {};\r\n // Ensure value is bounded 0 - 100;\r\n const dashOffset = 100 - Math.min(Math.max(value, 0), 100);\r\n let content: React.ReactNode;\r\n\r\n if (error) {\r\n outerClassName = classnames(outerClassName, \"error\");\r\n content = <Icon iconSpec=\"icon-close-2\" />;\r\n } else if (success) {\r\n outerClassName = classnames(outerClassName, \"success\");\r\n content = (\r\n <Icon iconSpec=\"icon-checkmark\" />\r\n );\r\n } else if (indeterminate) {\r\n outerClassName = classnames(outerClassName, \"indeterminate\");\r\n content = children;\r\n } else {\r\n outerClassName = classnames(outerClassName, \"determinate\");\r\n fillStyle.strokeDashoffset = dashOffset;\r\n content = children;\r\n }\r\n\r\n setDefaultDimensions(outerStyle, size);\r\n\r\n return (\r\n <div className={outerClassName} style={outerStyle}>\r\n <svg className=\"spinner\" viewBox=\"0 0 40 40\">\r\n <circle className=\"shape\" cx=\"20\" cy=\"20\" r=\"15.91549\" />\r\n <circle\r\n className=\"fill\"\r\n cx=\"20\"\r\n cy=\"20\"\r\n r=\"15.91549\"\r\n style={fillStyle}\r\n />\r\n </svg>\r\n {content && <span className=\"uicore-progress-spinner-content\">{content}</span>}\r\n </div>\r\n );\r\n}\r\n\r\nconst setDefaultDimensions = (style: React.CSSProperties, inSize?: SpinnerSize) => { // eslint-disable-line deprecation/deprecation\r\n let size = 40;\r\n\r\n if (inSize !== undefined) {\r\n switch (inSize) {\r\n case SpinnerSize.Small: // eslint-disable-line deprecation/deprecation\r\n size = 16;\r\n break;\r\n case SpinnerSize.Medium: // eslint-disable-line deprecation/deprecation\r\n size = 32;\r\n break;\r\n case SpinnerSize.Large: // eslint-disable-line deprecation/deprecation\r\n size = 64;\r\n break;\r\n case SpinnerSize.XLarge: // eslint-disable-line deprecation/deprecation\r\n size = 96;\r\n break;\r\n }\r\n }\r\n style.width = style.width ? style.width : size;\r\n style.height = style.height ? style.height : size;\r\n};\r\n"]}
|
|
@@ -6,13 +6,13 @@ import { LabeledComponentProps } from "../inputs/LabeledComponentProps";
|
|
|
6
6
|
import { CommonProps } from "../utils/Props";
|
|
7
7
|
/** Properties for [[Radio]] component
|
|
8
8
|
* @public
|
|
9
|
-
* @deprecated Use RadioProps in itwinui-react instead
|
|
9
|
+
* @deprecated in 3.0. Use RadioProps in itwinui-react instead
|
|
10
10
|
*/
|
|
11
11
|
export interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps, LabeledComponentProps {
|
|
12
12
|
}
|
|
13
13
|
/** Basic radio input component is a wrapper for the `<input type="radio">` HTML element.
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Radio in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Radio in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
export declare class Radio extends React.PureComponent<RadioProps> {
|
|
18
18
|
render(): JSX.Element;
|
|
@@ -9,7 +9,7 @@ import classnames from "classnames";
|
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
/** Basic radio input component is a wrapper for the `<input type="radio">` HTML element.
|
|
11
11
|
* @public
|
|
12
|
-
* @deprecated Use Radio in itwinui-react instead
|
|
12
|
+
* @deprecated in 3.0. Use Radio in itwinui-react instead
|
|
13
13
|
*/
|
|
14
14
|
export class Radio extends React.PureComponent {
|
|
15
15
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../../src/core-react/radio/Radio.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;;GAGG;AACH,MAAM,OAAO,KAAM,SAAQ,KAAK,CAAC,aAAyB;IACxC,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,wDAAwD;QAEtK,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,qBAAqB,EACrB,QAAQ,IAAI,eAAe,EAC3B,MAAM,EACN,SAAS,CACV;YACE,KAAK;gBACJ,kCAAO,KAAK,CAAQ;YAEtB,+BAAO,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,KAAM,KAAK,GAAI;YACrG,8BAAM,SAAS,EAAC,sBAAsB,GAAQ,CACxC,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 Radio\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { LabeledComponentProps } from \"../inputs/LabeledComponentProps\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[Radio]] component\r\n * @public\r\n * @deprecated Use RadioProps in itwinui-react instead\r\n */\r\nexport interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps, LabeledComponentProps { }\r\n\r\n/** Basic radio input component is a wrapper for the `<input type=\"radio\">` HTML element.\r\n * @public\r\n * @deprecated Use Radio in itwinui-react instead\r\n */\r\nexport class Radio extends React.PureComponent<RadioProps> { // eslint-disable-line deprecation/deprecation\r\n public override render(): JSX.Element {\r\n const { label, disabled, status, className, style, inputStyle, inputClassName, type, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-radio\",\r\n disabled && \"core-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <span>{label}</span>\r\n }\r\n <input type={\"radio\"} className={inputClassName} style={inputStyle} disabled={disabled} {...props} />\r\n <span className=\"core-radio-checkmark\"></span>\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../../src/core-react/radio/Radio.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;;GAGG;AACH,MAAM,OAAO,KAAM,SAAQ,KAAK,CAAC,aAAyB;IACxC,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,wDAAwD;QAEtK,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,qBAAqB,EACrB,QAAQ,IAAI,eAAe,EAC3B,MAAM,EACN,SAAS,CACV;YACE,KAAK;gBACJ,kCAAO,KAAK,CAAQ;YAEtB,+BAAO,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,KAAM,KAAK,GAAI;YACrG,8BAAM,SAAS,EAAC,sBAAsB,GAAQ,CACxC,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 Radio\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { LabeledComponentProps } from \"../inputs/LabeledComponentProps\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/** Properties for [[Radio]] component\r\n * @public\r\n * @deprecated in 3.0. Use RadioProps in itwinui-react instead\r\n */\r\nexport interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps, LabeledComponentProps { }\r\n\r\n/** Basic radio input component is a wrapper for the `<input type=\"radio\">` HTML element.\r\n * @public\r\n * @deprecated in 3.0. Use Radio in itwinui-react instead\r\n */\r\nexport class Radio extends React.PureComponent<RadioProps> { // eslint-disable-line deprecation/deprecation\r\n public override render(): JSX.Element {\r\n const { label, disabled, status, className, style, inputStyle, inputClassName, type, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-radio\",\r\n disabled && \"core-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <span>{label}</span>\r\n }\r\n <input type={\"radio\"} className={inputClassName} style={inputStyle} disabled={disabled} {...props} />\r\n <span className=\"core-radio-checkmark\"></span>\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -6,13 +6,13 @@ import { LabeledComponentProps, MessagedComponentProps } from "../inputs/Labeled
|
|
|
6
6
|
import { SelectProps } from "./Select";
|
|
7
7
|
/** Properties for [[LabeledSelect]] components
|
|
8
8
|
* @public
|
|
9
|
-
* @deprecated Use LabeledSelectProps in itwinui-react instead
|
|
9
|
+
* @deprecated in 3.0. Use LabeledSelectProps in itwinui-react instead
|
|
10
10
|
*/
|
|
11
11
|
export interface LabeledSelectProps extends SelectProps, LabeledComponentProps, MessagedComponentProps {
|
|
12
12
|
}
|
|
13
13
|
/** Dropdown wrapper that allows for additional styling and labelling
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use LabeledSelect in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use LabeledSelect in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
export declare class LabeledSelect extends React.PureComponent<LabeledSelectProps> {
|
|
18
18
|
render(): JSX.Element;
|
|
@@ -11,7 +11,7 @@ import * as React from "react";
|
|
|
11
11
|
import { Select } from "./Select";
|
|
12
12
|
/** Dropdown wrapper that allows for additional styling and labelling
|
|
13
13
|
* @public
|
|
14
|
-
* @deprecated Use LabeledSelect in itwinui-react instead
|
|
14
|
+
* @deprecated in 3.0. Use LabeledSelect in itwinui-react instead
|
|
15
15
|
*/
|
|
16
16
|
export class LabeledSelect extends React.PureComponent {
|
|
17
17
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledSelect.js","sourceRoot":"","sources":["../../../../src/core-react/select/LabeledSelect.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAQ/C;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,aAAiC;IACxD,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EACrC,cAAc,EAAE,UAAU,EAC1B,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EACvC,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAE1B,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,8BAA8B,EAC9B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,MAAM,EACN,SAAS,CACV;YACE,KAAK;gBACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;oBAAI,KAAK;wBAAQ;YAEhG,oBAAC,MAAM,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,KAAM,KAAK,GAAI;YACjG,OAAO;gBACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,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 Select\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"../inputs/LabeledComponentProps\";\r\nimport { Select, SelectProps } from \"./Select\";\r\n\r\n/** Properties for [[LabeledSelect]] components\r\n * @public\r\n * @deprecated Use LabeledSelectProps in itwinui-react instead\r\n */\r\nexport interface LabeledSelectProps extends SelectProps, LabeledComponentProps, MessagedComponentProps { }\r\n\r\n/** Dropdown wrapper that allows for additional styling and labelling\r\n * @public\r\n * @deprecated Use LabeledSelect in itwinui-react instead\r\n */\r\nexport class LabeledSelect extends React.PureComponent<LabeledSelectProps> {\r\n public override render(): JSX.Element {\r\n const { label, status, className, style,\r\n inputClassName, inputStyle,\r\n labelClassName, labelStyle,\r\n message, messageClassName, messageStyle,\r\n ...props } = this.props;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-select\",\r\n this.props.disabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <Select disabled={this.props.disabled} className={inputClassName} style={inputStyle} {...props} />\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LabeledSelect.js","sourceRoot":"","sources":["../../../../src/core-react/select/LabeledSelect.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAQ/C;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,aAAiC;IACxD,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EACrC,cAAc,EAAE,UAAU,EAC1B,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EACvC,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAE1B,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,8BAA8B,EAC9B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,iBAAiB,EACxC,MAAM,EACN,SAAS,CACV;YACE,KAAK;gBACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;oBAAI,KAAK;wBAAQ;YAEhG,oBAAC,MAAM,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,KAAM,KAAK,GAAI;YACjG,OAAO;gBACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,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 Select\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"../inputs/LabeledComponentProps\";\r\nimport { Select, SelectProps } from \"./Select\";\r\n\r\n/** Properties for [[LabeledSelect]] components\r\n * @public\r\n * @deprecated in 3.0. Use LabeledSelectProps in itwinui-react instead\r\n */\r\nexport interface LabeledSelectProps extends SelectProps, LabeledComponentProps, MessagedComponentProps { }\r\n\r\n/** Dropdown wrapper that allows for additional styling and labelling\r\n * @public\r\n * @deprecated in 3.0. Use LabeledSelect in itwinui-react instead\r\n */\r\nexport class LabeledSelect extends React.PureComponent<LabeledSelectProps> {\r\n public override render(): JSX.Element {\r\n const { label, status, className, style,\r\n inputClassName, inputStyle,\r\n labelClassName, labelStyle,\r\n message, messageClassName, messageStyle,\r\n ...props } = this.props;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-select\",\r\n this.props.disabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <Select disabled={this.props.disabled} className={inputClassName} style={inputStyle} {...props} />\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { LabeledComponentProps, MessagedComponentProps } from "../inputs/LabeledComponentProps";
|
|
6
6
|
import { ThemedSelectProps } from "./ThemedSelect";
|
|
7
7
|
/** Properties for [[LabeledThemedSelect]] components
|
|
8
|
-
* @beta @deprecated
|
|
8
|
+
* @beta @deprecated in 3.0. Use LabeledSelect component from @itwin/itwinui-react
|
|
9
9
|
*/
|
|
10
10
|
export interface LabeledThemedSelectProps extends ThemedSelectProps, LabeledComponentProps, MessagedComponentProps {
|
|
11
11
|
}
|
|
12
12
|
/** Dropdown wrapper that allows for additional styling and labelling
|
|
13
|
-
* @beta @deprecated
|
|
13
|
+
* @beta @deprecated in 3.0. Use LabeledSelect component from @itwin/itwinui-react
|
|
14
14
|
*/
|
|
15
15
|
export declare function LabeledThemedSelect(props: LabeledThemedSelectProps): JSX.Element;
|
|
16
16
|
//# sourceMappingURL=LabeledThemedSelect.d.ts.map
|
|
@@ -10,7 +10,7 @@ import classnames from "classnames";
|
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { ThemedSelect } from "./ThemedSelect";
|
|
12
12
|
/** Dropdown wrapper that allows for additional styling and labelling
|
|
13
|
-
* @beta @deprecated
|
|
13
|
+
* @beta @deprecated in 3.0. Use LabeledSelect component from @itwin/itwinui-react
|
|
14
14
|
*/
|
|
15
15
|
export function LabeledThemedSelect(props) {
|
|
16
16
|
const { label, status, className, style, inputClassName, inputStyle, labelClassName, labelStyle, message, messageClassName, messageStyle, ...otherProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledThemedSelect.js","sourceRoot":"","sources":["../../../../src/core-react/select/LabeledThemedSelect.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAOjE;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAA+B;IACjE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EACrC,cAAc,EAAE,UAAU,EAC1B,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EACvC,GAAG,UAAU,EAAE,GAAG,KAAY,CAAC;IAEjC,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,qCAAqC,EACrC,KAAK,CAAC,UAAU,IAAI,iBAAiB,EACrC,MAAM,EACN,SAAS,CACV;QACE,KAAK;YACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;gBAAI,KAAK;oBAAQ;QAEhG,oBAAC,YAAY,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,KAAM,UAAU,GAAI;QAC5G,OAAO;YACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,CAAC;AACJ,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Select\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"../inputs/LabeledComponentProps\";\r\nimport { ThemedSelect, ThemedSelectProps } from \"./ThemedSelect\";\r\n\r\n/** Properties for [[LabeledThemedSelect]] components\r\n * @beta @deprecated\r\n */\r\nexport interface LabeledThemedSelectProps extends ThemedSelectProps, LabeledComponentProps, MessagedComponentProps { }\r\n\r\n/** Dropdown wrapper that allows for additional styling and labelling\r\n * @beta @deprecated\r\n */\r\nexport function LabeledThemedSelect(props: LabeledThemedSelectProps) {\r\n const { label, status, className, style,\r\n inputClassName, inputStyle,\r\n labelClassName, labelStyle,\r\n message, messageClassName, messageStyle,\r\n ...otherProps } = props as any;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-themed-select\",\r\n props.isDisabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <ThemedSelect isDisabled={props.isDisabled} className={inputClassName} styles={inputStyle} {...otherProps} />\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LabeledThemedSelect.js","sourceRoot":"","sources":["../../../../src/core-react/select/LabeledThemedSelect.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAOjE;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAA+B;IACjE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EACrC,cAAc,EAAE,UAAU,EAC1B,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EACvC,GAAG,UAAU,EAAE,GAAG,KAAY,CAAC;IAEjC,OAAO,CACL,+BAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CACxC,qCAAqC,EACrC,KAAK,CAAC,UAAU,IAAI,iBAAiB,EACrC,MAAM,EACN,SAAS,CACV;QACE,KAAK;YACJ,6BAAK,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU;;gBAAI,KAAK;oBAAQ;QAEhG,oBAAC,YAAY,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,KAAM,UAAU,GAAI;QAC5G,OAAO;YACN,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,IAAG,OAAO,CAAO,CAEhG,CACT,CAAC;AACJ,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Select\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { LabeledComponentProps, MessagedComponentProps } from \"../inputs/LabeledComponentProps\";\r\nimport { ThemedSelect, ThemedSelectProps } from \"./ThemedSelect\";\r\n\r\n/** Properties for [[LabeledThemedSelect]] components\r\n * @beta @deprecated in 3.0. Use LabeledSelect component from @itwin/itwinui-react\r\n */\r\nexport interface LabeledThemedSelectProps extends ThemedSelectProps, LabeledComponentProps, MessagedComponentProps { }\r\n\r\n/** Dropdown wrapper that allows for additional styling and labelling\r\n * @beta @deprecated in 3.0. Use LabeledSelect component from @itwin/itwinui-react\r\n */\r\nexport function LabeledThemedSelect(props: LabeledThemedSelectProps) {\r\n const { label, status, className, style,\r\n inputClassName, inputStyle,\r\n labelClassName, labelStyle,\r\n message, messageClassName, messageStyle,\r\n ...otherProps } = props as any;\r\n\r\n return (\r\n <label style={style} className={classnames(\r\n \"uicore-inputs-labeled-themed-select\",\r\n props.isDisabled && \"uicore-disabled\",\r\n status,\r\n className,\r\n )}>\r\n {label &&\r\n <div className={classnames(\"uicore-label\", labelClassName)} style={labelStyle}> {label} </div>\r\n }\r\n <ThemedSelect isDisabled={props.isDisabled} className={inputClassName} styles={inputStyle} {...otherProps} />\r\n {message &&\r\n <div className={classnames(\"uicore-message\", messageClassName)} style={messageStyle}>{message}</div>\r\n }\r\n </label>\r\n );\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import { CommonProps } from "../utils/Props";
|
|
6
6
|
/** Properties for a Select option
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use SelectOption in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use SelectOption in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export interface SelectOption {
|
|
11
11
|
/** Label of the option. If `value` is not set when using SelectOption[], also serves as the value. */
|
|
@@ -17,7 +17,7 @@ export interface SelectOption {
|
|
|
17
17
|
}
|
|
18
18
|
/** Properties for [[Select]] component
|
|
19
19
|
* @public
|
|
20
|
-
* @deprecated Use SelectProps in itwinui-react instead
|
|
20
|
+
* @deprecated in 3.0. Use SelectProps in itwinui-react instead
|
|
21
21
|
*/
|
|
22
22
|
export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement>, CommonProps {
|
|
23
23
|
/** Options for Select dropdown.
|
|
@@ -47,7 +47,7 @@ export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElemen
|
|
|
47
47
|
}
|
|
48
48
|
/** Basic select component is a wrapper for the `<select>` HTML element.
|
|
49
49
|
* @public
|
|
50
|
-
* @deprecated Use Select in itwinui-react instead
|
|
50
|
+
* @deprecated in 3.0. Use Select in itwinui-react instead
|
|
51
51
|
*/
|
|
52
52
|
export declare const Select: (props: SelectProps) => JSX.Element | null;
|
|
53
53
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -51,7 +51,7 @@ const ForwardRefSelect = React.forwardRef(function ForwardRefSelect(props, ref)
|
|
|
51
51
|
});
|
|
52
52
|
/** Basic select component is a wrapper for the `<select>` HTML element.
|
|
53
53
|
* @public
|
|
54
|
-
* @deprecated Use Select in itwinui-react instead
|
|
54
|
+
* @deprecated in 3.0. Use Select in itwinui-react instead
|
|
55
55
|
*/
|
|
56
56
|
export const Select = ForwardRefSelect;
|
|
57
57
|
//# sourceMappingURL=Select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../../src/core-react/select/Select.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AA4CjD,SAAS,sBAAsB,CAAC,YAA6D,EAAE,gBAAoC;IACjI,IAAI,YAAY;QACd,OAAO,YAAY,CAAC;IAEtB,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,MAA6B;IACnD,OAAO,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9D,CAAC;AAED,SAAS,cAAc,CAAC,MAA6B;IACnD,OAAO,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC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ACF,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAChC,gCAAQ,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IACpE,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CACtB,CACV,CAAC,CAEG,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAA+C,gBAAgB,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 Select\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\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/** Properties for a Select option\r\n * @public\r\n * @deprecated Use SelectOption in itwinui-react instead\r\n */\r\nexport interface SelectOption {\r\n /** Label of the option. If `value` is not set when using SelectOption[], also serves as the value. */\r\n label: string;\r\n /** Value of the option when using SelectOption[]. */\r\n value?: string | number | readonly string[];\r\n /** Indicates whether the option is disabled. */\r\n disabled?: boolean;\r\n}\r\n\r\n/** Properties for [[Select]] component\r\n * @public\r\n * @deprecated Use SelectProps in itwinui-react instead\r\n */\r\nexport interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement>, CommonProps {\r\n /** Options for Select dropdown.\r\n * @example\r\n * // Example of {[key: string]: (string | SelectOption)} usage:\r\n * <Select options={{\r\n * option1: \"Option 1\",\r\n * option2: \"Option 2\",\r\n * option3: {label: \"Option 3\", disabled: true},\r\n * }} />\r\n *\r\n * // Example of (string | SelectOption)[] usage:\r\n * <Select options={[\r\n * \"Option 1\",\r\n * \"Option 2\",\r\n * {label: \"Option 3\", value: \"option3\", disabled: true},\r\n * ]} />\r\n * }\r\n */\r\n options: (string | SelectOption)[] | { [key: string]: (string | SelectOption) };\r\n /** Indicates whether to set focus to the select element */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLSelectElement */\r\n ref?: React.Ref<HTMLSelectElement>;\r\n}\r\n\r\nfunction getCurrentDefaultValue(defaultValue: string | number | readonly string[] | undefined, placeholderValue: string | undefined) {\r\n if (defaultValue)\r\n return defaultValue;\r\n\r\n return placeholderValue;\r\n}\r\n\r\nfunction getOptionLabel(option: string | SelectOption): string {\r\n return (typeof option === \"string\") ? option : option.label;\r\n}\r\n\r\nfunction getOptionValue(option: string | SelectOption): string | number | readonly string[] {\r\n return (typeof option === \"string\") ? option : (undefined !== option.value ? option.value : option.label);\r\n}\r\n\r\nfunction getOptionDisabled(option: string | SelectOption): boolean | undefined {\r\n return (typeof option === \"string\") ? undefined : option.disabled;\r\n}\r\n\r\nconst ForwardRefSelect = React.forwardRef<HTMLSelectElement, SelectProps>(\r\n function ForwardRefSelect(props, ref) {\r\n const selectElement = React.useRef<HTMLSelectElement>(null);\r\n const placeholderValue = React.useRef(\"placeholder\");\r\n const isInitialMount = React.useRef(true);\r\n const refs = useRefs(selectElement, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n if (props.setFocus && selectElement.current)\r\n selectElement.current.focus();\r\n }, [props]);\r\n\r\n React.useEffect(() => {\r\n isInitialMount.current = false;\r\n }, []);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { value: selectValue, required, options, setFocus, className, defaultValue, ...otherProps } = props; // pluck off values that will be explicitly set below\r\n const showPlaceholder = React.useMemo(() => props.placeholder && (undefined === selectValue || selectValue === placeholderValue.current) && !defaultValue, [defaultValue, selectValue, props.placeholder]);\r\n const isRequired = React.useMemo(() => showPlaceholder || required, [required, showPlaceholder]);\r\n const currentDefaultValue = React.useMemo(() => getCurrentDefaultValue(defaultValue, showPlaceholder ? placeholderValue.current : undefined), [defaultValue, showPlaceholder]);\r\n const value = (!isInitialMount.current && undefined === selectValue) ? currentDefaultValue : selectValue;\r\n return (\r\n <select ref={refs} {...otherProps}\r\n required={isRequired}\r\n className={classnames(\"uicore-inputs-select\", className)}\r\n value={value}\r\n defaultValue={value === undefined ? currentDefaultValue : undefined}>\r\n {showPlaceholder &&\r\n <option className=\"placeholder\" disabled key=\"\" value={placeholderValue.current}>{props.placeholder}</option>\r\n }\r\n {options instanceof Array ?\r\n options.map((option, index) => (\r\n <option key={index} value={getOptionValue(option)} disabled={getOptionDisabled(option)} >\r\n {getOptionLabel(option)}\r\n </option>\r\n ))\r\n :\r\n Object.keys(options).map((key) => (\r\n <option key={key} value={key} disabled={getOptionDisabled(options[key])} >\r\n {getOptionLabel(options[key])}\r\n </option>\r\n ))\r\n }\r\n </select>\r\n );\r\n }\r\n);\r\n\r\n/** Basic select component is a wrapper for the `<select>` HTML element.\r\n * @public\r\n * @deprecated Use Select in itwinui-react instead\r\n */\r\nexport const Select: (props: SelectProps) => JSX.Element | null = ForwardRefSelect;\r\n"]}
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../../src/core-react/select/Select.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AA4CjD,SAAS,sBAAsB,CAAC,YAA6D,EAAE,gBAAoC;IACjI,IAAI,YAAY;QACd,OAAO,YAAY,CAAC;IAEtB,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,MAA6B;IACnD,OAAO,CAAC,OAAO,MAAM,KAAK,QAAQ,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AAC,OAAO,IAAG,KAAK,CAAC,WAAW,CAAU;QAE9G,OAAO,YAAY,KAAK,CAAC,CAAC;YACzB,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,gCAAQ,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC,IACnF,cAAc,CAAC,MAAM,CAAC,CAChB,CACV,CAAC;YACF,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAChC,gCAAQ,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IACpE,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CACtB,CACV,CAAC,CAEG,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAA+C,gBAAgB,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 Select\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\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/** Properties for a Select option\r\n * @public\r\n * @deprecated in 3.0. Use SelectOption in itwinui-react instead\r\n */\r\nexport interface SelectOption {\r\n /** Label of the option. If `value` is not set when using SelectOption[], also serves as the value. */\r\n label: string;\r\n /** Value of the option when using SelectOption[]. */\r\n value?: string | number | readonly string[];\r\n /** Indicates whether the option is disabled. */\r\n disabled?: boolean;\r\n}\r\n\r\n/** Properties for [[Select]] component\r\n * @public\r\n * @deprecated in 3.0. Use SelectProps in itwinui-react instead\r\n */\r\nexport interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement>, CommonProps {\r\n /** Options for Select dropdown.\r\n * @example\r\n * // Example of {[key: string]: (string | SelectOption)} usage:\r\n * <Select options={{\r\n * option1: \"Option 1\",\r\n * option2: \"Option 2\",\r\n * option3: {label: \"Option 3\", disabled: true},\r\n * }} />\r\n *\r\n * // Example of (string | SelectOption)[] usage:\r\n * <Select options={[\r\n * \"Option 1\",\r\n * \"Option 2\",\r\n * {label: \"Option 3\", value: \"option3\", disabled: true},\r\n * ]} />\r\n * }\r\n */\r\n options: (string | SelectOption)[] | { [key: string]: (string | SelectOption) };\r\n /** Indicates whether to set focus to the select element */\r\n setFocus?: boolean;\r\n /** Provides ability to return reference to HTMLSelectElement */\r\n ref?: React.Ref<HTMLSelectElement>;\r\n}\r\n\r\nfunction getCurrentDefaultValue(defaultValue: string | number | readonly string[] | undefined, placeholderValue: string | undefined) {\r\n if (defaultValue)\r\n return defaultValue;\r\n\r\n return placeholderValue;\r\n}\r\n\r\nfunction getOptionLabel(option: string | SelectOption): string {\r\n return (typeof option === \"string\") ? option : option.label;\r\n}\r\n\r\nfunction getOptionValue(option: string | SelectOption): string | number | readonly string[] {\r\n return (typeof option === \"string\") ? option : (undefined !== option.value ? option.value : option.label);\r\n}\r\n\r\nfunction getOptionDisabled(option: string | SelectOption): boolean | undefined {\r\n return (typeof option === \"string\") ? undefined : option.disabled;\r\n}\r\n\r\nconst ForwardRefSelect = React.forwardRef<HTMLSelectElement, SelectProps>(\r\n function ForwardRefSelect(props, ref) {\r\n const selectElement = React.useRef<HTMLSelectElement>(null);\r\n const placeholderValue = React.useRef(\"placeholder\");\r\n const isInitialMount = React.useRef(true);\r\n const refs = useRefs(selectElement, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n if (props.setFocus && selectElement.current)\r\n selectElement.current.focus();\r\n }, [props]);\r\n\r\n React.useEffect(() => {\r\n isInitialMount.current = false;\r\n }, []);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { value: selectValue, required, options, setFocus, className, defaultValue, ...otherProps } = props; // pluck off values that will be explicitly set below\r\n const showPlaceholder = React.useMemo(() => props.placeholder && (undefined === selectValue || selectValue === placeholderValue.current) && !defaultValue, [defaultValue, selectValue, props.placeholder]);\r\n const isRequired = React.useMemo(() => showPlaceholder || required, [required, showPlaceholder]);\r\n const currentDefaultValue = React.useMemo(() => getCurrentDefaultValue(defaultValue, showPlaceholder ? placeholderValue.current : undefined), [defaultValue, showPlaceholder]);\r\n const value = (!isInitialMount.current && undefined === selectValue) ? currentDefaultValue : selectValue;\r\n return (\r\n <select ref={refs} {...otherProps}\r\n required={isRequired}\r\n className={classnames(\"uicore-inputs-select\", className)}\r\n value={value}\r\n defaultValue={value === undefined ? currentDefaultValue : undefined}>\r\n {showPlaceholder &&\r\n <option className=\"placeholder\" disabled key=\"\" value={placeholderValue.current}>{props.placeholder}</option>\r\n }\r\n {options instanceof Array ?\r\n options.map((option, index) => (\r\n <option key={index} value={getOptionValue(option)} disabled={getOptionDisabled(option)} >\r\n {getOptionLabel(option)}\r\n </option>\r\n ))\r\n :\r\n Object.keys(options).map((key) => (\r\n <option key={key} value={key} disabled={getOptionDisabled(options[key])} >\r\n {getOptionLabel(options[key])}\r\n </option>\r\n ))\r\n }\r\n </select>\r\n );\r\n }\r\n);\r\n\r\n/** Basic select component is a wrapper for the `<select>` HTML element.\r\n * @public\r\n * @deprecated in 3.0. Use Select in itwinui-react instead\r\n */\r\nexport const Select: (props: SelectProps) => JSX.Element | null = ForwardRefSelect;\r\n"]}
|
|
@@ -15,7 +15,7 @@ declare type FormatOptionLabelMeta = {
|
|
|
15
15
|
};
|
|
16
16
|
/** OptionType for react-select 2.0 and above. which only accepts pairs of value & label strings
|
|
17
17
|
* @beta
|
|
18
|
-
* @deprecated
|
|
18
|
+
* @deprecated in 3.0. Use Select from @itwin/itwinui-react
|
|
19
19
|
*/
|
|
20
20
|
export interface OptionType {
|
|
21
21
|
value: any;
|
|
@@ -23,12 +23,12 @@ export interface OptionType {
|
|
|
23
23
|
}
|
|
24
24
|
/** OptionsType to match label/value pair OptionType
|
|
25
25
|
* @beta
|
|
26
|
-
* @deprecated
|
|
26
|
+
* @deprecated in 3.0. Use Select from @itwin/itwinui-react
|
|
27
27
|
*/
|
|
28
28
|
export declare type OptionsType = Array<OptionType>;
|
|
29
29
|
/** ThemedSelectProps to control specific features of ThemedSelect
|
|
30
30
|
* @beta
|
|
31
|
-
* @deprecated
|
|
31
|
+
* @deprecated in 3.0. Use Select from @itwin/itwinui-react
|
|
32
32
|
*/
|
|
33
33
|
export declare type ThemedSelectProps = {
|
|
34
34
|
"aria-label"?: string;
|
|
@@ -97,7 +97,7 @@ export declare type ThemedSelectProps = {
|
|
|
97
97
|
};
|
|
98
98
|
/** ThemedSelect is a wrapper for react-select with iTwin.js UI theming applied
|
|
99
99
|
* @beta
|
|
100
|
-
* @deprecated
|
|
100
|
+
* @deprecated in 3.0. Use Select from @itwin/itwinui-react
|
|
101
101
|
*/
|
|
102
102
|
export declare function ThemedSelect(props: ThemedSelectProps): JSX.Element;
|
|
103
103
|
export {};
|
|
@@ -19,7 +19,7 @@ const ThemedMenu = (props) => {
|
|
|
19
19
|
};
|
|
20
20
|
/** ThemedSelect is a wrapper for react-select with iTwin.js UI theming applied
|
|
21
21
|
* @beta
|
|
22
|
-
* @deprecated
|
|
22
|
+
* @deprecated in 3.0. Use Select from @itwin/itwinui-react
|
|
23
23
|
*/
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
25
25
|
export function ThemedSelect(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemedSelect.js","sourceRoot":"","sources":["../../../../src/core-react/select/ThemedSelect.tsx"],"names":[],"m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IACJ,6DAA6D;IAC7D,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG;IAC5G,wCAAwC;IACxC,GAAG,UAAU,CAAC,qBAAqB;MACpC,GAAG,KAAY,CAAC;IACjB,MAAM,YAAY,GAAG;QACnB,GAAG,KAAK,CAAC,MAAM;QACf,UAAU,EAAE,CAAC,IAAyB,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;KACjE,CAAC;IAEF,MAAM,MAAM,GAAG,sBAAsB,CAAC,+BAA+B,CAAC,CAAC;IACvE,OAAO,CACL,6BAAK,SAAS,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM;QAC1C,oBAAC,SAAS,IACR,GAAG,EAAE,GAAG,EACR,eAAe,EAAC,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,YAAY,EAC9B,MAAM,EAAE,YAAY;YACpB,gEAAgE;YAChE,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,EAAE,KACjD,UAAU,GACd,CACE,CACP,CAAC;AACJ,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Select\r\n */\r\n\r\nimport \"./themed-select.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport Component, { components } from \"react-select\";\r\nimport { formatGroupLabel, getOptionLabel, getOptionValue } from \"react-select/src/builtins\";\r\nimport { SelectComponentsConfig } from \"react-select/src/components/index\";\r\nimport { MenuProps } from \"react-select/src/components/Menu\";\r\nimport { ActionMeta, FocusEventHandler, InputActionMeta, KeyboardEventHandler, ValueType } from \"react-select/src/types\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { getCssVariableAsNumber } from \"../utils/getCssVariable\";\r\nimport { getParentSelector } from \"./modalHelper\";\r\n\r\n// cspell:ignore reactselect builtins\r\n\r\n/* eslint-disable @typescript-eslint/no-shadow, @typescript-eslint/consistent-type-definitions, @typescript-eslint/array-type */\r\ntype FormatOptionLabelContext = \"menu\" | \"value\";\r\ntype FormatOptionLabelMeta = {\r\n context: FormatOptionLabelContext;\r\n inputValue: string;\r\n selectValue: ValueType<OptionType>;\r\n};\r\n\r\n/** OptionType for react-select 2.0 and above. which only accepts pairs of value & label strings\r\n * @beta\r\n * @deprecated use Select from @itwin/itwinui-react\r\n */\r\nexport interface OptionType {\r\n value: any;\r\n label: string;\r\n}\r\n/** OptionsType to match label/value pair OptionType\r\n * @beta\r\n * @deprecated use Select from @itwin/itwinui-react\r\n*/\r\nexport type OptionsType = Array<OptionType>;\r\n\r\n/** ThemedSelectProps to control specific features of ThemedSelect\r\n * @beta\r\n * @deprecated use Select from @itwin/itwinui-react\r\n */\r\nexport type ThemedSelectProps = {\r\n /* Aria label (for assistive tech) */\r\n \"aria-label\"?: string;\r\n /* HTML ID of an element that should be used as the label (for assistive tech) */\r\n \"aria-labelledby\"?: string;\r\n /* Focus the control when it is mounted */\r\n autoFocus?: boolean;\r\n /* Remove the currently focused option when the user presses backspace */\r\n backspaceRemovesValue?: boolean;\r\n /* Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices) */\r\n blurInputOnSelect?: boolean;\r\n /* When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent */\r\n captureMenuScroll?: boolean;\r\n /* Sets a className attribute on the outer component */\r\n className?: string;\r\n /* Close the select menu when the user selects an option */\r\n closeMenuOnSelect?: boolean;\r\n /*\r\n If `true`, close the select menu when the user scrolls the document/body.\r\n\r\n If a function, takes a standard javascript `ScrollEvent` you return a boolean:\r\n\r\n `true` => The menu closes\r\n\r\n `false` => The menu stays open\r\n\r\n This is useful when you have a scrollable modal and want to portal the menu out,\r\n but want to avoid graphical issues.\r\n */\r\n closeMenuOnScroll?: boolean | EventListener;\r\n /*\r\n This complex object includes all the compositional components that are used\r\n in `react-select`. If you wish to overwrite a component, pass in an object\r\n with the appropriate namespace.\r\n\r\n If you only wish to restyle a component, we recommend using the `styles` prop\r\n instead. For a list of the components that can be passed in, and the shape\r\n that will be passed to them, see [the components docs](/components)\r\n */\r\n components?: SelectComponentsConfig<OptionType>;\r\n /* Whether the value of the select, e.g. SingleValue, should be displayed in the control. */\r\n controlShouldRenderValue?: boolean;\r\n /* Ff true, the menu is open immediately */\r\n defaultMenuIsOpen?: boolean;\r\n /* Value set in the control by default */\r\n defaultValue?: ValueType<OptionType>;\r\n /** Provides ability to return reference to the outer HTMLDivElement */\r\n divRef?: React.Ref<HTMLDivElement>;\r\n /* Clear all values when the user presses escape AND the menu is closed */\r\n escapeClearsValue?: boolean;\r\n /* Custom method to filter whether an option should be displayed in the menu */\r\n filterOption?: ((\r\n option: OptionType,\r\n rawInput: string,\r\n ) => boolean) | null;\r\n /*\r\n Formats group labels in the menu as React components\r\n\r\n An example can be found in the [Replacing builtins](/advanced#replacing-builtins) documentation.\r\n*/\r\n formatGroupLabel?: typeof formatGroupLabel;\r\n /* Formats option labels in the menu and control as React components */\r\n formatOptionLabel?: (optionType: OptionType, formatLabelMeta: FormatOptionLabelMeta) => React.ReactNode;\r\n /* Resolves option data to a string to be displayed as the label by components */\r\n getOptionLabel?: typeof getOptionLabel;\r\n /* Resolves option data to a string to compare options and specify value attributes */\r\n getOptionValue?: typeof getOptionValue;\r\n /* Hide the selected option from the menu */\r\n hideSelectedOptions?: boolean;\r\n /* The id to set on the SelectContainer component. */\r\n id?: string;\r\n /* The value of the search input */\r\n inputValue?: string;\r\n /* The id of the search input */\r\n inputId?: string;\r\n /* Define an id prefix for the select components e.g. {your-id}-value */\r\n instanceId?: number | string;\r\n /* Is the select value clearable */\r\n isClearable?: boolean;\r\n /* Is the select disabled */\r\n isDisabled?: boolean;\r\n /* Is the select in a state of loading (async) */\r\n isLoading?: boolean;\r\n /*\r\n Override the built-in logic to detect whether an option is disabled\r\n\r\n An example can be found in the [Replacing builtins](/advanced#replacing-builtins) documentation.\r\n */\r\n isOptionDisabled?: (option: OptionType, options: OptionsType) => boolean | false;\r\n /* Support multiple selected options */\r\n isMulti?: boolean;\r\n /* If true, menu will not be opened in a portal */\r\n isMenuFixed?: boolean;\r\n /* Is the select direction right-to-left */\r\n isRtl?: boolean;\r\n /* Whether to enable search functionality */\r\n isSearchable?: boolean;\r\n /* Minimum height of the menu before flipping */\r\n minMenuHeight?: number;\r\n /* Maximum height of the menu before scrolling */\r\n maxMenuHeight?: number;\r\n /* Whether the menu is open */\r\n menuIsOpen?: boolean;\r\n /* Whether to block scroll events when the menu is open */\r\n menuShouldBlockScroll?: boolean;\r\n /* Whether the menu should be scrolled into view when it opens */\r\n menuShouldScrollIntoView?: boolean;\r\n /* Name of the HTML Input (optional - without this, no input will be rendered) */\r\n name?: string;\r\n /* Text to display when there are no options */\r\n noOptionsMessage?: (obj: { inputValue: string }) => string | null;\r\n /* Handle blur events on the control */\r\n onBlur?: FocusEventHandler;\r\n /* Handle change events on the select */\r\n onChange?: (value: ValueType<OptionType>, action: ActionMeta<OptionType>) => void;\r\n /* Handle focus events on the control */\r\n onFocus?: FocusEventHandler;\r\n /* Handle change events on the input */\r\n onInputChange?: (newValue: string, actionMeta?: InputActionMeta) => void;\r\n /* Handle key down events on the select */\r\n onKeyDown?: KeyboardEventHandler;\r\n /* Handle the menu opening */\r\n onMenuOpen?: () => void;\r\n /* Handle the menu closing */\r\n onMenuClose?: () => void;\r\n /* Fired when the user scrolls to the top of the menu */\r\n onMenuScrollToTop?: (e: React.SyntheticEvent<HTMLElement>) => void;\r\n /* Fired when the user scrolls to the bottom of the menu */\r\n onMenuScrollToBottom?: (e: React.SyntheticEvent<HTMLElement>) => void;\r\n /* Allows control of whether the menu is opened when the Select is focused */\r\n openMenuOnFocus?: boolean;\r\n /* Allows control of whether the menu is opened when the Select is clicked */\r\n openMenuOnClick?: boolean;\r\n /* Array of options that populate the select menu */\r\n options: OptionsType;\r\n /* Number of options to jump in menu when page{up|down} keys are used */\r\n pageSize?: number;\r\n /* Placeholder for the select value */\r\n placeholder?: string;\r\n /** Provides ability to return reference to the ThemedSelect */\r\n ref?: React.Ref<Component>;\r\n /* Sets additional styling */\r\n styles?: React.CSSProperties;\r\n /* Sets the tabIndex attribute on the input */\r\n tabIndex?: string;\r\n /* Select the currently focused option when the user presses tab */\r\n tabSelectsValue?: boolean;\r\n /* The value of the select; reflected by the selected option */\r\n value?: ValueType<OptionType>;\r\n};\r\n\r\nconst ThemedMenu = (props: MenuProps<any>) => { // eslint-disable-line @typescript-eslint/naming-convention\r\n return (\r\n <div className=\"uicore-reactSelectTop\">\r\n <components.Menu {...props} />\r\n </div>\r\n );\r\n};\r\n/** ThemedSelect is a wrapper for react-select with iTwin.js UI theming applied\r\n * @beta\r\n * @deprecated use Select from @itwin/itwinui-react\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function ThemedSelect(props: ThemedSelectProps) {\r\n const noOptionLabel = React.useRef<string | undefined>();\r\n const defaultOptionMessage = React.useCallback(() => {\r\n if (!noOptionLabel.current) {\r\n noOptionLabel.current = UiCore.translate(\"reactselect.noSelectOption\");\r\n }\r\n return noOptionLabel.current;\r\n }, [noOptionLabel]);\r\n const noOptionFunction = props.noOptionsMessage ?? defaultOptionMessage;\r\n const selectClassName = classnames(\"uicore-reactSelectTop\", props.className);\r\n const portalTarget = !!props.isMenuFixed ? undefined : getParentSelector();\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n classNamePrefix, className, noOptionsMessage, menuPortalTarget, isMenuFixed, styles, components, divRef, ref,\r\n // eslint-disable-next-line comma-dangle\r\n ...otherProps // pass-through props\r\n } = props as any;\r\n const selectStyles = {\r\n ...props.styles,\r\n menuPortal: (base: React.CSSProperties) => ({ ...base, zIndex }),\r\n };\r\n\r\n const zIndex = getCssVariableAsNumber(\"--uicore-z-index-dialog-popup\");\r\n return (\r\n <div className={selectClassName} ref={divRef}>\r\n <Component\r\n ref={ref}\r\n classNamePrefix=\"react-select\"\r\n noOptionsMessage={noOptionFunction}\r\n menuPortalTarget={portalTarget}\r\n styles={selectStyles}\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n components={{ Menu: ThemedMenu, ...props.components }}\r\n {...otherProps}\r\n />\r\n </div>\r\n );\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ThemedSelect.js","sourceRoot":"","sources":["../../../../src/core-react/select/ThemedSelect.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAKrD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAqLlD,MAAM,UAAU,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,OAAO,CACL,6BAAK,SAAS,EAAC,uBAAuB;QACpC,oBAAC,UAAU,CAAC,IAAI,OAAK,KAAK,GAAI,CAC1B,CACP,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,gEAAgE;AAChE,MAAM,UAAU,YAAY,CAAC,KAAwB;;IACnD,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,EAAsB,CAAC;IACzD,MAAM,oBAAoB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QAClD,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;YAC1B,aAAa,CAAC,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;SACxE;QACD,OAAO,aAAa,CAAC,OAAO,CAAC;IAC/B,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IACpB,MAAM,gBAAgB,GAAG,MAAA,KAAK,CAAC,gBAAgB,mCAAI,oBAAoB,CAAC;IACxE,MAAM,eAAe,GAAG,UAAU,CAAC,uBAAuB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC7E,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAC3E,MAAM;IACJ,6DAA6D;IAC7D,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG;IAC5G,wCAAwC;IACxC,GAAG,UAAU,CAAC,qBAAqB;MACpC,GAAG,KAAY,CAAC;IACjB,MAAM,YAAY,GAAG;QACnB,GAAG,KAAK,CAAC,MAAM;QACf,UAAU,EAAE,CAAC,IAAyB,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;KACjE,CAAC;IAEF,MAAM,MAAM,GAAG,sBAAsB,CAAC,+BAA+B,CAAC,CAAC;IACvE,OAAO,CACL,6BAAK,SAAS,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM;QAC1C,oBAAC,SAAS,IACR,GAAG,EAAE,GAAG,EACR,eAAe,EAAC,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,YAAY,EAC9B,MAAM,EAAE,YAAY;YACpB,gEAAgE;YAChE,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,EAAE,KACjD,UAAU,GACd,CACE,CACP,CAAC;AACJ,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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Select\r\n */\r\n\r\nimport \"./themed-select.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport Component, { components } from \"react-select\";\r\nimport { formatGroupLabel, getOptionLabel, getOptionValue } from \"react-select/src/builtins\";\r\nimport { SelectComponentsConfig } from \"react-select/src/components/index\";\r\nimport { MenuProps } from \"react-select/src/components/Menu\";\r\nimport { ActionMeta, FocusEventHandler, InputActionMeta, KeyboardEventHandler, ValueType } from \"react-select/src/types\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { getCssVariableAsNumber } from \"../utils/getCssVariable\";\r\nimport { getParentSelector } from \"./modalHelper\";\r\n\r\n// cspell:ignore reactselect builtins\r\n\r\n/* eslint-disable @typescript-eslint/no-shadow, @typescript-eslint/consistent-type-definitions, @typescript-eslint/array-type */\r\ntype FormatOptionLabelContext = \"menu\" | \"value\";\r\ntype FormatOptionLabelMeta = {\r\n context: FormatOptionLabelContext;\r\n inputValue: string;\r\n selectValue: ValueType<OptionType>;\r\n};\r\n\r\n/** OptionType for react-select 2.0 and above. which only accepts pairs of value & label strings\r\n * @beta\r\n * @deprecated in 3.0. Use Select from @itwin/itwinui-react\r\n */\r\nexport interface OptionType {\r\n value: any;\r\n label: string;\r\n}\r\n/** OptionsType to match label/value pair OptionType\r\n * @beta\r\n * @deprecated in 3.0. Use Select from @itwin/itwinui-react\r\n*/\r\nexport type OptionsType = Array<OptionType>;\r\n\r\n/** ThemedSelectProps to control specific features of ThemedSelect\r\n * @beta\r\n * @deprecated in 3.0. Use Select from @itwin/itwinui-react\r\n */\r\nexport type ThemedSelectProps = {\r\n /* Aria label (for assistive tech) */\r\n \"aria-label\"?: string;\r\n /* HTML ID of an element that should be used as the label (for assistive tech) */\r\n \"aria-labelledby\"?: string;\r\n /* Focus the control when it is mounted */\r\n autoFocus?: boolean;\r\n /* Remove the currently focused option when the user presses backspace */\r\n backspaceRemovesValue?: boolean;\r\n /* Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices) */\r\n blurInputOnSelect?: boolean;\r\n /* When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent */\r\n captureMenuScroll?: boolean;\r\n /* Sets a className attribute on the outer component */\r\n className?: string;\r\n /* Close the select menu when the user selects an option */\r\n closeMenuOnSelect?: boolean;\r\n /*\r\n If `true`, close the select menu when the user scrolls the document/body.\r\n\r\n If a function, takes a standard javascript `ScrollEvent` you return a boolean:\r\n\r\n `true` => The menu closes\r\n\r\n `false` => The menu stays open\r\n\r\n This is useful when you have a scrollable modal and want to portal the menu out,\r\n but want to avoid graphical issues.\r\n */\r\n closeMenuOnScroll?: boolean | EventListener;\r\n /*\r\n This complex object includes all the compositional components that are used\r\n in `react-select`. If you wish to overwrite a component, pass in an object\r\n with the appropriate namespace.\r\n\r\n If you only wish to restyle a component, we recommend using the `styles` prop\r\n instead. For a list of the components that can be passed in, and the shape\r\n that will be passed to them, see [the components docs](/components)\r\n */\r\n components?: SelectComponentsConfig<OptionType>;\r\n /* Whether the value of the select, e.g. SingleValue, should be displayed in the control. */\r\n controlShouldRenderValue?: boolean;\r\n /* Ff true, the menu is open immediately */\r\n defaultMenuIsOpen?: boolean;\r\n /* Value set in the control by default */\r\n defaultValue?: ValueType<OptionType>;\r\n /** Provides ability to return reference to the outer HTMLDivElement */\r\n divRef?: React.Ref<HTMLDivElement>;\r\n /* Clear all values when the user presses escape AND the menu is closed */\r\n escapeClearsValue?: boolean;\r\n /* Custom method to filter whether an option should be displayed in the menu */\r\n filterOption?: ((\r\n option: OptionType,\r\n rawInput: string,\r\n ) => boolean) | null;\r\n /*\r\n Formats group labels in the menu as React components\r\n\r\n An example can be found in the [Replacing builtins](/advanced#replacing-builtins) documentation.\r\n*/\r\n formatGroupLabel?: typeof formatGroupLabel;\r\n /* Formats option labels in the menu and control as React components */\r\n formatOptionLabel?: (optionType: OptionType, formatLabelMeta: FormatOptionLabelMeta) => React.ReactNode;\r\n /* Resolves option data to a string to be displayed as the label by components */\r\n getOptionLabel?: typeof getOptionLabel;\r\n /* Resolves option data to a string to compare options and specify value attributes */\r\n getOptionValue?: typeof getOptionValue;\r\n /* Hide the selected option from the menu */\r\n hideSelectedOptions?: boolean;\r\n /* The id to set on the SelectContainer component. */\r\n id?: string;\r\n /* The value of the search input */\r\n inputValue?: string;\r\n /* The id of the search input */\r\n inputId?: string;\r\n /* Define an id prefix for the select components e.g. {your-id}-value */\r\n instanceId?: number | string;\r\n /* Is the select value clearable */\r\n isClearable?: boolean;\r\n /* Is the select disabled */\r\n isDisabled?: boolean;\r\n /* Is the select in a state of loading (async) */\r\n isLoading?: boolean;\r\n /*\r\n Override the built-in logic to detect whether an option is disabled\r\n\r\n An example can be found in the [Replacing builtins](/advanced#replacing-builtins) documentation.\r\n */\r\n isOptionDisabled?: (option: OptionType, options: OptionsType) => boolean | false;\r\n /* Support multiple selected options */\r\n isMulti?: boolean;\r\n /* If true, menu will not be opened in a portal */\r\n isMenuFixed?: boolean;\r\n /* Is the select direction right-to-left */\r\n isRtl?: boolean;\r\n /* Whether to enable search functionality */\r\n isSearchable?: boolean;\r\n /* Minimum height of the menu before flipping */\r\n minMenuHeight?: number;\r\n /* Maximum height of the menu before scrolling */\r\n maxMenuHeight?: number;\r\n /* Whether the menu is open */\r\n menuIsOpen?: boolean;\r\n /* Whether to block scroll events when the menu is open */\r\n menuShouldBlockScroll?: boolean;\r\n /* Whether the menu should be scrolled into view when it opens */\r\n menuShouldScrollIntoView?: boolean;\r\n /* Name of the HTML Input (optional - without this, no input will be rendered) */\r\n name?: string;\r\n /* Text to display when there are no options */\r\n noOptionsMessage?: (obj: { inputValue: string }) => string | null;\r\n /* Handle blur events on the control */\r\n onBlur?: FocusEventHandler;\r\n /* Handle change events on the select */\r\n onChange?: (value: ValueType<OptionType>, action: ActionMeta<OptionType>) => void;\r\n /* Handle focus events on the control */\r\n onFocus?: FocusEventHandler;\r\n /* Handle change events on the input */\r\n onInputChange?: (newValue: string, actionMeta?: InputActionMeta) => void;\r\n /* Handle key down events on the select */\r\n onKeyDown?: KeyboardEventHandler;\r\n /* Handle the menu opening */\r\n onMenuOpen?: () => void;\r\n /* Handle the menu closing */\r\n onMenuClose?: () => void;\r\n /* Fired when the user scrolls to the top of the menu */\r\n onMenuScrollToTop?: (e: React.SyntheticEvent<HTMLElement>) => void;\r\n /* Fired when the user scrolls to the bottom of the menu */\r\n onMenuScrollToBottom?: (e: React.SyntheticEvent<HTMLElement>) => void;\r\n /* Allows control of whether the menu is opened when the Select is focused */\r\n openMenuOnFocus?: boolean;\r\n /* Allows control of whether the menu is opened when the Select is clicked */\r\n openMenuOnClick?: boolean;\r\n /* Array of options that populate the select menu */\r\n options: OptionsType;\r\n /* Number of options to jump in menu when page{up|down} keys are used */\r\n pageSize?: number;\r\n /* Placeholder for the select value */\r\n placeholder?: string;\r\n /** Provides ability to return reference to the ThemedSelect */\r\n ref?: React.Ref<Component>;\r\n /* Sets additional styling */\r\n styles?: React.CSSProperties;\r\n /* Sets the tabIndex attribute on the input */\r\n tabIndex?: string;\r\n /* Select the currently focused option when the user presses tab */\r\n tabSelectsValue?: boolean;\r\n /* The value of the select; reflected by the selected option */\r\n value?: ValueType<OptionType>;\r\n};\r\n\r\nconst ThemedMenu = (props: MenuProps<any>) => { // eslint-disable-line @typescript-eslint/naming-convention\r\n return (\r\n <div className=\"uicore-reactSelectTop\">\r\n <components.Menu {...props} />\r\n </div>\r\n );\r\n};\r\n/** ThemedSelect is a wrapper for react-select with iTwin.js UI theming applied\r\n * @beta\r\n * @deprecated in 3.0. Use Select from @itwin/itwinui-react\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function ThemedSelect(props: ThemedSelectProps) {\r\n const noOptionLabel = React.useRef<string | undefined>();\r\n const defaultOptionMessage = React.useCallback(() => {\r\n if (!noOptionLabel.current) {\r\n noOptionLabel.current = UiCore.translate(\"reactselect.noSelectOption\");\r\n }\r\n return noOptionLabel.current;\r\n }, [noOptionLabel]);\r\n const noOptionFunction = props.noOptionsMessage ?? defaultOptionMessage;\r\n const selectClassName = classnames(\"uicore-reactSelectTop\", props.className);\r\n const portalTarget = !!props.isMenuFixed ? undefined : getParentSelector();\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n classNamePrefix, className, noOptionsMessage, menuPortalTarget, isMenuFixed, styles, components, divRef, ref,\r\n // eslint-disable-next-line comma-dangle\r\n ...otherProps // pass-through props\r\n } = props as any;\r\n const selectStyles = {\r\n ...props.styles,\r\n menuPortal: (base: React.CSSProperties) => ({ ...base, zIndex }),\r\n };\r\n\r\n const zIndex = getCssVariableAsNumber(\"--uicore-z-index-dialog-popup\");\r\n return (\r\n <div className={selectClassName} ref={divRef}>\r\n <Component\r\n ref={ref}\r\n classNamePrefix=\"react-select\"\r\n noOptionsMessage={noOptionFunction}\r\n menuPortalTarget={portalTarget}\r\n styles={selectStyles}\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n components={{ Menu: ThemedMenu, ...props.components }}\r\n {...otherProps}\r\n />\r\n </div>\r\n );\r\n}\r\n"]}
|