@itwin/imodel-components-react 4.0.0-dev.15 → 4.0.0-dev.16
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/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +2 -2
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +63 -63
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -62
- package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.scss +61 -61
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +35 -35
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -22
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +0 -21
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +1 -25
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -28
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -105
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -359
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
- package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +177 -177
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +0 -29
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/cjs/imodel-components-react.d.ts +0 -1
- package/lib/cjs/imodel-components-react.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react.js +0 -1
- package/lib/cjs/imodel-components-react.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +2 -2
- package/lib/esm/imodel-components-react/color/AlphaSlider.js +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -62
- package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
- package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
- package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.scss +22 -22
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
- package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
- package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
- package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +0 -21
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +0 -24
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -28
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -105
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -359
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
- package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +177 -177
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +0 -29
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react.d.ts +0 -1
- package/lib/esm/imodel-components-react.d.ts.map +1 -1
- package/lib/esm/imodel-components-react.js +0 -1
- package/lib/esm/imodel-components-react.js.map +1 -1
- package/lib/public/locales/en/UiIModelComponents.json +139 -139
- package/package.json +5 -5
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +0 -150
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +0 -94
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +0 -123
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +0 -94
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imodel-components-react.js","sourceRoot":"","sources":["../../src/imodel-components-react.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,qEAAqE;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAElF,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC;AAClE,cAAc,mDAAmD,CAAC;AAClE,cAAc,kDAAkD,CAAC;AACjE,cAAc,
|
|
1
|
+
{"version":3,"file":"imodel-components-react.js","sourceRoot":"","sources":["../../src/imodel-components-react.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,qEAAqE;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAElF,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC;AAClE,cAAc,mDAAmD,CAAC;AAClE,cAAc,kDAAkD,CAAC;AACjE,cAAc,oDAAoD,CAAC;AACnE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC;AACjE,cAAc,wCAAwC,CAAC;AAEvD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAE/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AAErE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yDAAyD,CAAC;AAExE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4DAA4D,CAAC;AAC3E,cAAc,+DAA+D,CAAC;AAE9E,cAAc,sDAAsD,CAAC;AACrE,cAAc,0DAA0D,CAAC;AACzE,cAAc,uDAAuD,CAAC;AACtE,cAAc,qDAAqD,CAAC;AACpE,cAAc,0DAA0D,CAAC;AACzE,cAAc,sDAAsD,CAAC;AACrE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,8DAA8D,CAAC;AAE7E,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,sDAAsD,CAAC;AACrE,cAAc,kDAAkD,CAAC;AACjE,cAAc,0DAA0D,CAAC;AAEzE,cAAc,sDAAsD,CAAC;AACrE,cAAc,4DAA4D,CAAC;AAE3E;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n// cSpell:ignore iconpicker lineweight hocs datepicker quantityformat\n\nexport { UiIModelComponents } from \"./imodel-components-react/UiIModelComponents\";\n\nexport * from \"./imodel-components-react/color/AlphaSlider\";\nexport * from \"./imodel-components-react/color/ColorPickerButton\";\nexport * from \"./imodel-components-react/color/ColorPickerDialog\";\nexport * from \"./imodel-components-react/color/ColorPickerPopup\";\nexport * from \"./imodel-components-react/color/getCSSColorFromDef\";\nexport * from \"./imodel-components-react/color/HueSlider\";\nexport * from \"./imodel-components-react/color/SaturationPicker\";\nexport * from \"./imodel-components-react/color/Swatch\";\n\nexport * from \"./imodel-components-react/editors/ColorEditor\";\nexport * from \"./imodel-components-react/editors/WeightEditor\";\n\nexport * from \"./imodel-components-react/inputs/QuantityInput\";\nexport * from \"./imodel-components-react/inputs/QuantityNumberInput\";\n\nexport * from \"./imodel-components-react/lineweight/Swatch\";\nexport * from \"./imodel-components-react/lineweight/WeightPickerButton\";\n\nexport * from \"./imodel-components-react/navigationaids/Cube\";\nexport * from \"./imodel-components-react/navigationaids/CubeNavigationAid\";\nexport * from \"./imodel-components-react/navigationaids/DrawingNavigationAid\";\n\nexport * from \"./imodel-components-react/quantityformat/FormatPanel\";\nexport * from \"./imodel-components-react/quantityformat/FormatPrecision\";\nexport * from \"./imodel-components-react/quantityformat/FormatSample\";\nexport * from \"./imodel-components-react/quantityformat/FormatType\";\nexport * from \"./imodel-components-react/quantityformat/FormatUnitLabel\";\nexport * from \"./imodel-components-react/quantityformat/FormatUnits\";\nexport * from \"./imodel-components-react/quantityformat/MiscFormatOptions\";\nexport * from \"./imodel-components-react/quantityformat/QuantityFormatPanel\";\n\nexport * from \"./imodel-components-react/timeline/interfaces\";\nexport * from \"./imodel-components-react/timeline/BaseTimelineDataProvider\";\nexport * from \"./imodel-components-react/timeline/InlineEdit\";\nexport * from \"./imodel-components-react/timeline/PlayerButton\";\nexport * from \"./imodel-components-react/timeline/Scrubber\";\nexport * from \"./imodel-components-react/timeline/TimelineComponent\";\nexport * from \"./imodel-components-react/timeline/SolarTimeline\";\nexport * from \"./imodel-components-react/timeline/BaseSolarDataProvider\";\n\nexport * from \"./imodel-components-react/viewport/ViewportComponent\";\nexport * from \"./imodel-components-react/viewport/ViewportComponentEvents\";\n\n/** @docs-package-description\n * The imodel-components-react package contains React components that depend on the core-frontend, core-common or core-quantity packages.\n * The components pertain to Color, Cube, LineWeight, Navigation Aids, Quantity Inputs, Timeline and Viewport.\n * For more information, see [learning about imodel-components-react]($docs/learning/ui/imodel-components/index.md).\n */\n/**\n * @docs-group-description Color\n * Classes and components for working with and picking a Color.\n */\n/**\n * @docs-group-description Common\n * Common classes used across various UI components.\n */\n/**\n * @docs-group-description Cube\n * Component for 3D Cube.\n */\n/**\n * @docs-group-description Inputs\n * Input Components that format and parse input for IModelApps.\n */\n/**\n * @docs-group-description LineWeight\n * Classes and components for working with and picking a Line Weight.\n */\n/**\n * @docs-group-description NavigationAids\n * Classes and components for working with Navigation Aids.\n */\n/**\n * @docs-group-description PropertyEditors\n * Classes and components for working with Property Editors.\n */\n/**\n * @docs-group-description QuantityFormat\n * Classes and components for working with a Quantity Formats.\n */\n/**\n * @docs-group-description Timeline\n * Classes and components that provide a timeline\n */\n/**\n * @docs-group-description Viewport\n * Classes and components for working with a Viewport.\n */\n"]}
|
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
{
|
|
2
|
-
"timeline": {
|
|
3
|
-
"expand": "Expand",
|
|
4
|
-
"minimize": "Minimize",
|
|
5
|
-
"repeat": "Repeat",
|
|
6
|
-
"slow": "Speed: slow",
|
|
7
|
-
"medium": "Speed: medium",
|
|
8
|
-
"fast": "Speed: fast",
|
|
9
|
-
"play": "Play",
|
|
10
|
-
"pause": "Pause",
|
|
11
|
-
"backward": "Backward",
|
|
12
|
-
"forward": "Forward",
|
|
13
|
-
"step": "Step"
|
|
14
|
-
},
|
|
15
|
-
"solartimeline": {
|
|
16
|
-
"play": "Play",
|
|
17
|
-
"settings": "Settings",
|
|
18
|
-
"speed": "Speed",
|
|
19
|
-
"dateTime": "Set Date/Time"
|
|
20
|
-
},
|
|
21
|
-
"solarsettings": {
|
|
22
|
-
"shadowcolor": "Shadow Color"
|
|
23
|
-
},
|
|
24
|
-
"errors": {
|
|
25
|
-
"unable-to-parse-quantity": "Unable to parse string into quantity"
|
|
26
|
-
},
|
|
27
|
-
"cube": {
|
|
28
|
-
"front": "Front",
|
|
29
|
-
"back": "Back",
|
|
30
|
-
"top": "Top",
|
|
31
|
-
"bottom": "Bottom",
|
|
32
|
-
"left": "Left",
|
|
33
|
-
"right": "Right"
|
|
34
|
-
},
|
|
35
|
-
"drawing": {
|
|
36
|
-
"unrotate": "Un-Rotate",
|
|
37
|
-
"rotateStyle": "Toggle background-rotate"
|
|
38
|
-
},
|
|
39
|
-
"color": {
|
|
40
|
-
"close": "Close",
|
|
41
|
-
"hue": "Hue",
|
|
42
|
-
"saturation": "Saturation",
|
|
43
|
-
"toggleColorPopup": "Toggle Color Picker Popup",
|
|
44
|
-
"transparency": "Transparency"
|
|
45
|
-
},
|
|
46
|
-
"QuantityInput": {
|
|
47
|
-
"ParseError": "Parse Error, status=",
|
|
48
|
-
"NoParserDefined": "No Parser Defined!"
|
|
49
|
-
},
|
|
50
|
-
"QuantityFormat": {
|
|
51
|
-
"none": "None",
|
|
52
|
-
"dash": "Dash",
|
|
53
|
-
"space": "Space",
|
|
54
|
-
"decimal": "Decimal",
|
|
55
|
-
"scientific": "Scientific",
|
|
56
|
-
"station": "Station",
|
|
57
|
-
"fractional": "Fractional",
|
|
58
|
-
"labels": {
|
|
59
|
-
"compositeSpacer": "Composite Spacer",
|
|
60
|
-
"formatted": "Formatted",
|
|
61
|
-
"precision": "Precision",
|
|
62
|
-
"type": "Type",
|
|
63
|
-
"appendUnitLabel": "Append Unit Label",
|
|
64
|
-
"labelSeparator": "Label Separator",
|
|
65
|
-
"signOptionLabel": "Sign Option",
|
|
66
|
-
"stationOffsetLabel": "Station Offset",
|
|
67
|
-
"stationSeparatorLabel": "Station Separator",
|
|
68
|
-
"decimalSeparatorLabel": "Decimal Separator",
|
|
69
|
-
"showTrailZerosLabel": "Show Trail Zeros",
|
|
70
|
-
"keepSingleZeroLabel": "Keep Single Zero",
|
|
71
|
-
"zeroEmptyLabel": "Zero Empty",
|
|
72
|
-
"moreLabel": "More",
|
|
73
|
-
"lessLabel": "Less",
|
|
74
|
-
"keepDecimalPointLabel": "Keep Decimal Point",
|
|
75
|
-
"fractionDashLabel": "Fraction Dash",
|
|
76
|
-
"scientificTypeLabel": "Scientific Type",
|
|
77
|
-
"useThousandSeparatorLabel": "Use Thousand Separator",
|
|
78
|
-
"thousandSeparatorLabel": "Thousand Separator",
|
|
79
|
-
"value": "Value"
|
|
80
|
-
},
|
|
81
|
-
"fraction_precision": {
|
|
82
|
-
"whole": "Whole",
|
|
83
|
-
"half": "1/2",
|
|
84
|
-
"quarter": "1/4",
|
|
85
|
-
"eighth": "1/8",
|
|
86
|
-
"sixteenth": "1/16",
|
|
87
|
-
"over32": "1/32",
|
|
88
|
-
"over64": "1/64",
|
|
89
|
-
"over128": "1/128",
|
|
90
|
-
"over256": "1/256"
|
|
91
|
-
},
|
|
92
|
-
"station_size": {
|
|
93
|
-
"two": "0+00",
|
|
94
|
-
"three": "0+000"
|
|
95
|
-
},
|
|
96
|
-
"station_separator": {
|
|
97
|
-
"plus": "+",
|
|
98
|
-
"minus": "-",
|
|
99
|
-
"blank": "Blank",
|
|
100
|
-
"caret": "^"
|
|
101
|
-
},
|
|
102
|
-
"decimal_precision": {
|
|
103
|
-
"zero": "1",
|
|
104
|
-
"one": "0.1",
|
|
105
|
-
"two": "0.01",
|
|
106
|
-
"three": "0.001",
|
|
107
|
-
"four": "0.0001",
|
|
108
|
-
"five": "0.00001",
|
|
109
|
-
"six": "0.0000001",
|
|
110
|
-
"seven": "0.0000001",
|
|
111
|
-
"eight": "0.00000001",
|
|
112
|
-
"nine": "0.000000001",
|
|
113
|
-
"ten": "0.0000000001",
|
|
114
|
-
"eleven": "0.00000000001",
|
|
115
|
-
"twelve": "0.000000000001"
|
|
116
|
-
},
|
|
117
|
-
"sign_option": {
|
|
118
|
-
"noSign": "No Sign",
|
|
119
|
-
"onlyNegative": "Only Negative",
|
|
120
|
-
"signAlways": "Always",
|
|
121
|
-
"negativeParentheses": "Negative Parentheses"
|
|
122
|
-
},
|
|
123
|
-
"thousand_separator": {
|
|
124
|
-
"comma": "Comma",
|
|
125
|
-
"point": "Point"
|
|
126
|
-
},
|
|
127
|
-
"decimal_separator": {
|
|
128
|
-
"comma": "Comma",
|
|
129
|
-
"point": "Point"
|
|
130
|
-
},
|
|
131
|
-
"scientific-type": {
|
|
132
|
-
"normalized": "Normalized",
|
|
133
|
-
"zero-normalized": "Zero Normalized"
|
|
134
|
-
},
|
|
135
|
-
"popupButton": {
|
|
136
|
-
"setFormat": "Set Format"
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"timeline": {
|
|
3
|
+
"expand": "Expand",
|
|
4
|
+
"minimize": "Minimize",
|
|
5
|
+
"repeat": "Repeat",
|
|
6
|
+
"slow": "Speed: slow",
|
|
7
|
+
"medium": "Speed: medium",
|
|
8
|
+
"fast": "Speed: fast",
|
|
9
|
+
"play": "Play",
|
|
10
|
+
"pause": "Pause",
|
|
11
|
+
"backward": "Backward",
|
|
12
|
+
"forward": "Forward",
|
|
13
|
+
"step": "Step"
|
|
14
|
+
},
|
|
15
|
+
"solartimeline": {
|
|
16
|
+
"play": "Play",
|
|
17
|
+
"settings": "Settings",
|
|
18
|
+
"speed": "Speed",
|
|
19
|
+
"dateTime": "Set Date/Time"
|
|
20
|
+
},
|
|
21
|
+
"solarsettings": {
|
|
22
|
+
"shadowcolor": "Shadow Color"
|
|
23
|
+
},
|
|
24
|
+
"errors": {
|
|
25
|
+
"unable-to-parse-quantity": "Unable to parse string into quantity"
|
|
26
|
+
},
|
|
27
|
+
"cube": {
|
|
28
|
+
"front": "Front",
|
|
29
|
+
"back": "Back",
|
|
30
|
+
"top": "Top",
|
|
31
|
+
"bottom": "Bottom",
|
|
32
|
+
"left": "Left",
|
|
33
|
+
"right": "Right"
|
|
34
|
+
},
|
|
35
|
+
"drawing": {
|
|
36
|
+
"unrotate": "Un-Rotate",
|
|
37
|
+
"rotateStyle": "Toggle background-rotate"
|
|
38
|
+
},
|
|
39
|
+
"color": {
|
|
40
|
+
"close": "Close",
|
|
41
|
+
"hue": "Hue",
|
|
42
|
+
"saturation": "Saturation",
|
|
43
|
+
"toggleColorPopup": "Toggle Color Picker Popup",
|
|
44
|
+
"transparency": "Transparency"
|
|
45
|
+
},
|
|
46
|
+
"QuantityInput": {
|
|
47
|
+
"ParseError": "Parse Error, status=",
|
|
48
|
+
"NoParserDefined": "No Parser Defined!"
|
|
49
|
+
},
|
|
50
|
+
"QuantityFormat": {
|
|
51
|
+
"none": "None",
|
|
52
|
+
"dash": "Dash",
|
|
53
|
+
"space": "Space",
|
|
54
|
+
"decimal": "Decimal",
|
|
55
|
+
"scientific": "Scientific",
|
|
56
|
+
"station": "Station",
|
|
57
|
+
"fractional": "Fractional",
|
|
58
|
+
"labels": {
|
|
59
|
+
"compositeSpacer": "Composite Spacer",
|
|
60
|
+
"formatted": "Formatted",
|
|
61
|
+
"precision": "Precision",
|
|
62
|
+
"type": "Type",
|
|
63
|
+
"appendUnitLabel": "Append Unit Label",
|
|
64
|
+
"labelSeparator": "Label Separator",
|
|
65
|
+
"signOptionLabel": "Sign Option",
|
|
66
|
+
"stationOffsetLabel": "Station Offset",
|
|
67
|
+
"stationSeparatorLabel": "Station Separator",
|
|
68
|
+
"decimalSeparatorLabel": "Decimal Separator",
|
|
69
|
+
"showTrailZerosLabel": "Show Trail Zeros",
|
|
70
|
+
"keepSingleZeroLabel": "Keep Single Zero",
|
|
71
|
+
"zeroEmptyLabel": "Zero Empty",
|
|
72
|
+
"moreLabel": "More",
|
|
73
|
+
"lessLabel": "Less",
|
|
74
|
+
"keepDecimalPointLabel": "Keep Decimal Point",
|
|
75
|
+
"fractionDashLabel": "Fraction Dash",
|
|
76
|
+
"scientificTypeLabel": "Scientific Type",
|
|
77
|
+
"useThousandSeparatorLabel": "Use Thousand Separator",
|
|
78
|
+
"thousandSeparatorLabel": "Thousand Separator",
|
|
79
|
+
"value": "Value"
|
|
80
|
+
},
|
|
81
|
+
"fraction_precision": {
|
|
82
|
+
"whole": "Whole",
|
|
83
|
+
"half": "1/2",
|
|
84
|
+
"quarter": "1/4",
|
|
85
|
+
"eighth": "1/8",
|
|
86
|
+
"sixteenth": "1/16",
|
|
87
|
+
"over32": "1/32",
|
|
88
|
+
"over64": "1/64",
|
|
89
|
+
"over128": "1/128",
|
|
90
|
+
"over256": "1/256"
|
|
91
|
+
},
|
|
92
|
+
"station_size": {
|
|
93
|
+
"two": "0+00",
|
|
94
|
+
"three": "0+000"
|
|
95
|
+
},
|
|
96
|
+
"station_separator": {
|
|
97
|
+
"plus": "+",
|
|
98
|
+
"minus": "-",
|
|
99
|
+
"blank": "Blank",
|
|
100
|
+
"caret": "^"
|
|
101
|
+
},
|
|
102
|
+
"decimal_precision": {
|
|
103
|
+
"zero": "1",
|
|
104
|
+
"one": "0.1",
|
|
105
|
+
"two": "0.01",
|
|
106
|
+
"three": "0.001",
|
|
107
|
+
"four": "0.0001",
|
|
108
|
+
"five": "0.00001",
|
|
109
|
+
"six": "0.0000001",
|
|
110
|
+
"seven": "0.0000001",
|
|
111
|
+
"eight": "0.00000001",
|
|
112
|
+
"nine": "0.000000001",
|
|
113
|
+
"ten": "0.0000000001",
|
|
114
|
+
"eleven": "0.00000000001",
|
|
115
|
+
"twelve": "0.000000000001"
|
|
116
|
+
},
|
|
117
|
+
"sign_option": {
|
|
118
|
+
"noSign": "No Sign",
|
|
119
|
+
"onlyNegative": "Only Negative",
|
|
120
|
+
"signAlways": "Always",
|
|
121
|
+
"negativeParentheses": "Negative Parentheses"
|
|
122
|
+
},
|
|
123
|
+
"thousand_separator": {
|
|
124
|
+
"comma": "Comma",
|
|
125
|
+
"point": "Point"
|
|
126
|
+
},
|
|
127
|
+
"decimal_separator": {
|
|
128
|
+
"comma": "Comma",
|
|
129
|
+
"point": "Point"
|
|
130
|
+
},
|
|
131
|
+
"scientific-type": {
|
|
132
|
+
"normalized": "Normalized",
|
|
133
|
+
"zero-normalized": "Zero Normalized"
|
|
134
|
+
},
|
|
135
|
+
"popupButton": {
|
|
136
|
+
"setFormat": "Set Format"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/imodel-components-react",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.16",
|
|
4
4
|
"description": "iTwin.js UI IModel Components",
|
|
5
5
|
"main": "lib/cjs/imodel-components-react.js",
|
|
6
6
|
"module": "lib/esm/imodel-components-react.js",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@itwin/appui-abstract": ">=3.7.0",
|
|
26
|
-
"@itwin/components-react": "^4.0.0-dev.
|
|
26
|
+
"@itwin/components-react": "^4.0.0-dev.16",
|
|
27
27
|
"@itwin/core-bentley": ">=3.7.0",
|
|
28
28
|
"@itwin/core-common": ">=3.7.0",
|
|
29
29
|
"@itwin/core-frontend": ">=3.7.0",
|
|
30
30
|
"@itwin/core-geometry": ">=3.7.0",
|
|
31
31
|
"@itwin/core-quantity": ">=3.7.0",
|
|
32
|
-
"@itwin/core-react": "^4.0.0-dev.
|
|
32
|
+
"@itwin/core-react": "^4.0.0-dev.16",
|
|
33
33
|
"react": "^17.0.0 || ^18.0.0",
|
|
34
34
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
35
35
|
},
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@itwin/appui-abstract": "^3.7.0",
|
|
42
42
|
"@itwin/build-tools": "^3.7.0",
|
|
43
|
-
"@itwin/components-react": "4.0.0-dev.
|
|
43
|
+
"@itwin/components-react": "4.0.0-dev.16",
|
|
44
44
|
"@itwin/core-bentley": "^3.7.0",
|
|
45
45
|
"@itwin/core-common": "^3.7.0",
|
|
46
46
|
"@itwin/core-frontend": "^3.7.0",
|
|
47
47
|
"@itwin/core-geometry": "^3.7.0",
|
|
48
48
|
"@itwin/core-orbitgt": "^3.7.0",
|
|
49
49
|
"@itwin/core-quantity": "^3.7.0",
|
|
50
|
-
"@itwin/core-react": "4.0.0-dev.
|
|
50
|
+
"@itwin/core-react": "4.0.0-dev.16",
|
|
51
51
|
"@itwin/eslint-plugin": "^3.7.0",
|
|
52
52
|
"@itwin/webgl-compatibility": "^3.7.0",
|
|
53
53
|
"@testing-library/dom": "^8.11.2",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Color
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="react" />
|
|
5
|
-
import { ColorDef } from "@itwin/core-common";
|
|
6
|
-
import "./ColorPickerPanel.scss";
|
|
7
|
-
/** Properties for the [[ColorPickerPanel]] React component
|
|
8
|
-
* @public @deprecated in 3.0. Use `ColorPicker` for itwinui-react
|
|
9
|
-
*/
|
|
10
|
-
export interface ColorPickerPanelProps {
|
|
11
|
-
activeColor: ColorDef;
|
|
12
|
-
onColorChange: (selectedColor: ColorDef) => void;
|
|
13
|
-
colorPresets?: ColorDef[];
|
|
14
|
-
/** If set show either HSL or RGB input values. If undefined no input value is shown */
|
|
15
|
-
colorInputType?: "HSL" | "RGB";
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Color Picker Dialog to use as modal dialog.
|
|
19
|
-
* @public @deprecated in 3.0. Use `ColorPicker` for itwinui-react
|
|
20
|
-
*/
|
|
21
|
-
export declare function ColorPickerPanel({ activeColor, onColorChange, colorPresets, colorInputType }: ColorPickerPanelProps): JSX.Element;
|
|
22
|
-
//# sourceMappingURL=ColorPickerPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerPanel.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/color/ColorPickerPanel.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAKH,OAAO,EAAE,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAIxD,OAAO,yBAAyB,CAAC;AAGjC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,QAAQ,CAAC;IACtB,aAAa,EAAE,CAAC,aAAa,EAAE,QAAQ,KAAK,IAAI,CAAC;IACjD,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC1B,uFAAuF;IACvF,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CAChC;AAED;;;GAGG;AAEH,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,qBAAqB,eAsInH"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module Color
|
|
8
|
-
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
-
}
|
|
15
|
-
Object.defineProperty(o, k2, desc);
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.ColorPickerPanel = void 0;
|
|
34
|
-
// cSpell:ignore colorpicker
|
|
35
|
-
const React = __importStar(require("react"));
|
|
36
|
-
const core_common_1 = require("@itwin/core-common");
|
|
37
|
-
const Swatch_1 = require("./Swatch");
|
|
38
|
-
const HueSlider_1 = require("./HueSlider");
|
|
39
|
-
const SaturationPicker_1 = require("./SaturationPicker");
|
|
40
|
-
require("./ColorPickerPanel.scss");
|
|
41
|
-
const core_react_1 = require("@itwin/core-react");
|
|
42
|
-
/**
|
|
43
|
-
* Color Picker Dialog to use as modal dialog.
|
|
44
|
-
* @public @deprecated in 3.0. Use `ColorPicker` for itwinui-react
|
|
45
|
-
*/
|
|
46
|
-
// istanbul ignore next
|
|
47
|
-
function ColorPickerPanel({ activeColor, onColorChange, colorPresets, colorInputType }) {
|
|
48
|
-
const handlePresetColorPick = React.useCallback((newColor, e) => {
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
if (onColorChange) {
|
|
51
|
-
onColorChange(newColor);
|
|
52
|
-
}
|
|
53
|
-
}, [onColorChange]);
|
|
54
|
-
const handleHueChange = React.useCallback((newHsvColor) => {
|
|
55
|
-
// for a ColorDef to be created from hsv s can't be 0
|
|
56
|
-
if (newHsvColor.s === 0) {
|
|
57
|
-
newHsvColor = newHsvColor.clone(undefined, 0.5);
|
|
58
|
-
}
|
|
59
|
-
const newColorDef = newHsvColor.toColorDef();
|
|
60
|
-
if (onColorChange) {
|
|
61
|
-
onColorChange(newColorDef);
|
|
62
|
-
}
|
|
63
|
-
}, [onColorChange]);
|
|
64
|
-
const handleSaturationChange = React.useCallback((newHsvColor) => {
|
|
65
|
-
const newColorDef = newHsvColor.toColorDef();
|
|
66
|
-
if (onColorChange) {
|
|
67
|
-
onColorChange(newColorDef);
|
|
68
|
-
}
|
|
69
|
-
}, [onColorChange]);
|
|
70
|
-
const currentHsl = React.useMemo(() => activeColor.toHSL(), [activeColor]);
|
|
71
|
-
const currentHsv = React.useMemo(() => activeColor.toHSV(), [activeColor]);
|
|
72
|
-
const color = React.useMemo(() => activeColor.colors, [activeColor]);
|
|
73
|
-
const handleLightnessValueChange = React.useCallback((value, _stringValue) => {
|
|
74
|
-
const newHsl = currentHsl.clone(undefined, undefined, (value ?? 0) / 100);
|
|
75
|
-
if (onColorChange) {
|
|
76
|
-
const newColorDef = newHsl.toColorDef();
|
|
77
|
-
onColorChange(newColorDef);
|
|
78
|
-
}
|
|
79
|
-
}, [currentHsl, onColorChange]);
|
|
80
|
-
const handleHueValueChange = React.useCallback((value, _stringValue) => {
|
|
81
|
-
const newHsl = currentHsl.clone((value ?? 0) / 360, undefined, undefined);
|
|
82
|
-
if (onColorChange) {
|
|
83
|
-
const newColorDef = newHsl.toColorDef();
|
|
84
|
-
onColorChange(newColorDef);
|
|
85
|
-
}
|
|
86
|
-
}, [currentHsl, onColorChange]);
|
|
87
|
-
const handleSaturationValueChange = React.useCallback((value, _stringValue) => {
|
|
88
|
-
const newHsl = currentHsl.clone(undefined, (value ?? 0) / 100, undefined);
|
|
89
|
-
if (onColorChange) {
|
|
90
|
-
const newColorDef = newHsl.toColorDef();
|
|
91
|
-
onColorChange(newColorDef);
|
|
92
|
-
}
|
|
93
|
-
}, [currentHsl, onColorChange]);
|
|
94
|
-
const handleRedChange = React.useCallback((value, _stringValue) => {
|
|
95
|
-
if (undefined !== value) {
|
|
96
|
-
const newColorDef = core_common_1.ColorDef.from(value, color.g, color.b);
|
|
97
|
-
if (onColorChange) {
|
|
98
|
-
onColorChange(newColorDef);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}, [color, onColorChange]);
|
|
102
|
-
const handleGreenChange = React.useCallback((value, _stringValue) => {
|
|
103
|
-
if (undefined !== value) {
|
|
104
|
-
const newColorDef = core_common_1.ColorDef.from(color.r, value, color.b);
|
|
105
|
-
if (onColorChange) {
|
|
106
|
-
onColorChange(newColorDef);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}, [color, onColorChange]);
|
|
110
|
-
const handleBlueChange = React.useCallback((value, _stringValue) => {
|
|
111
|
-
if (undefined !== value) {
|
|
112
|
-
const newColorDef = core_common_1.ColorDef.from(color.r, color.g, value);
|
|
113
|
-
if (onColorChange) {
|
|
114
|
-
onColorChange(newColorDef);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}, [color, onColorChange]);
|
|
118
|
-
return (React.createElement("div", { "data-testid": "components-colorpicker-panel", className: "components-colorpicker-panel" },
|
|
119
|
-
React.createElement("div", { className: "components-colorpicker-panel-color" },
|
|
120
|
-
React.createElement("div", { className: "components-colorpicker-saturation" },
|
|
121
|
-
React.createElement(SaturationPicker_1.SaturationPicker, { hsv: currentHsv, onSaturationChange: handleSaturationChange })),
|
|
122
|
-
React.createElement("div", { className: "components-colorpicker-hue" },
|
|
123
|
-
React.createElement(HueSlider_1.HueSlider, { hsv: currentHsv, onHueChange: handleHueChange, isHorizontal: false }))),
|
|
124
|
-
(colorInputType === "RGB") &&
|
|
125
|
-
React.createElement("div", { "data-testid": "components-colorpicker-input-panel", className: "components-colorpicker-input-panel" },
|
|
126
|
-
React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
|
|
127
|
-
React.createElement("span", { className: "uicore-inputs-labeled-input" }, "R"),
|
|
128
|
-
React.createElement(core_react_1.NumberInput, { "data-testid": "components-colorpicker-input-value-red", value: color.r, onChange: handleRedChange, min: 0, max: 255 })),
|
|
129
|
-
React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
|
|
130
|
-
React.createElement("span", { className: "uicore-inputs-labeled-input" }, "G"),
|
|
131
|
-
React.createElement(core_react_1.NumberInput, { "data-testid": "components-colorpicker-input-value-green", value: color.g, onChange: handleGreenChange, min: 0, max: 255 })),
|
|
132
|
-
React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
|
|
133
|
-
React.createElement("span", { className: "uicore-inputs-labeled-input" }, "B"),
|
|
134
|
-
React.createElement(core_react_1.NumberInput, { "data-testid": "components-colorpicker-input-value-blue", value: color.b, onChange: handleBlueChange, min: 0, max: 255 }))),
|
|
135
|
-
(colorInputType === "HSL") &&
|
|
136
|
-
React.createElement("div", { "data-testid": "components-colorpicker-input-panel", className: "components-colorpicker-input-panel" },
|
|
137
|
-
React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
|
|
138
|
-
React.createElement("span", { className: "uicore-inputs-labeled-input" }, "H"),
|
|
139
|
-
React.createElement(core_react_1.NumberInput, { "data-testid": "components-colorpicker-input-value-hue", value: Math.round(currentHsl.h * 360), onChange: handleHueValueChange, min: 0, max: 360 })),
|
|
140
|
-
React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
|
|
141
|
-
React.createElement("span", { className: "uicore-inputs-labeled-input" }, "S"),
|
|
142
|
-
React.createElement(core_react_1.NumberInput, { "data-testid": "components-colorpicker-input-value-saturation", value: Math.round(currentHsl.s * 100), onChange: handleSaturationValueChange, min: 0, max: 100 })),
|
|
143
|
-
React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
|
|
144
|
-
React.createElement("span", { className: "uicore-inputs-labeled-input" }, "L"),
|
|
145
|
-
React.createElement(core_react_1.NumberInput, { "data-testid": "components-colorpicker-input-value-lightness", value: Math.round(currentHsl.l * 100), onChange: handleLightnessValueChange, min: 0, max: 100 }))),
|
|
146
|
-
colorPresets && colorPresets.length &&
|
|
147
|
-
React.createElement("div", { className: "components-colorpicker-panel-presets" }, colorPresets.map((preset, index) => React.createElement(Swatch_1.ColorSwatch, { className: "components-colorpicker-panel-swatch", key: index, colorDef: preset, round: false, onColorPick: handlePresetColorPick })))));
|
|
148
|
-
}
|
|
149
|
-
exports.ColorPickerPanel = ColorPickerPanel;
|
|
150
|
-
//# sourceMappingURL=ColorPickerPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/color/ColorPickerPanel.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4BAA4B;AAE5B,6CAA+B;AAC/B,oDAAwD;AACxD,qCAAuC;AACvC,2CAAwC;AACxC,yDAAsD;AACtD,mCAAiC;AACjC,kDAAgD;AAahD;;;GAGG;AACH,uBAAuB;AACvB,SAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAyB;IAClH,MAAM,qBAAqB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAkB,EAAE,CAAwC,EAAE,EAAE;QAC/G,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,aAAa,EAAE;YACjB,aAAa,CAAC,QAAQ,CAAC,CAAC;SACzB;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,WAAqB,EAAE,EAAE;QAClE,qDAAqD;QACrD,IAAI,WAAW,CAAC,CAAC,KAAK,CAAC,EAAE;YACvB,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;SACjD;QAED,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,aAAa,EAAE;YACjB,aAAa,CAAC,WAAW,CAAC,CAAC;SAC5B;IACH,CAAC,EAAE,CAAC,aA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AU,CAAC,CAAC,GAAG,GAAG,CAAC,EAAE,QAAQ,EAAE,0BAA0B,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,GAAI,CACrK,CACF;QAGN,YAAY,IAAI,YAAY,CAAC,MAAM;YACnC,6BAAK,SAAS,EAAC,sCAAsC,IAClD,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,oBAAC,oBAAW,IAAC,SAAS,EAAC,qCAAqC,EAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,qBAAqB,GAAI,CAAC,CACjL,CAEJ,CACP,CAAC;AACJ,CAAC;AAtID,4CAsIC","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 Color\r\n */\r\n\r\n// cSpell:ignore colorpicker\r\n\r\nimport * as React from \"react\";\r\nimport { ColorDef, HSVColor } from \"@itwin/core-common\";\r\nimport { ColorSwatch } from \"./Swatch\";\r\nimport { HueSlider } from \"./HueSlider\";\r\nimport { SaturationPicker } from \"./SaturationPicker\";\r\nimport \"./ColorPickerPanel.scss\";\r\nimport { NumberInput } from \"@itwin/core-react\";\r\n\r\n/** Properties for the [[ColorPickerPanel]] React component\r\n * @public @deprecated in 3.0. Use `ColorPicker` for itwinui-react\r\n */\r\nexport interface ColorPickerPanelProps {\r\n activeColor: ColorDef;\r\n onColorChange: (selectedColor: ColorDef) => void;\r\n colorPresets?: ColorDef[];\r\n /** If set show either HSL or RGB input values. If undefined no input value is shown */\r\n colorInputType?: \"HSL\" | \"RGB\";\r\n}\r\n\r\n/**\r\n * Color Picker Dialog to use as modal dialog.\r\n * @public @deprecated in 3.0. Use `ColorPicker` for itwinui-react\r\n */\r\n// istanbul ignore next\r\nexport function ColorPickerPanel({ activeColor, onColorChange, colorPresets, colorInputType }: ColorPickerPanelProps) { // eslint-disable-line deprecation/deprecation\r\n const handlePresetColorPick = React.useCallback((newColor: ColorDef, e: React.MouseEvent<Element, MouseEvent>) => {\r\n e.preventDefault();\r\n if (onColorChange) {\r\n onColorChange(newColor);\r\n }\r\n }, [onColorChange]);\r\n\r\n const handleHueChange = React.useCallback((newHsvColor: HSVColor) => {\r\n // for a ColorDef to be created from hsv s can't be 0\r\n if (newHsvColor.s === 0) {\r\n newHsvColor = newHsvColor.clone(undefined, 0.5);\r\n }\r\n\r\n const newColorDef = newHsvColor.toColorDef();\r\n if (onColorChange) {\r\n onColorChange(newColorDef);\r\n }\r\n }, [onColorChange]);\r\n\r\n const handleSaturationChange = React.useCallback((newHsvColor: HSVColor) => {\r\n const newColorDef = newHsvColor.toColorDef();\r\n if (onColorChange) {\r\n onColorChange(newColorDef);\r\n }\r\n }, [onColorChange]);\r\n\r\n const currentHsl = React.useMemo(() => activeColor.toHSL(), [activeColor]);\r\n const currentHsv = React.useMemo(() => activeColor.toHSV(), [activeColor]);\r\n const color = React.useMemo(() => activeColor.colors, [activeColor]);\r\n\r\n const handleLightnessValueChange = React.useCallback((value: number | undefined, _stringValue: string) => {\r\n const newHsl = currentHsl.clone(undefined, undefined, (value ?? 0) / 100);\r\n\r\n if (onColorChange) {\r\n const newColorDef = newHsl.toColorDef();\r\n onColorChange(newColorDef);\r\n }\r\n }, [currentHsl, onColorChange]);\r\n\r\n const handleHueValueChange = React.useCallback((value: number | undefined, _stringValue: string) => {\r\n const newHsl = currentHsl.clone((value ?? 0) / 360, undefined, undefined);\r\n\r\n if (onColorChange) {\r\n const newColorDef = newHsl.toColorDef();\r\n onColorChange(newColorDef);\r\n }\r\n }, [currentHsl, onColorChange]);\r\n\r\n const handleSaturationValueChange = React.useCallback((value: number | undefined, _stringValue: string) => {\r\n const newHsl = currentHsl.clone(undefined, (value ?? 0) / 100, undefined);\r\n\r\n if (onColorChange) {\r\n const newColorDef = newHsl.toColorDef();\r\n onColorChange(newColorDef);\r\n }\r\n }, [currentHsl, onColorChange]);\r\n\r\n const handleRedChange = React.useCallback((value: number | undefined, _stringValue: string) => {\r\n if (undefined !== value) {\r\n const newColorDef = ColorDef.from(value, color.g, color.b);\r\n if (onColorChange) {\r\n onColorChange(newColorDef);\r\n }\r\n }\r\n }, [color, onColorChange]);\r\n\r\n const handleGreenChange = React.useCallback((value: number | undefined, _stringValue: string) => {\r\n if (undefined !== value) {\r\n const newColorDef = ColorDef.from(color.r, value, color.b);\r\n if (onColorChange) {\r\n onColorChange(newColorDef);\r\n }\r\n }\r\n }, [color, onColorChange]);\r\n\r\n const handleBlueChange = React.useCallback((value: number | undefined, _stringValue: string) => {\r\n if (undefined !== value) {\r\n const newColorDef = ColorDef.from(color.r, color.g, value);\r\n if (onColorChange) {\r\n onColorChange(newColorDef);\r\n }\r\n }\r\n }, [color, onColorChange]);\r\n\r\n return (\r\n <div data-testid=\"components-colorpicker-panel\" className=\"components-colorpicker-panel\">\r\n <div className=\"components-colorpicker-panel-color\">\r\n <div className=\"components-colorpicker-saturation\">\r\n <SaturationPicker hsv={currentHsv} onSaturationChange={handleSaturationChange} />\r\n </div>\r\n <div className=\"components-colorpicker-hue\">\r\n <HueSlider hsv={currentHsv} onHueChange={handleHueChange} isHorizontal={false} />\r\n </div>\r\n </div>\r\n {(colorInputType === \"RGB\") &&\r\n <div data-testid=\"components-colorpicker-input-panel\" className=\"components-colorpicker-input-panel\">\r\n <div className=\"components-colorpicker-input-value-wrapper\">\r\n <span className=\"uicore-inputs-labeled-input\">R</span>\r\n <NumberInput data-testid=\"components-colorpicker-input-value-red\" value={color.r} onChange={handleRedChange} min={0} max={255} />\r\n </div>\r\n <div className=\"components-colorpicker-input-value-wrapper\">\r\n <span className=\"uicore-inputs-labeled-input\">G</span>\r\n <NumberInput data-testid=\"components-colorpicker-input-value-green\" value={color.g} onChange={handleGreenChange} min={0} max={255} />\r\n </div>\r\n <div className=\"components-colorpicker-input-value-wrapper\">\r\n <span className=\"uicore-inputs-labeled-input\">B</span>\r\n <NumberInput data-testid=\"components-colorpicker-input-value-blue\" value={color.b} onChange={handleBlueChange} min={0} max={255} />\r\n </div>\r\n </div>}\r\n {(colorInputType === \"HSL\") &&\r\n <div data-testid=\"components-colorpicker-input-panel\" className=\"components-colorpicker-input-panel\">\r\n <div className=\"components-colorpicker-input-value-wrapper\">\r\n <span className=\"uicore-inputs-labeled-input\">H</span>\r\n <NumberInput data-testid=\"components-colorpicker-input-value-hue\" value={Math.round(currentHsl.h * 360)} onChange={handleHueValueChange} min={0} max={360} />\r\n </div>\r\n <div className=\"components-colorpicker-input-value-wrapper\">\r\n <span className=\"uicore-inputs-labeled-input\">S</span>\r\n <NumberInput data-testid=\"components-colorpicker-input-value-saturation\" value={Math.round(currentHsl.s * 100)} onChange={handleSaturationValueChange} min={0} max={100} />\r\n </div>\r\n <div className=\"components-colorpicker-input-value-wrapper\">\r\n <span className=\"uicore-inputs-labeled-input\">L</span>\r\n <NumberInput data-testid=\"components-colorpicker-input-value-lightness\" value={Math.round(currentHsl.l * 100)} onChange={handleLightnessValueChange} min={0} max={100} />\r\n </div>\r\n </div>}\r\n\r\n {\r\n colorPresets && colorPresets.length &&\r\n <div className=\"components-colorpicker-panel-presets\">\r\n {colorPresets.map((preset, index) => <ColorSwatch className=\"components-colorpicker-panel-swatch\" key={index} colorDef={preset} round={false} onColorPick={handlePresetColorPick} />)}\r\n </div>\r\n }\r\n </div>\r\n );\r\n}\r\n"]}
|