@itwin/core-react 3.6.0-dev.8 → 4.0.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 +26 -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 +5 -5
- package/lib/cjs/core-react/form/Form.js +1 -1
- 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/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 +5 -5
- package/lib/esm/core-react/form/Form.js +1 -1
- 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/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
|
@@ -22,7 +22,7 @@ const ThemedMenu = (props) => {
|
|
|
22
22
|
};
|
|
23
23
|
/** ThemedSelect is a wrapper for react-select with iTwin.js UI theming applied
|
|
24
24
|
* @beta
|
|
25
|
-
* @deprecated
|
|
25
|
+
* @deprecated in 3.0. Use Select from @itwin/itwinui-react
|
|
26
26
|
*/
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28
28
|
function ThemedSelect(props) {
|
|
@@ -1 +1 @@
|
|
|
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,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,+CAAqD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AAG,IAAI,EAAE,MAAM,EAAE,CAAC;KACjE,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,uCAAsB,EAAC,+BAA+B,CAAC,CAAC;IACvE,OAAO,CACL,6BAAK,SAAS,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM;QAC1C,oBAAC,sBAAS,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;AArCD,oCAqCC","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,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,+CAAqD;AAKrD,sCAAmC;AACnC,4DAAiE;AACjE,+CAAkD;AAqLlD,MAAM,UAAU,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,OAAO,CACL,6BAAK,SAAS,EAAC,uBAAuB;QACpC,oBAAC,yBAAU,CAAC,IAAI,OAAK,KAAK,GAAI,CAC1B,CACP,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,gEAAgE;AAChE,SAAgB,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,eAAM,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,IAAA,oBAAU,EAAC,uBAAuB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC7E,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,+BAAiB,GAAE,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,IAAA,uCAAsB,EAAC,+BAA+B,CAAC,CAAC;IACvE,OAAO,CACL,6BAAK,SAAS,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM;QAC1C,oBAAC,sBAAS,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;AArCD,oCAqCC","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"]}
|
|
@@ -74,7 +74,7 @@ export interface SliderProps extends CommonProps {
|
|
|
74
74
|
/**
|
|
75
75
|
* Slider React component displays a range slider.
|
|
76
76
|
* @public
|
|
77
|
-
* @deprecated Use Slider in itwinui-react instead
|
|
77
|
+
* @deprecated in 3.0. Use Slider in itwinui-react instead
|
|
78
78
|
*/
|
|
79
79
|
export declare function Slider(props: SliderProps): JSX.Element;
|
|
80
80
|
//# sourceMappingURL=Slider.d.ts.map
|
|
@@ -16,7 +16,7 @@ const BodyText_1 = require("../text/BodyText");
|
|
|
16
16
|
/**
|
|
17
17
|
* Slider React component displays a range slider.
|
|
18
18
|
* @public
|
|
19
|
-
* @deprecated Use Slider in itwinui-react instead
|
|
19
|
+
* @deprecated in 3.0. Use Slider in itwinui-react instead
|
|
20
20
|
*/
|
|
21
21
|
function Slider(props) {
|
|
22
22
|
const { className, style, min, max, values, step, mode, formatMin, formatMax, onChange, onUpdate, showTicks, showTickLabels, formatTick, getTickCount, getTickValues, includeTicksInWidth, reversed, disabled, showMinMax, minImage, maxImage, showTooltip, tooltipBelow, formatTooltip, } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../src/core-react/slider/Slider.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAC/B,wDAA6D;AAE7D,+CAA4C;AA6E5C;;;;IA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,EAAE,EACX,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB;QACD,UAAU;YACT,oBAAC,MAAM,IAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAC,iBAAiB,EAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAI,CAEjF,CACP,CAAC;AACJ,CAAC;AAvGD,wBAuGC;AAUD,kCAAkC;AAClC,SAAS,MAAM,CAAC,KAAkB;IAChC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC/C,IAAI,OAAgC,CAAC;IACrC,MAAM,YAAY,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAElE,IAAI,KAAK;QACP,OAAO,GAAG,0CAAG,KAAK,CAAI,CAAC;;QAEvB,OAAO,GAAG,oBAAC,mBAAQ,IAAC,SAAS,EAAC,oBAAoB,iBAAc,MAAM,IAAG,YAAY,CAAY,CAAC;IAEpG,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 Slider\r\n */\r\n\r\nimport \"./Slider.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Slider as ItwinSlider } from \"@itwin/itwinui-react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { BodyText } from \"../text/BodyText\";\r\n\r\n// cspell:ignore pushable\r\n\r\n/** Properties for [[Slider]] component\r\n * @public\r\n */\r\nexport interface SliderProps extends CommonProps {\r\n /** Values to set Slider to initially */\r\n values: number[];\r\n /** Minimum value */\r\n min: number;\r\n /** Maximum value */\r\n max: number;\r\n /** Format the min display value */\r\n formatMin?: (value: number) => string;\r\n /** Format the max display value */\r\n formatMax?: (value: number) => string;\r\n\r\n /** Step value. Default is 0.1. */\r\n step?: number;\r\n /** The interaction mode. Default is 1. Possible values:\r\n * 1 - allows handles to cross each other.\r\n * 2 - keeps the sliders from crossing and separated by a step.\r\n */\r\n mode?: number | (() => number);\r\n /** Indicates whether the display of the Slider values is reversed. */\r\n reversed?: boolean;\r\n /** Indicates whether the Slider is disabled. */\r\n disabled?: boolean;\r\n /** Indicates whether to compensate for the tick marks when determining the width. */\r\n includeTicksInWidth?: boolean;\r\n\r\n /** Indicates whether to show tooltip with the value. The tooltip will be positioned above the Slider, by default. */\r\n showTooltip?: boolean;\r\n /** Indicates whether the tooltip should show below the Slider instead of above. */\r\n tooltipBelow?: boolean;\r\n /** Format a value for the tooltip */\r\n formatTooltip?: (value: number) => string;\r\n\r\n /** Indicates whether to show min & max values to the left & right of the Slider. */\r\n showMinMax?: boolean;\r\n /** Image to show for min. */\r\n minImage?: React.ReactNode;\r\n /** Image to show for max. */\r\n maxImage?: React.ReactNode;\r\n\r\n /** Indicates whether to show tick marks under the Slider. */\r\n showTicks?: boolean;\r\n /** Indicates whether to show tick labels under the tick marks. */\r\n showTickLabels?: boolean;\r\n /** Format a tick mark value */\r\n formatTick?: (tick: number) => string;\r\n /** Function to get the tick count. The default tick count is 10. */\r\n getTickCount?: () => number;\r\n /** Function to get the tick values. This overrides the tick count from getTickCount.\r\n * Use this prop if you want to specify your own tick values instead of ticks generated by the slider.\r\n * The numbers should be valid numbers in the domain and correspond to the step value.\r\n * Invalid values will be coerced to the closet matching value in the domain.\r\n */\r\n getTickValues?: () => number[];\r\n\r\n /** Listens for value changes.\r\n * Triggered when the value of the slider has changed. This will receive changes at\r\n * the end of a slide as well as changes from clicks on rails and tracks.\r\n */\r\n onChange?: (values: ReadonlyArray<number>) => void;\r\n /** Listens for value updates.\r\n * Called with the values at each update (caution: high-volume updates when dragging).\r\n */\r\n onUpdate?: (values: ReadonlyArray<number>) => void;\r\n /** No longer available use onUpdate. */\r\n onSlideStart?: (values: ReadonlyArray<number>) => void;\r\n /** No longer available use onChange. */\r\n onSlideEnd?: (values: ReadonlyArray<number>) => void;\r\n}\r\n\r\n/**\r\n * Slider React component displays a range slider.\r\n * @public\r\n * @deprecated Use Slider in itwinui-react instead\r\n */\r\nexport function Slider(props: SliderProps) {\r\n const { className, style, min, max, values, step, mode,\r\n formatMin, formatMax,\r\n onChange, onUpdate,\r\n showTicks, showTickLabels, formatTick, getTickCount, getTickValues, includeTicksInWidth,\r\n reversed, disabled,\r\n showMinMax, minImage, maxImage,\r\n showTooltip, tooltipBelow, formatTooltip,\r\n } = props;\r\n\r\n const containerClassNames = classnames(\r\n \"core-slider-container\",\r\n className,\r\n disabled && \"core-disabled\",\r\n showTickLabels && \"core-slider-tickLabels\",\r\n includeTicksInWidth && \"core-slider-includeTicksInWidth\",\r\n );\r\n const sliderClassNames = classnames(\r\n \"core-slider\",\r\n showMinMax && \"core-slider-minMax\",\r\n );\r\n\r\n const internalFormatTooltip = React.useCallback((value: number) => {\r\n if (formatTooltip)\r\n return formatTooltip(value);\r\n\r\n const actualStep = Math.abs(step ?? 1);\r\n\r\n if (Number.isInteger(actualStep))\r\n return value.toFixed(0);\r\n\r\n const stepString = actualStep.toString();\r\n const decimalIndex = stepString.indexOf(\".\");\r\n const numDecimals = actualStep.toString().length - (decimalIndex + 1);\r\n return value.toFixed(numDecimals);\r\n }, [formatTooltip, step]);\r\n\r\n const tooltipProps = React.useCallback((_index: number, val: number) => {\r\n const content = internalFormatTooltip(val);\r\n if (!showTooltip)\r\n return { visible: false };\r\n return { placement: tooltipBelow ? \"bottom\" : \"top\", content } as const;\r\n }, [internalFormatTooltip, showTooltip, tooltipBelow]);\r\n\r\n const tickLabels = React.useMemo(() => {\r\n let ticks: string[] | undefined;\r\n\r\n if (showTicks) {\r\n const count = getTickCount ? getTickCount() : 0;\r\n if (count) {\r\n ticks = [];\r\n const increment = (max - min) / count;\r\n for (let i = 0; i <= count; i++) {\r\n const value = (i * increment) + min;\r\n if (showTickLabels) {\r\n const label = formatTick ? formatTick(value) : internalFormatTooltip(value);\r\n ticks.push(label);\r\n } else {\r\n ticks.push(\"\");\r\n }\r\n }\r\n } else /* istanbul ignore else */ if (getTickValues) {\r\n return getTickValues().map((val: number) => formatTick ? formatTick(val) : internalFormatTooltip(val));\r\n }\r\n }\r\n return ticks;\r\n }, [formatTick, getTickCount, getTickValues, internalFormatTooltip, max, min, showTickLabels, showTicks]);\r\n\r\n const thumbMode = React.useMemo(() => {\r\n let inMode = 1;\r\n if (typeof mode === \"function\")\r\n inMode = mode();\r\n\r\n return 1 === inMode ? \"allow-crossing\" : \"inhibit-crossing\";\r\n }, [mode]);\r\n\r\n return (\r\n <div className={containerClassNames} style={style}>\r\n {showMinMax &&\r\n <MinMax value={min} testId=\"core-slider-min\" image={minImage} format={formatMin} />\r\n }\r\n <ItwinSlider\r\n className={sliderClassNames}\r\n values={values}\r\n min={min}\r\n max={max}\r\n step={step}\r\n thumbMode={thumbMode}\r\n trackDisplayMode={!reversed ? \"auto\" : \"odd-segments\"\r\n }\r\n disabled={disabled}\r\n minLabel=\"\"\r\n maxLabel=\"\"\r\n tooltipProps={tooltipProps}\r\n tickLabels={tickLabels}\r\n onChange={onChange}\r\n onUpdate={onUpdate}\r\n />\r\n {showMinMax &&\r\n <MinMax value={max} testId=\"core-slider-max\" image={maxImage} format={formatMax} />\r\n }\r\n </div>\r\n );\r\n}\r\n\r\n/** Properties for [[MinMax]] component */\r\ninterface MinMaxProps {\r\n value: number;\r\n testId: string;\r\n image?: React.ReactNode;\r\n format?: (value: number) => string;\r\n}\r\n\r\n/** MinMax component for Slider */\r\nfunction MinMax(props: MinMaxProps) {\r\n const { value, testId, image, format } = props;\r\n let element: React.ReactElement<any>;\r\n const displayValue = format !== undefined ? format(value) : value;\r\n\r\n if (image)\r\n element = <>{image}</>;\r\n else\r\n element = <BodyText className=\"core-slider-minmax\" data-testid={testId}>{displayValue}</BodyText>;\r\n\r\n return element;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../src/core-react/slider/Slider.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAC/B,wDAA6D;AAE7D,+CAA4C;AA6E5C;;;;IAII;AACJ,SAAgB,MAAM,CAAC,KAAkB;IACvC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EACpD,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EACvF,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAC9B,WAAW,EAAE,YAAY,EAAE,aAAa,GACzC,GAAG,KAAK,CAAC;IAEV,MAAM,mBAAmB,GAAG,IAAA,oBAAU,EACpC,uBAAuB,EACvB,SAAS,EACT,QAAQ,IAAI,eAAe,EAC3B,cAAc,IAAI,wBAAwB,EAC1C,mBAAmB,IAAI,iCAAiC,CACzD,CAAC;IACF,MAAM,gBAAgB,GAAG,IAAA,oBAAU,EACjC,aAAa,EACb,UAAU,IAAI,oBAAoB,CACnC,CAAC;IAEF,MAAM,qBAAqB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAAa,EAAE,EAAE;QAChE,IAAI,aAAa;YACf,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;QAE9B,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,CAAC,CAAC;QAEvC,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;YAC9B,OAAO,K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BAAW,IACV,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,EAErD,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAC,EAAE,EACX,QAAQ,EAAC,EAAE,EACX,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB;QACD,UAAU;YACT,oBAAC,MAAM,IAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAC,iBAAiB,EAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAI,CAEjF,CACP,CAAC;AACJ,CAAC;AAvGD,wBAuGC;AAUD,kCAAkC;AAClC,SAAS,MAAM,CAAC,KAAkB;IAChC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC/C,IAAI,OAAgC,CAAC;IACrC,MAAM,YAAY,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAElE,IAAI,KAAK;QACP,OAAO,GAAG,0CAAG,KAAK,CAAI,CAAC;;QAEvB,OAAO,GAAG,oBAAC,mBAAQ,IAAC,SAAS,EAAC,oBAAoB,iBAAc,MAAM,IAAG,YAAY,CAAY,CAAC;IAEpG,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 Slider\r\n */\r\n\r\nimport \"./Slider.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Slider as ItwinSlider } from \"@itwin/itwinui-react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { BodyText } from \"../text/BodyText\";\r\n\r\n// cspell:ignore pushable\r\n\r\n/** Properties for [[Slider]] component\r\n * @public\r\n */\r\nexport interface SliderProps extends CommonProps {\r\n /** Values to set Slider to initially */\r\n values: number[];\r\n /** Minimum value */\r\n min: number;\r\n /** Maximum value */\r\n max: number;\r\n /** Format the min display value */\r\n formatMin?: (value: number) => string;\r\n /** Format the max display value */\r\n formatMax?: (value: number) => string;\r\n\r\n /** Step value. Default is 0.1. */\r\n step?: number;\r\n /** The interaction mode. Default is 1. Possible values:\r\n * 1 - allows handles to cross each other.\r\n * 2 - keeps the sliders from crossing and separated by a step.\r\n */\r\n mode?: number | (() => number);\r\n /** Indicates whether the display of the Slider values is reversed. */\r\n reversed?: boolean;\r\n /** Indicates whether the Slider is disabled. */\r\n disabled?: boolean;\r\n /** Indicates whether to compensate for the tick marks when determining the width. */\r\n includeTicksInWidth?: boolean;\r\n\r\n /** Indicates whether to show tooltip with the value. The tooltip will be positioned above the Slider, by default. */\r\n showTooltip?: boolean;\r\n /** Indicates whether the tooltip should show below the Slider instead of above. */\r\n tooltipBelow?: boolean;\r\n /** Format a value for the tooltip */\r\n formatTooltip?: (value: number) => string;\r\n\r\n /** Indicates whether to show min & max values to the left & right of the Slider. */\r\n showMinMax?: boolean;\r\n /** Image to show for min. */\r\n minImage?: React.ReactNode;\r\n /** Image to show for max. */\r\n maxImage?: React.ReactNode;\r\n\r\n /** Indicates whether to show tick marks under the Slider. */\r\n showTicks?: boolean;\r\n /** Indicates whether to show tick labels under the tick marks. */\r\n showTickLabels?: boolean;\r\n /** Format a tick mark value */\r\n formatTick?: (tick: number) => string;\r\n /** Function to get the tick count. The default tick count is 10. */\r\n getTickCount?: () => number;\r\n /** Function to get the tick values. This overrides the tick count from getTickCount.\r\n * Use this prop if you want to specify your own tick values instead of ticks generated by the slider.\r\n * The numbers should be valid numbers in the domain and correspond to the step value.\r\n * Invalid values will be coerced to the closet matching value in the domain.\r\n */\r\n getTickValues?: () => number[];\r\n\r\n /** Listens for value changes.\r\n * Triggered when the value of the slider has changed. This will receive changes at\r\n * the end of a slide as well as changes from clicks on rails and tracks.\r\n */\r\n onChange?: (values: ReadonlyArray<number>) => void;\r\n /** Listens for value updates.\r\n * Called with the values at each update (caution: high-volume updates when dragging).\r\n */\r\n onUpdate?: (values: ReadonlyArray<number>) => void;\r\n /** No longer available use onUpdate. */\r\n onSlideStart?: (values: ReadonlyArray<number>) => void;\r\n /** No longer available use onChange. */\r\n onSlideEnd?: (values: ReadonlyArray<number>) => void;\r\n}\r\n\r\n/**\r\n * Slider React component displays a range slider.\r\n * @public\r\n * @deprecated in 3.0. Use Slider in itwinui-react instead\r\n */\r\nexport function Slider(props: SliderProps) {\r\n const { className, style, min, max, values, step, mode,\r\n formatMin, formatMax,\r\n onChange, onUpdate,\r\n showTicks, showTickLabels, formatTick, getTickCount, getTickValues, includeTicksInWidth,\r\n reversed, disabled,\r\n showMinMax, minImage, maxImage,\r\n showTooltip, tooltipBelow, formatTooltip,\r\n } = props;\r\n\r\n const containerClassNames = classnames(\r\n \"core-slider-container\",\r\n className,\r\n disabled && \"core-disabled\",\r\n showTickLabels && \"core-slider-tickLabels\",\r\n includeTicksInWidth && \"core-slider-includeTicksInWidth\",\r\n );\r\n const sliderClassNames = classnames(\r\n \"core-slider\",\r\n showMinMax && \"core-slider-minMax\",\r\n );\r\n\r\n const internalFormatTooltip = React.useCallback((value: number) => {\r\n if (formatTooltip)\r\n return formatTooltip(value);\r\n\r\n const actualStep = Math.abs(step ?? 1);\r\n\r\n if (Number.isInteger(actualStep))\r\n return value.toFixed(0);\r\n\r\n const stepString = actualStep.toString();\r\n const decimalIndex = stepString.indexOf(\".\");\r\n const numDecimals = actualStep.toString().length - (decimalIndex + 1);\r\n return value.toFixed(numDecimals);\r\n }, [formatTooltip, step]);\r\n\r\n const tooltipProps = React.useCallback((_index: number, val: number) => {\r\n const content = internalFormatTooltip(val);\r\n if (!showTooltip)\r\n return { visible: false };\r\n return { placement: tooltipBelow ? \"bottom\" : \"top\", content } as const;\r\n }, [internalFormatTooltip, showTooltip, tooltipBelow]);\r\n\r\n const tickLabels = React.useMemo(() => {\r\n let ticks: string[] | undefined;\r\n\r\n if (showTicks) {\r\n const count = getTickCount ? getTickCount() : 0;\r\n if (count) {\r\n ticks = [];\r\n const increment = (max - min) / count;\r\n for (let i = 0; i <= count; i++) {\r\n const value = (i * increment) + min;\r\n if (showTickLabels) {\r\n const label = formatTick ? formatTick(value) : internalFormatTooltip(value);\r\n ticks.push(label);\r\n } else {\r\n ticks.push(\"\");\r\n }\r\n }\r\n } else /* istanbul ignore else */ if (getTickValues) {\r\n return getTickValues().map((val: number) => formatTick ? formatTick(val) : internalFormatTooltip(val));\r\n }\r\n }\r\n return ticks;\r\n }, [formatTick, getTickCount, getTickValues, internalFormatTooltip, max, min, showTickLabels, showTicks]);\r\n\r\n const thumbMode = React.useMemo(() => {\r\n let inMode = 1;\r\n if (typeof mode === \"function\")\r\n inMode = mode();\r\n\r\n return 1 === inMode ? \"allow-crossing\" : \"inhibit-crossing\";\r\n }, [mode]);\r\n\r\n return (\r\n <div className={containerClassNames} style={style}>\r\n {showMinMax &&\r\n <MinMax value={min} testId=\"core-slider-min\" image={minImage} format={formatMin} />\r\n }\r\n <ItwinSlider\r\n className={sliderClassNames}\r\n values={values}\r\n min={min}\r\n max={max}\r\n step={step}\r\n thumbMode={thumbMode}\r\n trackDisplayMode={!reversed ? \"auto\" : \"odd-segments\"\r\n }\r\n disabled={disabled}\r\n minLabel=\"\"\r\n maxLabel=\"\"\r\n tooltipProps={tooltipProps}\r\n tickLabels={tickLabels}\r\n onChange={onChange}\r\n onUpdate={onUpdate}\r\n />\r\n {showMinMax &&\r\n <MinMax value={max} testId=\"core-slider-max\" image={maxImage} format={formatMax} />\r\n }\r\n </div>\r\n );\r\n}\r\n\r\n/** Properties for [[MinMax]] component */\r\ninterface MinMaxProps {\r\n value: number;\r\n testId: string;\r\n image?: React.ReactNode;\r\n format?: (value: number) => string;\r\n}\r\n\r\n/** MinMax component for Slider */\r\nfunction MinMax(props: MinMaxProps) {\r\n const { value, testId, image, format } = props;\r\n let element: React.ReactElement<any>;\r\n const displayValue = format !== undefined ? format(value) : value;\r\n\r\n if (image)\r\n element = <>{image}</>;\r\n else\r\n element = <BodyText className=\"core-slider-minmax\" data-testid={testId}>{displayValue}</BodyText>;\r\n\r\n return element;\r\n}\r\n"]}
|
|
@@ -14,7 +14,7 @@ export declare enum SplitButtonActionType {
|
|
|
14
14
|
}
|
|
15
15
|
/** Properties for [[SplitButton]] component
|
|
16
16
|
* @public
|
|
17
|
-
* @deprecated Use SplitButtonProps in itwinui-react instead
|
|
17
|
+
* @deprecated in 3.0. Use SplitButtonProps in itwinui-react instead
|
|
18
18
|
*/
|
|
19
19
|
export interface SplitButtonProps extends CommonProps {
|
|
20
20
|
/** Label to display in click area. */
|
|
@@ -43,7 +43,7 @@ interface SplitButtonState {
|
|
|
43
43
|
/**
|
|
44
44
|
* SplitButton with an action button on the left and an arrow button that displays a context menu on the right.
|
|
45
45
|
* @public
|
|
46
|
-
* @deprecated Use SplitButton in itwinui-react instead
|
|
46
|
+
* @deprecated in 3.0. Use SplitButton in itwinui-react instead
|
|
47
47
|
*/
|
|
48
48
|
export declare class SplitButton extends React.Component<SplitButtonProps, SplitButtonState> {
|
|
49
49
|
private _arrowElement;
|
|
@@ -25,7 +25,7 @@ var SplitButtonActionType;
|
|
|
25
25
|
/**
|
|
26
26
|
* SplitButton with an action button on the left and an arrow button that displays a context menu on the right.
|
|
27
27
|
* @public
|
|
28
|
-
* @deprecated Use SplitButton in itwinui-react instead
|
|
28
|
+
* @deprecated in 3.0. Use SplitButton in itwinui-react instead
|
|
29
29
|
*/
|
|
30
30
|
class SplitButton extends React.Component {
|
|
31
31
|
constructor(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../../../../src/core-react/splitbutton/SplitButton.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAC/B,sEAAmE;AACnE,0DAAwD;AAExD,0DAAqE;AACrE,6CAAsE;AAEtE,kBAAkB;AAClB,gBAAgB;AAChB,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,+EAAW,CAAA;IACX,iEAAI,CAAA;AACN,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AAiCD;;;;GAIG;AACH,MAAa,WAAY,SAAQ,KAAK,CAAC,SAA6C;IAQlF,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QARP,kBAAa,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QAClD,eAAU,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QAC/C,aAAQ,GAAY,KAAK,CAAC;QAElC,gBAAgB;QACS,UAAK,GAA+B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAmEzE,iBAAY,GAAG,CAAC,KAA0B,EAAE,EAAE;YACpD,IAAI,KAAK,CAAC,GAAG,KAAK,2BAAU,CAAC,KAAK,EAAE;gBAClC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;aAChD;iBAAM,IAAI,KAAK,CAAC,GAAG,KAAK,2BAAU,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;gBACrE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACtB,IAAI,CAAC,KAAK,EAAE,CAAC;aACd;iBAAM;gBACL,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;aACvB;QACH,CAAC,CAAC;QAEM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E,IAAI,CAAC,UAAU,EACpB,IAAI,EAAC,QAAQ;YAGb,4CAAiB,yBAAyB,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EACpE,SAAS,EAAE,IAAA,oBAAU,EAAC,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,0BAA0B,CAAC,EACrG,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC;gBAEzB,IAAI;;gBAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CACpB;YACN,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,2BAA2B,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,0BAA0B,CAAC,GAAI;YAEhH,6BAAK,SAAS,EAAE,yBAAyB,EAAE,GAAG,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,iBAAiB,EACjG,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC;gBAE1B,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,8BAA8B,EAAE,MAAM,EAAE,mBAAmB,CAAC,GAAI;gBAC3F,oBAAC,mCAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,EAC/B,OAAO,EAAE,KAAK,EACd,aAAa,EAAE,CAAC,EAChB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,cAAc,EAAE,IAAI,CAAC,YAAY,EACjC,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC3B,QAAQ,EAAE,KAAK,IACd,IAAI,CAAC,KAAK,CAAC,QAAQ,CACH,CACf,CACF,CACP,CAAC;IACJ,CAAC;CA0CF;AAjHD,kCAiHC","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 SplitButton\r\n */\r\n\r\nimport \"./SplitButton.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { PopupContextMenu } from \"../contextmenu/PopupContextMenu\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { ButtonType, getButtonTypeClassName } from \"../button/Button\";\r\n\r\n// TODO: implement\r\n/** @internal */\r\nexport enum SplitButtonActionType {\r\n ContextMenu, // eslint-disable-line @typescript-eslint/no-shadow\r\n List,\r\n}\r\n\r\n/** Properties for [[SplitButton]] component\r\n * @public\r\n * @deprecated Use SplitButtonProps in itwinui-react instead\r\n */\r\nexport interface SplitButtonProps extends CommonProps {\r\n /** Label to display in click area. */\r\n label: string | React.ReactNode;\r\n /** Listens for click events on button area */\r\n onClick?: (event: any) => any;\r\n /** Listens for execute on button area */\r\n onExecute?: () => any;\r\n /** Specifies icon for Splitbutton component */\r\n icon?: IconSpec;\r\n /** Indicates whether to draw a border around the button */\r\n drawBorder?: boolean;\r\n /** ToolTip text */\r\n toolTip?: string;\r\n /** Direction relative to the button to which the popup is expanded (defaults to Bottom) */\r\n popupPosition?: RelativePosition;\r\n /** 4 styles to tweak the content of the button */\r\n buttonType?: ButtonType; // eslint-disable-line deprecation/deprecation\r\n\r\n /** @internal */\r\n initialExpanded?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface SplitButtonState {\r\n expanded: boolean;\r\n}\r\n\r\n/**\r\n * SplitButton with an action button on the left and an arrow button that displays a context menu on the right.\r\n * @public\r\n * @deprecated Use SplitButton in itwinui-react instead\r\n */\r\nexport class SplitButton extends React.Component<SplitButtonProps, SplitButtonState> { // eslint-disable-line deprecation/deprecation\r\n private _arrowElement = React.createRef<HTMLDivElement>();\r\n private _buttonRef = React.createRef<HTMLDivElement>();\r\n private _closing: boolean = false;\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<SplitButtonState> = { expanded: false };\r\n\r\n constructor(props: SplitButtonProps) { // eslint-disable-line deprecation/deprecation\r\n super(props);\r\n\r\n this.state = {\r\n expanded: props.initialExpanded !== undefined ? props.initialExpanded : false,\r\n };\r\n }\r\n\r\n public override render(): JSX.Element {\r\n let icon = (<></>);\r\n if (this.props.icon !== undefined) {\r\n icon = (\r\n <Icon iconSpec={this.props.icon} />\r\n );\r\n }\r\n\r\n const borderClassName = (this.props.drawBorder && this.props.buttonType === undefined) ? \"core-split-button-border\" : undefined;\r\n const typeClassName = this.props.buttonType !== undefined ? getButtonTypeClassName(this.props.buttonType) : \"core-split-button-default-colors\";\r\n const classNames = classnames(\r\n \"core-split-button\",\r\n typeClassName,\r\n borderClassName,\r\n this.state.expanded && \"core-expanded\",\r\n this.props.className);\r\n const position = this.props.popupPosition !== undefined ? this.props.popupPosition : RelativePosition.BottomLeft;\r\n\r\n return (\r\n <div data-testid=\"core-split-button-root\" title={this.props.toolTip}\r\n className={classNames}\r\n style={this.props.style}\r\n tabIndex={0}\r\n onKeyUp={this._handleKeyUp}\r\n ref={this._buttonRef}\r\n role=\"button\"\r\n >\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div data-testid=\"core-split-button-label\" onClick={this.props.onClick}\r\n className={classnames(\"core-split-button-label\", this.props.drawBorder && \"core-split-button-border\")}\r\n role=\"button\" tabIndex={-1}\r\n >\r\n {icon} {this.props.label}\r\n </div>\r\n <div className={classnames(\"core-split-button-divider\", this.props.drawBorder && \"core-split-button-border\")} />\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div className={\"core-split-button-arrow\"} ref={this._arrowElement} onClick={this._handleArrowClick}\r\n role=\"button\" tabIndex={-1}\r\n >\r\n <div className={classnames(\"core-split-button-arrow-icon\", \"icon\", \"icon-chevron-down\")} />\r\n <PopupContextMenu\r\n position={position}\r\n target={this._buttonRef.current}\r\n animate={false}\r\n selectedIndex={0}\r\n onSelect={this._handleClose}\r\n onOutsideClick={this._handleClose}\r\n onEsc={this._handleClose}\r\n isOpen={this.state.expanded}\r\n autoflip={false}>\r\n {this.props.children}\r\n </PopupContextMenu>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent) => {\r\n if (event.key === SpecialKey.Enter) {\r\n this.props.onExecute && this.props.onExecute();\r\n } else if (event.key === SpecialKey.ArrowDown && !this.state.expanded) {\r\n this._closing = false;\r\n this._open();\r\n } else {\r\n this._closing = false;\r\n }\r\n };\r\n\r\n private _open = () => {\r\n // istanbul ignore else\r\n if (!this.state.expanded && !this._closing) {\r\n this.setState({ expanded: true });\r\n } else {\r\n this._closing = false;\r\n }\r\n };\r\n\r\n private _handleArrowClick = (event: React.MouseEvent) => {\r\n if (this.state.expanded) {\r\n event.stopPropagation();\r\n this.setState({ expanded: false });\r\n this._closing = false;\r\n } else {\r\n this._open();\r\n }\r\n };\r\n\r\n private _handleClose = (event: any) => {\r\n // istanbul ignore else\r\n if (this._arrowElement.current && this._buttonRef.current) {\r\n // istanbul ignore next\r\n if (this.state.expanded && \"target\" in event && this._arrowElement.current.contains(event.target))\r\n this._closing = true;\r\n this.setState((_prevState) => ({ expanded: false }));\r\n this._buttonRef.current.focus();\r\n }\r\n };\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../../../../src/core-react/splitbutton/SplitButton.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,2CAAoC;AACpC,+BAA+B;AAC/B,sEAAmE;AACnE,0DAAwD;AAExD,0DAAqE;AACrE,6CAAsE;AAEtE,kBAAkB;AAClB,gBAAgB;AAChB,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,+EAAW,CAAA;IACX,iEAAI,CAAA;AACN,CAAC,EAHW,qBAAqB,G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,CAAC,UAAU,IAAI,0BAA0B,CAAC,GAAI;YAEhH,6BAAK,SAAS,EAAE,yBAAyB,EAAE,GAAG,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,iBAAiB,EACjG,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC;gBAE1B,6BAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,8BAA8B,EAAE,MAAM,EAAE,mBAAmB,CAAC,GAAI;gBAC3F,oBAAC,mCAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,EAC/B,OAAO,EAAE,KAAK,EACd,aAAa,EAAE,CAAC,EAChB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,cAAc,EAAE,IAAI,CAAC,YAAY,EACjC,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC3B,QAAQ,EAAE,KAAK,IACd,IAAI,CAAC,KAAK,CAAC,QAAQ,CACH,CACf,CACF,CACP,CAAC;IACJ,CAAC;CA0CF;AAjHD,kCAiHC","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 SplitButton\r\n */\r\n\r\nimport \"./SplitButton.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { PopupContextMenu } from \"../contextmenu/PopupContextMenu\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { ButtonType, getButtonTypeClassName } from \"../button/Button\";\r\n\r\n// TODO: implement\r\n/** @internal */\r\nexport enum SplitButtonActionType {\r\n ContextMenu, // eslint-disable-line @typescript-eslint/no-shadow\r\n List,\r\n}\r\n\r\n/** Properties for [[SplitButton]] component\r\n * @public\r\n * @deprecated in 3.0. Use SplitButtonProps in itwinui-react instead\r\n */\r\nexport interface SplitButtonProps extends CommonProps {\r\n /** Label to display in click area. */\r\n label: string | React.ReactNode;\r\n /** Listens for click events on button area */\r\n onClick?: (event: any) => any;\r\n /** Listens for execute on button area */\r\n onExecute?: () => any;\r\n /** Specifies icon for Splitbutton component */\r\n icon?: IconSpec;\r\n /** Indicates whether to draw a border around the button */\r\n drawBorder?: boolean;\r\n /** ToolTip text */\r\n toolTip?: string;\r\n /** Direction relative to the button to which the popup is expanded (defaults to Bottom) */\r\n popupPosition?: RelativePosition;\r\n /** 4 styles to tweak the content of the button */\r\n buttonType?: ButtonType; // eslint-disable-line deprecation/deprecation\r\n\r\n /** @internal */\r\n initialExpanded?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface SplitButtonState {\r\n expanded: boolean;\r\n}\r\n\r\n/**\r\n * SplitButton with an action button on the left and an arrow button that displays a context menu on the right.\r\n * @public\r\n * @deprecated in 3.0. Use SplitButton in itwinui-react instead\r\n */\r\nexport class SplitButton extends React.Component<SplitButtonProps, SplitButtonState> { // eslint-disable-line deprecation/deprecation\r\n private _arrowElement = React.createRef<HTMLDivElement>();\r\n private _buttonRef = React.createRef<HTMLDivElement>();\r\n private _closing: boolean = false;\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<SplitButtonState> = { expanded: false };\r\n\r\n constructor(props: SplitButtonProps) { // eslint-disable-line deprecation/deprecation\r\n super(props);\r\n\r\n this.state = {\r\n expanded: props.initialExpanded !== undefined ? props.initialExpanded : false,\r\n };\r\n }\r\n\r\n public override render(): JSX.Element {\r\n let icon = (<></>);\r\n if (this.props.icon !== undefined) {\r\n icon = (\r\n <Icon iconSpec={this.props.icon} />\r\n );\r\n }\r\n\r\n const borderClassName = (this.props.drawBorder && this.props.buttonType === undefined) ? \"core-split-button-border\" : undefined;\r\n const typeClassName = this.props.buttonType !== undefined ? getButtonTypeClassName(this.props.buttonType) : \"core-split-button-default-colors\";\r\n const classNames = classnames(\r\n \"core-split-button\",\r\n typeClassName,\r\n borderClassName,\r\n this.state.expanded && \"core-expanded\",\r\n this.props.className);\r\n const position = this.props.popupPosition !== undefined ? this.props.popupPosition : RelativePosition.BottomLeft;\r\n\r\n return (\r\n <div data-testid=\"core-split-button-root\" title={this.props.toolTip}\r\n className={classNames}\r\n style={this.props.style}\r\n tabIndex={0}\r\n onKeyUp={this._handleKeyUp}\r\n ref={this._buttonRef}\r\n role=\"button\"\r\n >\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div data-testid=\"core-split-button-label\" onClick={this.props.onClick}\r\n className={classnames(\"core-split-button-label\", this.props.drawBorder && \"core-split-button-border\")}\r\n role=\"button\" tabIndex={-1}\r\n >\r\n {icon} {this.props.label}\r\n </div>\r\n <div className={classnames(\"core-split-button-divider\", this.props.drawBorder && \"core-split-button-border\")} />\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div className={\"core-split-button-arrow\"} ref={this._arrowElement} onClick={this._handleArrowClick}\r\n role=\"button\" tabIndex={-1}\r\n >\r\n <div className={classnames(\"core-split-button-arrow-icon\", \"icon\", \"icon-chevron-down\")} />\r\n <PopupContextMenu\r\n position={position}\r\n target={this._buttonRef.current}\r\n animate={false}\r\n selectedIndex={0}\r\n onSelect={this._handleClose}\r\n onOutsideClick={this._handleClose}\r\n onEsc={this._handleClose}\r\n isOpen={this.state.expanded}\r\n autoflip={false}>\r\n {this.props.children}\r\n </PopupContextMenu>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent) => {\r\n if (event.key === SpecialKey.Enter) {\r\n this.props.onExecute && this.props.onExecute();\r\n } else if (event.key === SpecialKey.ArrowDown && !this.state.expanded) {\r\n this._closing = false;\r\n this._open();\r\n } else {\r\n this._closing = false;\r\n }\r\n };\r\n\r\n private _open = () => {\r\n // istanbul ignore else\r\n if (!this.state.expanded && !this._closing) {\r\n this.setState({ expanded: true });\r\n } else {\r\n this._closing = false;\r\n }\r\n };\r\n\r\n private _handleArrowClick = (event: React.MouseEvent) => {\r\n if (this.state.expanded) {\r\n event.stopPropagation();\r\n this.setState({ expanded: false });\r\n this._closing = false;\r\n } else {\r\n this._open();\r\n }\r\n };\r\n\r\n private _handleClose = (event: any) => {\r\n // istanbul ignore else\r\n if (this._arrowElement.current && this._buttonRef.current) {\r\n // istanbul ignore next\r\n if (this.state.expanded && \"target\" in event && this._arrowElement.current.contains(event.target))\r\n this._closing = true;\r\n this.setState((_prevState) => ({ expanded: false }));\r\n this._buttonRef.current.focus();\r\n }\r\n };\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TabsProps } from "./Tabs";
|
|
6
6
|
/** Horizontal tabs meant to represent the current position in a page/section
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use HorizontalTabs in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use HorizontalTabs in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function HorizontalTabs(props: TabsProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=HorizontalTabs.d.ts.map
|
|
@@ -13,7 +13,7 @@ const Tabs_1 = require("./Tabs");
|
|
|
13
13
|
const Orientation_1 = require("../enums/Orientation");
|
|
14
14
|
/** Horizontal tabs meant to represent the current position in a page/section
|
|
15
15
|
* @public
|
|
16
|
-
* @deprecated Use HorizontalTabs in itwinui-react instead
|
|
16
|
+
* @deprecated in 3.0. Use HorizontalTabs in itwinui-react instead
|
|
17
17
|
*/
|
|
18
18
|
function HorizontalTabs(props) {
|
|
19
19
|
return (React.createElement(Tabs_1.Tabs, { mainClassName: "uicore-tabs-horizontal", orientation: Orientation_1.Orientation.Horizontal, ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalTabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/HorizontalTabs.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,iCAAyC;AACzC,sDAAmD;AAEnD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAgB;IAC7C,OAAO,CACL,oBAAC,WAAI,IAAC,aAAa,EAAC,wBAAwB,EAAC,WAAW,EAAE,yBAAW,CAAC,UAAU,KAAM,KAAK,GAAI,CAChG,CAAC;AACJ,CAAC;AAJD,wCAIC","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 Tabs\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tabs, TabsProps } from \"./Tabs\";\r\nimport { Orientation } from \"../enums/Orientation\";\r\n\r\n/** Horizontal tabs meant to represent the current position in a page/section\r\n * @public\r\n * @deprecated Use HorizontalTabs in itwinui-react instead\r\n */\r\nexport function HorizontalTabs(props: TabsProps) {\r\n return (\r\n <Tabs mainClassName=\"uicore-tabs-horizontal\" orientation={Orientation.Horizontal} {...props} />\r\n );\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"HorizontalTabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/HorizontalTabs.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,iCAAyC;AACzC,sDAAmD;AAEnD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAgB;IAC7C,OAAO,CACL,oBAAC,WAAI,IAAC,aAAa,EAAC,wBAAwB,EAAC,WAAW,EAAE,yBAAW,CAAC,UAAU,KAAM,KAAK,GAAI,CAChG,CAAC;AACJ,CAAC;AAJD,wCAIC","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 Tabs\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tabs, TabsProps } from \"./Tabs\";\r\nimport { Orientation } from \"../enums/Orientation\";\r\n\r\n/** Horizontal tabs meant to represent the current position in a page/section\r\n * @public\r\n * @deprecated in 3.0. Use HorizontalTabs in itwinui-react instead\r\n */\r\nexport function HorizontalTabs(props: TabsProps) {\r\n return (\r\n <Tabs mainClassName=\"uicore-tabs-horizontal\" orientation={Orientation.Horizontal} {...props} />\r\n );\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled headline text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use Headline in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Headline in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function Headline(props: TextProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=Headline.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled headline text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Headline in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Headline in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function Headline(props) {
|
|
18
18
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-headline" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Headline.js","sourceRoot":"","sources":["../../../../src/core-react/text/Headline.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,QAAQ,CAAC,KAAgB;IACvC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACxE,CAAC;AAFD,4BAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled headline text React functional component\r\n * @public\r\n * @deprecated Use Headline in itwinui-react instead\r\n */\r\nexport function Headline(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-headline\" />;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Headline.js","sourceRoot":"","sources":["../../../../src/core-react/text/Headline.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,QAAQ,CAAC,KAAgB;IACvC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACxE,CAAC;AAFD,4BAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled headline text React functional component\r\n * @public\r\n * @deprecated in 3.0. Use Headline in itwinui-react instead\r\n */\r\nexport function Headline(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-headline\" />;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled leading text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use Leading in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Leading in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function LeadingText(props: TextProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=LeadingText.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled leading text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Leading in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Leading in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function LeadingText(props) {
|
|
18
18
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-leading" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeadingText.js","sourceRoot":"","sources":["../../../../src/core-react/text/LeadingText.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,WAAW,CAAC,KAAgB;IAC1C,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,qBAAqB,GAAG,CAAC;AACvE,CAAC;AAFD,kCAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled leading text React functional component\r\n * @public\r\n * @deprecated Use Leading in itwinui-react instead\r\n */\r\nexport function LeadingText(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-leading\" />;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LeadingText.js","sourceRoot":"","sources":["../../../../src/core-react/text/LeadingText.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,WAAW,CAAC,KAAgB;IAC1C,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,qBAAqB,GAAG,CAAC;AACvE,CAAC;AAFD,kCAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled leading text React functional component\r\n * @public\r\n * @deprecated in 3.0. Use Leading in itwinui-react instead\r\n */\r\nexport function LeadingText(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-leading\" />;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled leading text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use Leading in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Leading in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function LeadingText2(props: TextProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=LeadingText2.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled leading text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Leading in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Leading in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function LeadingText2(props) {
|
|
18
18
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-leading-2" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeadingText2.js","sourceRoot":"","sources":["../../../../src/core-react/text/LeadingText2.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAgB;IAC3C,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,uBAAuB,GAAG,CAAC;AACzE,CAAC;AAFD,oCAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled leading text React functional component\r\n * @public\r\n * @deprecated Use Leading in itwinui-react instead\r\n */\r\nexport function LeadingText2(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-leading-2\" />;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LeadingText2.js","sourceRoot":"","sources":["../../../../src/core-react/text/LeadingText2.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAgB;IAC3C,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,uBAAuB,GAAG,CAAC;AACzE,CAAC;AAFD,oCAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled leading text React functional component\r\n * @public\r\n * @deprecated in 3.0. Use Leading in itwinui-react instead\r\n */\r\nexport function LeadingText2(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-leading-2\" />;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled small text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use Small in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Small in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function SmallText(props: TextProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=SmallText.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled small text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Small in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Small in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function SmallText(props) {
|
|
18
18
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-small" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmallText.js","sourceRoot":"","sources":["../../../../src/core-react/text/SmallText.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,SAAS,CAAC,KAAgB;IACxC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAFD,8BAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled small text React functional component\r\n * @public\r\n * @deprecated Use Small in itwinui-react instead\r\n */\r\nexport function SmallText(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-small\" />;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"SmallText.js","sourceRoot":"","sources":["../../../../src/core-react/text/SmallText.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,SAAS,CAAC,KAAgB;IACxC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAFD,8BAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled small text React functional component\r\n * @public\r\n * @deprecated in 3.0. Use Small in itwinui-react instead\r\n */\r\nexport function SmallText(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-small\" />;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled subheading text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use Subheading in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Subheading in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function Subheading(props: TextProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=Subheading.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled subheading text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Subheading in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Subheading in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function Subheading(props) {
|
|
18
18
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-subheading" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subheading.js","sourceRoot":"","sources":["../../../../src/core-react/text/Subheading.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,UAAU,CAAC,KAAgB;IACzC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,wBAAwB,GAAG,CAAC;AAC1E,CAAC;AAFD,gCAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled subheading text React functional component\r\n * @public\r\n * @deprecated Use Subheading in itwinui-react instead\r\n */\r\nexport function Subheading(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-subheading\" />;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Subheading.js","sourceRoot":"","sources":["../../../../src/core-react/text/Subheading.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,UAAU,CAAC,KAAgB;IACzC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,wBAAwB,GAAG,CAAC;AAC1E,CAAC;AAFD,gCAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled subheading text React functional component\r\n * @public\r\n * @deprecated in 3.0. Use Subheading in itwinui-react instead\r\n */\r\nexport function Subheading(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-subheading\" />;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled subheading text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use Subheading in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Subheading in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function Subheading2(props: TextProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=Subheading2.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled subheading text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Subheading in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Subheading in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function Subheading2(props) {
|
|
18
18
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-subheading-2" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subheading2.js","sourceRoot":"","sources":["../../../../src/core-react/text/Subheading2.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;IAGI;AACJ,SAAgB,WAAW,CAAC,KAAgB;IAC1C,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,0BAA0B,GAAG,CAAC;AAC5E,CAAC;AAFD,kCAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled subheading text React functional component\r\n * @public\r\n * @deprecated Use Subheading in itwinui-react instead\r\n */\r\nexport function Subheading2(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-subheading-2\" />;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Subheading2.js","sourceRoot":"","sources":["../../../../src/core-react/text/Subheading2.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;IAGI;AACJ,SAAgB,WAAW,CAAC,KAAgB;IAC1C,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,0BAA0B,GAAG,CAAC;AAC5E,CAAC;AAFD,kCAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled subheading text React functional component\r\n * @public\r\n * @deprecated in 3.0. Use Subheading in itwinui-react instead\r\n */\r\nexport function Subheading2(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-subheading-2\" />;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled title text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use Title in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Title in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function Title(props: TextProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled title text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Title in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Title in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function Title(props) {
|
|
18
18
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-title" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.js","sourceRoot":"","sources":["../../../../src/core-react/text/Title.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,KAAK,CAAC,KAAgB;IACpC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAFD,sBAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled title text React functional component\r\n * @public\r\n * @deprecated Use Title in itwinui-react instead\r\n */\r\nexport function Title(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-title\" />;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Title.js","sourceRoot":"","sources":["../../../../src/core-react/text/Title.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,KAAK,CAAC,KAAgB;IACpC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAFD,sBAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled title text React functional component\r\n * @public\r\n * @deprecated in 3.0. Use Title in itwinui-react instead\r\n */\r\nexport function Title(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-title\" />;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled title text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated Use Title in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Title in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function Title2(props: TextProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=Title2.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled title text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated Use Title in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Title in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function Title2(props) {
|
|
18
18
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-title-2" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title2.js","sourceRoot":"","sources":["../../../../src/core-react/text/Title2.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,MAAM,CAAC,KAAgB;IACrC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,qBAAqB,GAAG,CAAC;AACvE,CAAC;AAFD,wBAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled title text React functional component\r\n * @public\r\n * @deprecated Use Title in itwinui-react instead\r\n */\r\nexport function Title2(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-title-2\" />;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Title2.js","sourceRoot":"","sources":["../../../../src/core-react/text/Title2.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,SAAgB,MAAM,CAAC,KAAgB;IACrC,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,qBAAqB,GAAG,CAAC;AACvE,CAAC;AAFD,wBAEC","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 Text\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StyledText } from \"./StyledText\";\r\nimport { TextProps } from \"./TextProps\";\r\n\r\n/** Styled title text React functional component\r\n * @public\r\n * @deprecated in 3.0. Use Title in itwinui-react instead\r\n */\r\nexport function Title2(props: TextProps) {\r\n return <StyledText {...props} mainClassName=\"uicore-text-title-2\" />;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TileProps } from "./Tile";
|
|
6
6
|
/** Featured [[Tile]] component
|
|
7
7
|
* @beta
|
|
8
|
-
* @deprecated Use Tile in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Tile in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function FeaturedTile(props: TileProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=FeaturedTile.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const Tile_1 = require("./Tile");
|
|
13
13
|
/** Featured [[Tile]] component
|
|
14
14
|
* @beta
|
|
15
|
-
* @deprecated Use Tile in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Tile in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function FeaturedTile(props) {
|
|
18
18
|
return React.createElement(Tile_1.Tile, { ...props, featured: true }); // eslint-disable-line deprecation/deprecation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeaturedTile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/FeaturedTile.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,iCAAyC;AAEzC;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAgB;IAC3C,OAAO,oBAAC,WAAI,OAAK,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAI,CAAC,CAAC,8CAA8C;AAC5F,CAAC;AAFD,oCAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tile, TileProps } from \"./Tile\";\r\n\r\n/** Featured [[Tile]] component\r\n * @beta\r\n * @deprecated Use Tile in itwinui-react instead\r\n */\r\nexport function FeaturedTile(props: TileProps) { // eslint-disable-line deprecation/deprecation\r\n return <Tile {...props} featured={true} />; // eslint-disable-line deprecation/deprecation\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"FeaturedTile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/FeaturedTile.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,iCAAyC;AAEzC;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAgB;IAC3C,OAAO,oBAAC,WAAI,OAAK,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAI,CAAC,CAAC,8CAA8C;AAC5F,CAAC;AAFD,oCAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tile, TileProps } from \"./Tile\";\r\n\r\n/** Featured [[Tile]] component\r\n * @beta\r\n * @deprecated in 3.0. Use Tile in itwinui-react instead\r\n */\r\nexport function FeaturedTile(props: TileProps) { // eslint-disable-line deprecation/deprecation\r\n return <Tile {...props} featured={true} />; // eslint-disable-line deprecation/deprecation\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TileProps } from "./Tile";
|
|
6
6
|
/** Minimal and Featured [[Tile]] component
|
|
7
7
|
* @beta
|
|
8
|
-
* @deprecated Use Tile in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Tile in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function MinimalFeaturedTile(props: TileProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=MinimalFeaturedTile.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const Tile_1 = require("./Tile");
|
|
13
13
|
/** Minimal and Featured [[Tile]] component
|
|
14
14
|
* @beta
|
|
15
|
-
* @deprecated Use Tile in itwinui-react instead
|
|
15
|
+
* @deprecated in 3.0. Use Tile in itwinui-react instead
|
|
16
16
|
*/
|
|
17
17
|
function MinimalFeaturedTile(props) {
|
|
18
18
|
return React.createElement(Tile_1.Tile, { ...props, minimal: true, featured: true }); // eslint-disable-line deprecation/deprecation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinimalFeaturedTile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/MinimalFeaturedTile.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,iCAAyC;AAEzC;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,KAAgB;IAClD,OAAO,oBAAC,WAAI,OAAK,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAI,CAAC,CAAE,8CAA8C;AAC5G,CAAC;AAFD,kDAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tile, TileProps } from \"./Tile\";\r\n\r\n/** Minimal and Featured [[Tile]] component\r\n * @beta\r\n * @deprecated Use Tile in itwinui-react instead\r\n */\r\nexport function MinimalFeaturedTile(props: TileProps) { // eslint-disable-line deprecation/deprecation\r\n return <Tile {...props} minimal={true} featured={true} />; // eslint-disable-line deprecation/deprecation\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"MinimalFeaturedTile.js","sourceRoot":"","sources":["../../../../src/core-react/tiles/MinimalFeaturedTile.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,iCAAyC;AAEzC;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,KAAgB;IAClD,OAAO,oBAAC,WAAI,OAAK,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAI,CAAC,CAAE,8CAA8C;AAC5G,CAAC;AAFD,kDAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Tile, TileProps } from \"./Tile\";\r\n\r\n/** Minimal and Featured [[Tile]] component\r\n * @beta\r\n * @deprecated in 3.0. Use Tile in itwinui-react instead\r\n */\r\nexport function MinimalFeaturedTile(props: TileProps) { // eslint-disable-line deprecation/deprecation\r\n return <Tile {...props} minimal={true} featured={true} />; // eslint-disable-line deprecation/deprecation\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { TileProps } from "./Tile";
|
|
6
6
|
/** Minimal [[Tile]] component
|
|
7
7
|
* @beta
|
|
8
|
-
* @deprecated Use Tile in itwinui-react instead
|
|
8
|
+
* @deprecated in 3.0. Use Tile in itwinui-react instead
|
|
9
9
|
*/
|
|
10
10
|
export declare function MinimalTile(props: TileProps): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=MinimalTile.d.ts.map
|