@itwin/imodel-components-react 3.7.12 → 3.7.13
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 +6 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +28 -28
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +79 -79
- package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +36 -36
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js +186 -186
- 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.d.ts +37 -37
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +107 -107
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +91 -91
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +74 -74
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +145 -145
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +93 -93
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +137 -137
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +64 -64
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +22 -22
- package/lib/cjs/imodel-components-react/color/HueSlider.js +199 -199
- 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.d.ts +20 -20
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js +213 -213
- 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.d.ts +22 -22
- package/lib/cjs/imodel-components-react/color/Swatch.js +60 -60
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.scss +23 -23
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +23 -23
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts +44 -44
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js +151 -151
- 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.d.ts +47 -47
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js +160 -160
- 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.d.ts +25 -25
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +96 -96
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +265 -265
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +107 -107
- package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +33 -33
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js +85 -85
- 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.d.ts +60 -60
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +159 -159
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +52 -52
- package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts +45 -45
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js +127 -127
- 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 +176 -176
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +669 -669
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +180 -180
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +647 -647
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +133 -133
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +99 -99
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +64 -64
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +53 -53
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +83 -83
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +86 -86
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +109 -109
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +133 -133
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +184 -184
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +154 -154
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +59 -59
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +47 -47
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +54 -54
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +48 -48
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +50 -50
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +58 -58
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +47 -47
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +56 -56
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +95 -95
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +119 -119
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +143 -143
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +69 -69
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +81 -81
- 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.d.ts +33 -33
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +91 -91
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +25 -25
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +191 -191
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +106 -106
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +424 -424
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +357 -357
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +54 -54
- 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.d.ts +133 -133
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +387 -387
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +185 -185
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +174 -174
- package/lib/cjs/imodel-components-react/timeline/interfaces.js +45 -45
- package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +274 -274
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +105 -105
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/cjs/imodel-components-react.d.ts +82 -82
- package/lib/cjs/imodel-components-react.js +101 -101
- package/lib/cjs/imodel-components-react.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +28 -28
- package/lib/esm/imodel-components-react/UiIModelComponents.js +75 -75
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +36 -36
- package/lib/esm/imodel-components-react/color/AlphaSlider.js +160 -160
- 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.d.ts +37 -37
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js +82 -82
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +91 -91
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +51 -51
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +122 -122
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +93 -93
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +112 -112
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +64 -64
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts +22 -22
- package/lib/esm/imodel-components-react/color/HueSlider.js +173 -173
- 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.d.ts +20 -20
- package/lib/esm/imodel-components-react/color/SaturationPicker.js +187 -187
- 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.d.ts +22 -22
- package/lib/esm/imodel-components-react/color/Swatch.js +34 -34
- package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.scss +23 -23
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +19 -19
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +44 -44
- package/lib/esm/imodel-components-react/editors/ColorEditor.js +124 -124
- 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.d.ts +47 -47
- package/lib/esm/imodel-components-react/editors/WeightEditor.js +133 -133
- 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.d.ts +25 -25
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js +70 -70
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +240 -240
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +107 -107
- package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +33 -33
- package/lib/esm/imodel-components-react/lineweight/Swatch.js +59 -59
- 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.d.ts +60 -60
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +133 -133
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +52 -52
- package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +45 -45
- package/lib/esm/imodel-components-react/navigationaids/Cube.js +100 -100
- 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 +176 -176
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +641 -641
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +180 -180
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +620 -620
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +133 -133
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +76 -76
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +64 -64
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +30 -30
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +60 -60
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js +63 -63
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +83 -83
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +110 -110
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +158 -158
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +131 -131
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +36 -36
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +24 -24
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +31 -31
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +25 -25
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +27 -27
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +35 -35
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +24 -24
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +33 -33
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +69 -69
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +96 -96
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +139 -139
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +65 -65
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js +55 -55
- 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.d.ts +33 -33
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js +64 -64
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +25 -25
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +54 -54
- package/lib/esm/imodel-components-react/timeline/Scrubber.js +164 -164
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.scss +106 -106
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +398 -398
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +357 -357
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +28 -28
- 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.d.ts +133 -133
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +361 -361
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +185 -185
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +174 -174
- package/lib/esm/imodel-components-react/timeline/interfaces.js +42 -42
- package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +251 -251
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +95 -95
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react.d.ts +82 -82
- package/lib/esm/imodel-components-react.js +87 -87
- package/lib/esm/imodel-components-react.js.map +1 -1
- package/lib/public/locales/en/UiIModelComponents.json +139 -139
- package/package.json +19 -19
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module LineWeight
|
|
7
|
-
*/
|
|
8
|
-
import "./WeightPickerButton.scss";
|
|
9
|
-
import classnames from "classnames";
|
|
10
|
-
import * as React from "react";
|
|
11
|
-
import { RelativePosition, SpecialKey } from "@itwin/appui-abstract";
|
|
12
|
-
import { ElementResizeObserver, Popup } from "@itwin/core-react";
|
|
13
|
-
import { LineWeightSwatch } from "./Swatch";
|
|
14
|
-
/** WeightPickerButton component
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export class WeightPickerButton extends React.PureComponent {
|
|
18
|
-
/** @internal */
|
|
19
|
-
constructor(props) {
|
|
20
|
-
super(props);
|
|
21
|
-
this._target = React.createRef();
|
|
22
|
-
this._weightsContainer = null;
|
|
23
|
-
this._focusTarget = React.createRef(); // weight button that should receive focus after popup is open
|
|
24
|
-
this._togglePopup = () => {
|
|
25
|
-
if (this.props.readonly)
|
|
26
|
-
return;
|
|
27
|
-
this.setState((prevState) => ({ showPopup: !prevState.showPopup }));
|
|
28
|
-
};
|
|
29
|
-
this._onPopupOpened = () => {
|
|
30
|
-
};
|
|
31
|
-
this._closePopup = () => {
|
|
32
|
-
this.setState((_prevState) => ({ showPopup: false }));
|
|
33
|
-
};
|
|
34
|
-
this._handleWeightPicked = (weight) => {
|
|
35
|
-
this._closePopup();
|
|
36
|
-
this.props.onLineWeightPick && this.props.onLineWeightPick(weight);
|
|
37
|
-
};
|
|
38
|
-
this._handleKeyDown = (event) => {
|
|
39
|
-
if (event.key === SpecialKey.Enter) {
|
|
40
|
-
event.preventDefault();
|
|
41
|
-
event.stopPropagation();
|
|
42
|
-
const weightButton = document.activeElement;
|
|
43
|
-
// istanbul ignore else
|
|
44
|
-
if (weightButton.tagName === "BUTTON") {
|
|
45
|
-
try {
|
|
46
|
-
const values = weightButton.id.split("-");
|
|
47
|
-
// istanbul ignore else
|
|
48
|
-
if (values.length) {
|
|
49
|
-
const weight = parseInt(values[values.length - 1], 10);
|
|
50
|
-
// istanbul ignore else
|
|
51
|
-
if (!isNaN(weight)) {
|
|
52
|
-
// istanbul ignore else
|
|
53
|
-
if (this.props.onLineWeightPick)
|
|
54
|
-
this.props.onLineWeightPick(weight);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
catch { }
|
|
59
|
-
}
|
|
60
|
-
this._closePopup();
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
switch (event.key) {
|
|
64
|
-
case SpecialKey.ArrowDown:
|
|
65
|
-
this.moveFocusInPopup(false, event);
|
|
66
|
-
break;
|
|
67
|
-
case SpecialKey.ArrowUp:
|
|
68
|
-
this.moveFocusInPopup(true, event);
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
this._setWeightContainer = (el) => {
|
|
74
|
-
this._weightsContainer = el;
|
|
75
|
-
};
|
|
76
|
-
this.state = { showPopup: false, targetElement: null };
|
|
77
|
-
}
|
|
78
|
-
setFocus() {
|
|
79
|
-
// istanbul ignore next
|
|
80
|
-
this._focusTarget.current && this._focusTarget.current.focus();
|
|
81
|
-
}
|
|
82
|
-
componentDidMount() {
|
|
83
|
-
// eslint-disable-next-line no-console
|
|
84
|
-
// console.log(`WeightPickerButton.componentDidMount focusRef=${this._focusTarget && this._focusTarget.current ? "set" : "unset"}`);
|
|
85
|
-
this.setState({ targetElement: this._target.current });
|
|
86
|
-
}
|
|
87
|
-
buildIdForWeight(weight) {
|
|
88
|
-
return `ui-core-lineweight-${weight}`;
|
|
89
|
-
}
|
|
90
|
-
moveFocusInPopup(moveUp, event) {
|
|
91
|
-
const activeElement = document.activeElement;
|
|
92
|
-
// istanbul ignore else
|
|
93
|
-
if (this._weightsContainer && activeElement && activeElement.tagName === "BUTTON") {
|
|
94
|
-
const values = activeElement.id.split("-");
|
|
95
|
-
// istanbul ignore else
|
|
96
|
-
if (values.length === 4 && values[2] === "lineweight") {
|
|
97
|
-
const weight = parseInt(values[3], 10);
|
|
98
|
-
const foundIndex = this.props.weights.findIndex((val) => val === weight);
|
|
99
|
-
// istanbul ignore next
|
|
100
|
-
if (foundIndex < 0)
|
|
101
|
-
return;
|
|
102
|
-
const nextWeight = moveUp ? (foundIndex <= 0 ? this.props.weights[this.props.weights.length - 1] : this.props.weights[foundIndex - 1]) :
|
|
103
|
-
(foundIndex < this.props.weights.length - 1 ? this.props.weights[foundIndex + 1] : this.props.weights[0]);
|
|
104
|
-
const focusLocation = this._weightsContainer.querySelector(`#${this.buildIdForWeight(nextWeight)}`);
|
|
105
|
-
// istanbul ignore else
|
|
106
|
-
if (focusLocation) {
|
|
107
|
-
focusLocation.focus();
|
|
108
|
-
event.preventDefault();
|
|
109
|
-
event.stopPropagation();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
renderPopup(title) {
|
|
115
|
-
return (React.createElement("div", { className: "components-weightpicker-popup-container" },
|
|
116
|
-
title && React.createElement("h4", null, title),
|
|
117
|
-
React.createElement("ul", { "data-testid": "components-weightpicker-popup-lines", className: "components-weightpicker-popup-lines", onKeyDown: this._handleKeyDown, ref: this._setWeightContainer }, this.props.weights.map((weight, index) => {
|
|
118
|
-
const classNames = classnames("components-weightpicker-swatch", weight === this.props.activeWeight && "active");
|
|
119
|
-
return (React.createElement(LineWeightSwatch, { className: classNames, key: index, colorDef: this.props.colorDef, id: this.buildIdForWeight(weight), hideLabel: this.props.hideLabel, onClick: this._handleWeightPicked.bind(this, weight), weight: weight }));
|
|
120
|
-
}))));
|
|
121
|
-
}
|
|
122
|
-
/** @internal */
|
|
123
|
-
render() {
|
|
124
|
-
const buttonClassNames = classnames("components-weightpicker-button", this.props.className);
|
|
125
|
-
return (React.createElement(React.Fragment, null,
|
|
126
|
-
React.createElement("div", { ref: this._target, style: this.props.style },
|
|
127
|
-
React.createElement(LineWeightSwatch, { "data-testid": "components-weightpicker-button", className: buttonClassNames, weight: this.props.activeWeight, colorDef: this.props.colorDef, readonly: this.props.readonly, disabled: this.props.disabled, hideLabel: this.props.hideLabel, "aria-haspopup": "listbox", "aria-expanded": this.state.showPopup, onClick: this._togglePopup })),
|
|
128
|
-
React.createElement(ElementResizeObserver, { watchedElement: this.state.targetElement, render: ({ width }) => (React.createElement(Popup, { className: "components-weightpicker-popup", style: { width: `${width}px` }, isOpen: this.state.showPopup, position: RelativePosition.Bottom, offset: 0, showShadow: false, onClose: this._closePopup, onOpen: this._onPopupOpened, focusTarget: `#${this.buildIdForWeight(this.props.activeWeight)}`, moveFocus: true, target: this.state.targetElement, closeOnNestedPopupOutsideClick: true }, this.renderPopup(this.props.dropDownTitle))) })));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
WeightPickerButton.defaultProps = {
|
|
132
|
-
weights: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
133
|
-
};
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module LineWeight
|
|
7
|
+
*/
|
|
8
|
+
import "./WeightPickerButton.scss";
|
|
9
|
+
import classnames from "classnames";
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { RelativePosition, SpecialKey } from "@itwin/appui-abstract";
|
|
12
|
+
import { ElementResizeObserver, Popup } from "@itwin/core-react";
|
|
13
|
+
import { LineWeightSwatch } from "./Swatch";
|
|
14
|
+
/** WeightPickerButton component
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export class WeightPickerButton extends React.PureComponent {
|
|
18
|
+
/** @internal */
|
|
19
|
+
constructor(props) {
|
|
20
|
+
super(props);
|
|
21
|
+
this._target = React.createRef();
|
|
22
|
+
this._weightsContainer = null;
|
|
23
|
+
this._focusTarget = React.createRef(); // weight button that should receive focus after popup is open
|
|
24
|
+
this._togglePopup = () => {
|
|
25
|
+
if (this.props.readonly)
|
|
26
|
+
return;
|
|
27
|
+
this.setState((prevState) => ({ showPopup: !prevState.showPopup }));
|
|
28
|
+
};
|
|
29
|
+
this._onPopupOpened = () => {
|
|
30
|
+
};
|
|
31
|
+
this._closePopup = () => {
|
|
32
|
+
this.setState((_prevState) => ({ showPopup: false }));
|
|
33
|
+
};
|
|
34
|
+
this._handleWeightPicked = (weight) => {
|
|
35
|
+
this._closePopup();
|
|
36
|
+
this.props.onLineWeightPick && this.props.onLineWeightPick(weight);
|
|
37
|
+
};
|
|
38
|
+
this._handleKeyDown = (event) => {
|
|
39
|
+
if (event.key === SpecialKey.Enter) {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
const weightButton = document.activeElement;
|
|
43
|
+
// istanbul ignore else
|
|
44
|
+
if (weightButton.tagName === "BUTTON") {
|
|
45
|
+
try {
|
|
46
|
+
const values = weightButton.id.split("-");
|
|
47
|
+
// istanbul ignore else
|
|
48
|
+
if (values.length) {
|
|
49
|
+
const weight = parseInt(values[values.length - 1], 10);
|
|
50
|
+
// istanbul ignore else
|
|
51
|
+
if (!isNaN(weight)) {
|
|
52
|
+
// istanbul ignore else
|
|
53
|
+
if (this.props.onLineWeightPick)
|
|
54
|
+
this.props.onLineWeightPick(weight);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch { }
|
|
59
|
+
}
|
|
60
|
+
this._closePopup();
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
switch (event.key) {
|
|
64
|
+
case SpecialKey.ArrowDown:
|
|
65
|
+
this.moveFocusInPopup(false, event);
|
|
66
|
+
break;
|
|
67
|
+
case SpecialKey.ArrowUp:
|
|
68
|
+
this.moveFocusInPopup(true, event);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
this._setWeightContainer = (el) => {
|
|
74
|
+
this._weightsContainer = el;
|
|
75
|
+
};
|
|
76
|
+
this.state = { showPopup: false, targetElement: null };
|
|
77
|
+
}
|
|
78
|
+
setFocus() {
|
|
79
|
+
// istanbul ignore next
|
|
80
|
+
this._focusTarget.current && this._focusTarget.current.focus();
|
|
81
|
+
}
|
|
82
|
+
componentDidMount() {
|
|
83
|
+
// eslint-disable-next-line no-console
|
|
84
|
+
// console.log(`WeightPickerButton.componentDidMount focusRef=${this._focusTarget && this._focusTarget.current ? "set" : "unset"}`);
|
|
85
|
+
this.setState({ targetElement: this._target.current });
|
|
86
|
+
}
|
|
87
|
+
buildIdForWeight(weight) {
|
|
88
|
+
return `ui-core-lineweight-${weight}`;
|
|
89
|
+
}
|
|
90
|
+
moveFocusInPopup(moveUp, event) {
|
|
91
|
+
const activeElement = document.activeElement;
|
|
92
|
+
// istanbul ignore else
|
|
93
|
+
if (this._weightsContainer && activeElement && activeElement.tagName === "BUTTON") {
|
|
94
|
+
const values = activeElement.id.split("-");
|
|
95
|
+
// istanbul ignore else
|
|
96
|
+
if (values.length === 4 && values[2] === "lineweight") {
|
|
97
|
+
const weight = parseInt(values[3], 10);
|
|
98
|
+
const foundIndex = this.props.weights.findIndex((val) => val === weight);
|
|
99
|
+
// istanbul ignore next
|
|
100
|
+
if (foundIndex < 0)
|
|
101
|
+
return;
|
|
102
|
+
const nextWeight = moveUp ? (foundIndex <= 0 ? this.props.weights[this.props.weights.length - 1] : this.props.weights[foundIndex - 1]) :
|
|
103
|
+
(foundIndex < this.props.weights.length - 1 ? this.props.weights[foundIndex + 1] : this.props.weights[0]);
|
|
104
|
+
const focusLocation = this._weightsContainer.querySelector(`#${this.buildIdForWeight(nextWeight)}`);
|
|
105
|
+
// istanbul ignore else
|
|
106
|
+
if (focusLocation) {
|
|
107
|
+
focusLocation.focus();
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
event.stopPropagation();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
renderPopup(title) {
|
|
115
|
+
return (React.createElement("div", { className: "components-weightpicker-popup-container" },
|
|
116
|
+
title && React.createElement("h4", null, title),
|
|
117
|
+
React.createElement("ul", { "data-testid": "components-weightpicker-popup-lines", className: "components-weightpicker-popup-lines", onKeyDown: this._handleKeyDown, ref: this._setWeightContainer }, this.props.weights.map((weight, index) => {
|
|
118
|
+
const classNames = classnames("components-weightpicker-swatch", weight === this.props.activeWeight && "active");
|
|
119
|
+
return (React.createElement(LineWeightSwatch, { className: classNames, key: index, colorDef: this.props.colorDef, id: this.buildIdForWeight(weight), hideLabel: this.props.hideLabel, onClick: this._handleWeightPicked.bind(this, weight), weight: weight }));
|
|
120
|
+
}))));
|
|
121
|
+
}
|
|
122
|
+
/** @internal */
|
|
123
|
+
render() {
|
|
124
|
+
const buttonClassNames = classnames("components-weightpicker-button", this.props.className);
|
|
125
|
+
return (React.createElement(React.Fragment, null,
|
|
126
|
+
React.createElement("div", { ref: this._target, style: this.props.style },
|
|
127
|
+
React.createElement(LineWeightSwatch, { "data-testid": "components-weightpicker-button", className: buttonClassNames, weight: this.props.activeWeight, colorDef: this.props.colorDef, readonly: this.props.readonly, disabled: this.props.disabled, hideLabel: this.props.hideLabel, "aria-haspopup": "listbox", "aria-expanded": this.state.showPopup, onClick: this._togglePopup })),
|
|
128
|
+
React.createElement(ElementResizeObserver, { watchedElement: this.state.targetElement, render: ({ width }) => (React.createElement(Popup, { className: "components-weightpicker-popup", style: { width: `${width}px` }, isOpen: this.state.showPopup, position: RelativePosition.Bottom, offset: 0, showShadow: false, onClose: this._closePopup, onOpen: this._onPopupOpened, focusTarget: `#${this.buildIdForWeight(this.props.activeWeight)}`, moveFocus: true, target: this.state.targetElement, closeOnNestedPopupOutsideClick: true }, this.renderPopup(this.props.dropDownTitle))) })));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
WeightPickerButton.defaultProps = {
|
|
132
|
+
weights: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
133
|
+
};
|
|
134
134
|
//# sourceMappingURL=WeightPickerButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeightPickerButton.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/lineweight/WeightPickerButton.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAe,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAgC5C;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK,CAAC,aAAmD;IAK/F,gBAAgB;IAChB,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QANP,YAAO,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QAC5C,sBAAiB,GAA0B,IAAI,CAAC;QAChD,iBAAY,GAAG,KAAK,CAAC,SAAS,EAAqB,CAAC,CAAE,8DAA8D;QAkBpH,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACrB,OAAO;YACT,IAAI,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC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CAAC,QAAQ,EAC7B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,mBACjB,SAAS,mBACR,IAAI,CAAC,KAAK,CAAC,SAAS,EACnC,OAAO,EAAE,IAAI,CAAC,YAAY,GAAI,CAC5B;YACN,oBAAC,qBAAqB,IAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,MAAM,EACpE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACd,oBAAC,KAAK,IACJ,SAAS,EAAC,+BAA+B,EACzC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,EAAE,EAC9B,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC5B,QAAQ,EAAE,gBAAgB,CAAC,MAAM,EACjC,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,cAAc,EAC3B,WAAW,EAAE,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,EACjE,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EAChC,8BAA8B,UAE7B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CACrC,CACT,GACD,CACD,CACJ,CAAC;IACJ,CAAC;;AAvKa,+BAAY,GAAG;IAC3B,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;CACzC,CAAC","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/** @packageDocumentation\n * @module LineWeight\n */\n\nimport \"./WeightPickerButton.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { ColorDef } from \"@itwin/core-common\";\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\nimport { CommonProps, ElementResizeObserver, Popup } from \"@itwin/core-react\";\nimport { LineWeightSwatch } from \"./Swatch\";\n\n// cSpell:ignore weightpicker lineweight\n\n/** Properties for the [[WeightPickerButton]] React component\n * @public\n */\nexport interface WeightPickerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, CommonProps {\n /** active weight */\n activeWeight: number;\n /** available weights */\n weights: number[];\n /** color specification */\n colorDef?: ColorDef;\n /** function to run when user selects weight swatch */\n onLineWeightPick?: ((weight: number) => void) | undefined;\n /** Disabled or not */\n disabled?: boolean;\n /** Readonly or not */\n readonly?: boolean;\n /** hide the weight label */\n hideLabel?: boolean;\n /** Title to show at top of DropDown */\n dropDownTitle?: string;\n}\n\n/** @internal */\ninterface WeightPickerState {\n showPopup: boolean;\n targetElement: HTMLDivElement | null;\n}\n\n/** WeightPickerButton component\n * @public\n */\nexport class WeightPickerButton extends React.PureComponent<WeightPickerProps, WeightPickerState> {\n private _target = React.createRef<HTMLDivElement>();\n private _weightsContainer: HTMLDivElement | null = null;\n private _focusTarget = React.createRef<HTMLButtonElement>(); // weight button that should receive focus after popup is open\n\n /** @internal */\n constructor(props: WeightPickerProps) {\n super(props);\n\n this.state = { showPopup: false, targetElement: null };\n }\n\n public setFocus(): void {\n // istanbul ignore next\n this._focusTarget.current && this._focusTarget.current.focus();\n }\n\n public static defaultProps = {\n weights: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n };\n\n private _togglePopup = () => {\n if (this.props.readonly)\n return;\n this.setState((prevState) => ({ showPopup: !prevState.showPopup }));\n };\n\n private _onPopupOpened = () => {\n };\n\n private _closePopup = () => {\n this.setState((_prevState) => ({ showPopup: false }));\n };\n\n private _handleWeightPicked = (weight: number) => {\n this._closePopup();\n this.props.onLineWeightPick && this.props.onLineWeightPick(weight);\n };\n\n public override componentDidMount() {\n // eslint-disable-next-line no-console\n // console.log(`WeightPickerButton.componentDidMount focusRef=${this._focusTarget && this._focusTarget.current ? \"set\" : \"unset\"}`);\n this.setState({ targetElement: this._target.current });\n }\n\n private buildIdForWeight(weight: number): string {\n return `ui-core-lineweight-${weight}`;\n }\n\n private moveFocusInPopup(moveUp: boolean, event: React.KeyboardEvent<any>) {\n const activeElement = document.activeElement;\n // istanbul ignore else\n if (this._weightsContainer && activeElement && activeElement.tagName === \"BUTTON\") {\n const values = activeElement.id.split(\"-\");\n // istanbul ignore else\n if (values.length === 4 && values[2] === \"lineweight\") {\n const weight = parseInt(values[3], 10);\n const foundIndex = this.props.weights.findIndex((val) => val === weight);\n // istanbul ignore next\n if (foundIndex < 0)\n return;\n\n const nextWeight = moveUp ? (foundIndex <= 0 ? this.props.weights[this.props.weights.length - 1] : this.props.weights[foundIndex - 1]) :\n (foundIndex < this.props.weights.length - 1 ? this.props.weights[foundIndex + 1] : this.props.weights[0]);\n\n const focusLocation = this._weightsContainer.querySelector(`#${this.buildIdForWeight(nextWeight)}`) as HTMLButtonElement;\n // istanbul ignore else\n if (focusLocation) {\n focusLocation.focus();\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n }\n\n private _handleKeyDown = (event: React.KeyboardEvent<any>) => {\n if (event.key === SpecialKey.Enter) {\n event.preventDefault();\n event.stopPropagation();\n const weightButton = document.activeElement as HTMLElement;\n // istanbul ignore else\n if (weightButton.tagName === \"BUTTON\") {\n try {\n const values = weightButton.id.split(\"-\");\n // istanbul ignore else\n if (values.length) {\n const weight = parseInt(values[values.length - 1], 10);\n // istanbul ignore else\n if (!isNaN(weight)) {\n // istanbul ignore else\n if (this.props.onLineWeightPick)\n this.props.onLineWeightPick(weight);\n }\n }\n } catch { }\n }\n this._closePopup();\n } else {\n switch (event.key) {\n case SpecialKey.ArrowDown:\n this.moveFocusInPopup(false, event);\n break;\n case SpecialKey.ArrowUp:\n this.moveFocusInPopup(true, event);\n break;\n }\n }\n };\n\n private _setWeightContainer = (el: any) => {\n this._weightsContainer = el;\n };\n\n private renderPopup(title: string | undefined) {\n return (\n <div className=\"components-weightpicker-popup-container\">\n {title && <h4>{title}</h4>}\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}\n <ul data-testid=\"components-weightpicker-popup-lines\" className=\"components-weightpicker-popup-lines\" onKeyDown={this._handleKeyDown} ref={this._setWeightContainer}>\n {this.props.weights.map((weight, index) => {\n const classNames = classnames(\n \"components-weightpicker-swatch\",\n weight === this.props.activeWeight && \"active\",\n );\n return (<LineWeightSwatch\n className={classNames}\n key={index}\n colorDef={this.props.colorDef}\n id={this.buildIdForWeight(weight)}\n hideLabel={this.props.hideLabel}\n onClick={this._handleWeightPicked.bind(this, weight)}\n weight={weight} />);\n })\n }\n </ul>\n </div>\n );\n }\n\n /** @internal */\n public override render() {\n const buttonClassNames = classnames(\n \"components-weightpicker-button\",\n this.props.className,\n );\n\n return (\n <>\n <div ref={this._target} style={this.props.style} >\n <LineWeightSwatch\n data-testid=\"components-weightpicker-button\"\n className={buttonClassNames}\n weight={this.props.activeWeight}\n colorDef={this.props.colorDef}\n readonly={this.props.readonly}\n disabled={this.props.disabled}\n hideLabel={this.props.hideLabel}\n aria-haspopup=\"listbox\"\n aria-expanded={this.state.showPopup}\n onClick={this._togglePopup} />\n </div>\n <ElementResizeObserver watchedElement={this.state.targetElement} render=\n {({ width }) => (\n <Popup\n className=\"components-weightpicker-popup\"\n style={{ width: `${width}px` }}\n isOpen={this.state.showPopup}\n position={RelativePosition.Bottom}\n offset={0}\n showShadow={false}\n onClose={this._closePopup}\n onOpen={this._onPopupOpened}\n focusTarget={`#${this.buildIdForWeight(this.props.activeWeight)}`}\n moveFocus={true}\n target={this.state.targetElement}\n closeOnNestedPopupOutsideClick\n >\n {this.renderPopup(this.props.dropDownTitle)}\n </Popup>\n )}\n />\n </>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"WeightPickerButton.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/lineweight/WeightPickerButton.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAe,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAgC5C;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK,CAAC,aAAmD;IAK/F,gBAAgB;IAChB,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QANP,YAAO,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QAC5C,sBAAiB,GAA0B,IAAI,CAAC;QAChD,iBAAY,GAAG,KAAK,CAAC,SAAS,EAAqB,CAAC,CAAE,8DAA8D;QAkBpH,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACrB,OAAO;YACT,IAAI,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACtE,CAAC,CAAC;QAEM,mBAAc,GAAG,GAAG,EAAE;QAC9B,CAAC,CAAC;QAEM,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACx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AAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,MAAM,EACpE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACd,oBAAC,KAAK,IACJ,SAAS,EAAC,+BAA+B,EACzC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,EAAE,EAC9B,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC5B,QAAQ,EAAE,gBAAgB,CAAC,MAAM,EACjC,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,cAAc,EAC3B,WAAW,EAAE,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,EACjE,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EAChC,8BAA8B,UAE7B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CACrC,CACT,GACD,CACD,CACJ,CAAC;IACJ,CAAC;;AAvKa,+BAAY,GAAG;IAC3B,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;CACzC,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 LineWeight\r\n */\r\n\r\nimport \"./WeightPickerButton.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ColorDef } from \"@itwin/core-common\";\r\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps, ElementResizeObserver, Popup } from \"@itwin/core-react\";\r\nimport { LineWeightSwatch } from \"./Swatch\";\r\n\r\n// cSpell:ignore weightpicker lineweight\r\n\r\n/** Properties for the [[WeightPickerButton]] React component\r\n * @public\r\n */\r\nexport interface WeightPickerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, CommonProps {\r\n /** active weight */\r\n activeWeight: number;\r\n /** available weights */\r\n weights: number[];\r\n /** color specification */\r\n colorDef?: ColorDef;\r\n /** function to run when user selects weight swatch */\r\n onLineWeightPick?: ((weight: number) => void) | undefined;\r\n /** Disabled or not */\r\n disabled?: boolean;\r\n /** Readonly or not */\r\n readonly?: boolean;\r\n /** hide the weight label */\r\n hideLabel?: boolean;\r\n /** Title to show at top of DropDown */\r\n dropDownTitle?: string;\r\n}\r\n\r\n/** @internal */\r\ninterface WeightPickerState {\r\n showPopup: boolean;\r\n targetElement: HTMLDivElement | null;\r\n}\r\n\r\n/** WeightPickerButton component\r\n * @public\r\n */\r\nexport class WeightPickerButton extends React.PureComponent<WeightPickerProps, WeightPickerState> {\r\n private _target = React.createRef<HTMLDivElement>();\r\n private _weightsContainer: HTMLDivElement | null = null;\r\n private _focusTarget = React.createRef<HTMLButtonElement>(); // weight button that should receive focus after popup is open\r\n\r\n /** @internal */\r\n constructor(props: WeightPickerProps) {\r\n super(props);\r\n\r\n this.state = { showPopup: false, targetElement: null };\r\n }\r\n\r\n public setFocus(): void {\r\n // istanbul ignore next\r\n this._focusTarget.current && this._focusTarget.current.focus();\r\n }\r\n\r\n public static defaultProps = {\r\n weights: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\r\n };\r\n\r\n private _togglePopup = () => {\r\n if (this.props.readonly)\r\n return;\r\n this.setState((prevState) => ({ showPopup: !prevState.showPopup }));\r\n };\r\n\r\n private _onPopupOpened = () => {\r\n };\r\n\r\n private _closePopup = () => {\r\n this.setState((_prevState) => ({ showPopup: false }));\r\n };\r\n\r\n private _handleWeightPicked = (weight: number) => {\r\n this._closePopup();\r\n this.props.onLineWeightPick && this.props.onLineWeightPick(weight);\r\n };\r\n\r\n public override componentDidMount() {\r\n // eslint-disable-next-line no-console\r\n // console.log(`WeightPickerButton.componentDidMount focusRef=${this._focusTarget && this._focusTarget.current ? \"set\" : \"unset\"}`);\r\n this.setState({ targetElement: this._target.current });\r\n }\r\n\r\n private buildIdForWeight(weight: number): string {\r\n return `ui-core-lineweight-${weight}`;\r\n }\r\n\r\n private moveFocusInPopup(moveUp: boolean, event: React.KeyboardEvent<any>) {\r\n const activeElement = document.activeElement;\r\n // istanbul ignore else\r\n if (this._weightsContainer && activeElement && activeElement.tagName === \"BUTTON\") {\r\n const values = activeElement.id.split(\"-\");\r\n // istanbul ignore else\r\n if (values.length === 4 && values[2] === \"lineweight\") {\r\n const weight = parseInt(values[3], 10);\r\n const foundIndex = this.props.weights.findIndex((val) => val === weight);\r\n // istanbul ignore next\r\n if (foundIndex < 0)\r\n return;\r\n\r\n const nextWeight = moveUp ? (foundIndex <= 0 ? this.props.weights[this.props.weights.length - 1] : this.props.weights[foundIndex - 1]) :\r\n (foundIndex < this.props.weights.length - 1 ? this.props.weights[foundIndex + 1] : this.props.weights[0]);\r\n\r\n const focusLocation = this._weightsContainer.querySelector(`#${this.buildIdForWeight(nextWeight)}`) as HTMLButtonElement;\r\n // istanbul ignore else\r\n if (focusLocation) {\r\n focusLocation.focus();\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _handleKeyDown = (event: React.KeyboardEvent<any>) => {\r\n if (event.key === SpecialKey.Enter) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n const weightButton = document.activeElement as HTMLElement;\r\n // istanbul ignore else\r\n if (weightButton.tagName === \"BUTTON\") {\r\n try {\r\n const values = weightButton.id.split(\"-\");\r\n // istanbul ignore else\r\n if (values.length) {\r\n const weight = parseInt(values[values.length - 1], 10);\r\n // istanbul ignore else\r\n if (!isNaN(weight)) {\r\n // istanbul ignore else\r\n if (this.props.onLineWeightPick)\r\n this.props.onLineWeightPick(weight);\r\n }\r\n }\r\n } catch { }\r\n }\r\n this._closePopup();\r\n } else {\r\n switch (event.key) {\r\n case SpecialKey.ArrowDown:\r\n this.moveFocusInPopup(false, event);\r\n break;\r\n case SpecialKey.ArrowUp:\r\n this.moveFocusInPopup(true, event);\r\n break;\r\n }\r\n }\r\n };\r\n\r\n private _setWeightContainer = (el: any) => {\r\n this._weightsContainer = el;\r\n };\r\n\r\n private renderPopup(title: string | undefined) {\r\n return (\r\n <div className=\"components-weightpicker-popup-container\">\r\n {title && <h4>{title}</h4>}\r\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}\r\n <ul data-testid=\"components-weightpicker-popup-lines\" className=\"components-weightpicker-popup-lines\" onKeyDown={this._handleKeyDown} ref={this._setWeightContainer}>\r\n {this.props.weights.map((weight, index) => {\r\n const classNames = classnames(\r\n \"components-weightpicker-swatch\",\r\n weight === this.props.activeWeight && \"active\",\r\n );\r\n return (<LineWeightSwatch\r\n className={classNames}\r\n key={index}\r\n colorDef={this.props.colorDef}\r\n id={this.buildIdForWeight(weight)}\r\n hideLabel={this.props.hideLabel}\r\n onClick={this._handleWeightPicked.bind(this, weight)}\r\n weight={weight} />);\r\n })\r\n }\r\n </ul>\r\n </div>\r\n );\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n const buttonClassNames = classnames(\r\n \"components-weightpicker-button\",\r\n this.props.className,\r\n );\r\n\r\n return (\r\n <>\r\n <div ref={this._target} style={this.props.style} >\r\n <LineWeightSwatch\r\n data-testid=\"components-weightpicker-button\"\r\n className={buttonClassNames}\r\n weight={this.props.activeWeight}\r\n colorDef={this.props.colorDef}\r\n readonly={this.props.readonly}\r\n disabled={this.props.disabled}\r\n hideLabel={this.props.hideLabel}\r\n aria-haspopup=\"listbox\"\r\n aria-expanded={this.state.showPopup}\r\n onClick={this._togglePopup} />\r\n </div>\r\n <ElementResizeObserver watchedElement={this.state.targetElement} render=\r\n {({ width }) => (\r\n <Popup\r\n className=\"components-weightpicker-popup\"\r\n style={{ width: `${width}px` }}\r\n isOpen={this.state.showPopup}\r\n position={RelativePosition.Bottom}\r\n offset={0}\r\n showShadow={false}\r\n onClose={this._closePopup}\r\n onOpen={this._onPopupOpened}\r\n focusTarget={`#${this.buildIdForWeight(this.props.activeWeight)}`}\r\n moveFocus={true}\r\n target={this.state.targetElement}\r\n closeOnNestedPopupOutsideClick\r\n >\r\n {this.renderPopup(this.props.dropDownTitle)}\r\n </Popup>\r\n )}\r\n />\r\n </>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
|
|
6
|
-
@import "~@itwin/core-react/lib/cjs/core-react/button/button";
|
|
7
|
-
|
|
8
|
-
.components-weightpicker-button {
|
|
9
|
-
color: $buic-foreground-body;
|
|
10
|
-
background: $buic-background-control;
|
|
11
|
-
border: 1px solid $buic-inputs-border;
|
|
12
|
-
border-radius: 3px;
|
|
13
|
-
min-width: 100px;
|
|
14
|
-
|
|
15
|
-
&:not(.readonly):not([disabled]) {
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&:active,
|
|
20
|
-
&:focus {
|
|
21
|
-
@include uicore-buttons-button-focused;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.components-weightpicker-popup {
|
|
26
|
-
|
|
27
|
-
&.core-popup {
|
|
28
|
-
background: $buic-background-control;
|
|
29
|
-
border: 1px solid $buic-inputs-border;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.components-weightpicker-popup-container {
|
|
33
|
-
color: $buic-foreground-body;
|
|
34
|
-
background: $buic-background-control;
|
|
35
|
-
min-width: 60px;
|
|
36
|
-
padding: 0 4px;
|
|
37
|
-
border-radius: 4px;
|
|
38
|
-
|
|
39
|
-
>ul {
|
|
40
|
-
padding: 4px 0;
|
|
41
|
-
list-style: none;
|
|
42
|
-
margin: 0.25rem 0;
|
|
43
|
-
|
|
44
|
-
>.components-weightpicker-swatch:hover {
|
|
45
|
-
background: $buic-row-hover;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
>.components-weightpicker-swatch.active {
|
|
49
|
-
background: $buic-row-selection;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
|
|
6
|
+
@import "~@itwin/core-react/lib/cjs/core-react/button/button";
|
|
7
|
+
|
|
8
|
+
.components-weightpicker-button {
|
|
9
|
+
color: $buic-foreground-body;
|
|
10
|
+
background: $buic-background-control;
|
|
11
|
+
border: 1px solid $buic-inputs-border;
|
|
12
|
+
border-radius: 3px;
|
|
13
|
+
min-width: 100px;
|
|
14
|
+
|
|
15
|
+
&:not(.readonly):not([disabled]) {
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:active,
|
|
20
|
+
&:focus {
|
|
21
|
+
@include uicore-buttons-button-focused;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.components-weightpicker-popup {
|
|
26
|
+
|
|
27
|
+
&.core-popup {
|
|
28
|
+
background: $buic-background-control;
|
|
29
|
+
border: 1px solid $buic-inputs-border;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.components-weightpicker-popup-container {
|
|
33
|
+
color: $buic-foreground-body;
|
|
34
|
+
background: $buic-background-control;
|
|
35
|
+
min-width: 60px;
|
|
36
|
+
padding: 0 4px;
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
|
|
39
|
+
>ul {
|
|
40
|
+
padding: 4px 0;
|
|
41
|
+
list-style: none;
|
|
42
|
+
margin: 0.25rem 0;
|
|
43
|
+
|
|
44
|
+
>.components-weightpicker-swatch:hover {
|
|
45
|
+
background: $buic-row-hover;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
>.components-weightpicker-swatch.active {
|
|
49
|
+
background: $buic-row-selection;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
53
|
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Cube
|
|
3
|
-
*/
|
|
4
|
-
import "./Cube.scss";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { Matrix3d } from "@itwin/core-geometry";
|
|
7
|
-
import { CommonProps } from "@itwin/core-react";
|
|
8
|
-
/** Cube Face enumeration
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare enum Face {
|
|
12
|
-
None = "",
|
|
13
|
-
Left = "left",
|
|
14
|
-
Right = "right",
|
|
15
|
-
Back = "back",
|
|
16
|
-
Front = "front",
|
|
17
|
-
Bottom = "bottom",
|
|
18
|
-
Top = "top"
|
|
19
|
-
}
|
|
20
|
-
/** Properties for the [[Cube]] React component
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
export interface CubeProps extends React.AllHTMLAttributes<HTMLDivElement>, CommonProps {
|
|
24
|
-
faces?: {
|
|
25
|
-
[key: string]: React.ReactNode;
|
|
26
|
-
};
|
|
27
|
-
rotMatrix: Matrix3d;
|
|
28
|
-
}
|
|
29
|
-
/** Cube React component used by the 3d Cube Navigation Aid
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
export declare class Cube extends React.PureComponent<CubeProps> {
|
|
33
|
-
render(): React.ReactNode;
|
|
34
|
-
}
|
|
35
|
-
/** @internal */
|
|
36
|
-
export interface CubeFaceProps extends React.AllHTMLAttributes<HTMLDivElement> {
|
|
37
|
-
rotMatrix: Matrix3d;
|
|
38
|
-
face: Face;
|
|
39
|
-
}
|
|
40
|
-
/** @internal */
|
|
41
|
-
export declare class CubeFace extends React.Component<CubeFaceProps> {
|
|
42
|
-
private _faceWidth;
|
|
43
|
-
render(): React.ReactNode;
|
|
44
|
-
private getCSSClassNameFromFace;
|
|
45
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Cube
|
|
3
|
+
*/
|
|
4
|
+
import "./Cube.scss";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { Matrix3d } from "@itwin/core-geometry";
|
|
7
|
+
import { CommonProps } from "@itwin/core-react";
|
|
8
|
+
/** Cube Face enumeration
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare enum Face {
|
|
12
|
+
None = "",
|
|
13
|
+
Left = "left",
|
|
14
|
+
Right = "right",
|
|
15
|
+
Back = "back",
|
|
16
|
+
Front = "front",
|
|
17
|
+
Bottom = "bottom",
|
|
18
|
+
Top = "top"
|
|
19
|
+
}
|
|
20
|
+
/** Properties for the [[Cube]] React component
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export interface CubeProps extends React.AllHTMLAttributes<HTMLDivElement>, CommonProps {
|
|
24
|
+
faces?: {
|
|
25
|
+
[key: string]: React.ReactNode;
|
|
26
|
+
};
|
|
27
|
+
rotMatrix: Matrix3d;
|
|
28
|
+
}
|
|
29
|
+
/** Cube React component used by the 3d Cube Navigation Aid
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export declare class Cube extends React.PureComponent<CubeProps> {
|
|
33
|
+
render(): React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
export interface CubeFaceProps extends React.AllHTMLAttributes<HTMLDivElement> {
|
|
37
|
+
rotMatrix: Matrix3d;
|
|
38
|
+
face: Face;
|
|
39
|
+
}
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare class CubeFace extends React.Component<CubeFaceProps> {
|
|
42
|
+
private _faceWidth;
|
|
43
|
+
render(): React.ReactNode;
|
|
44
|
+
private getCSSClassNameFromFace;
|
|
45
|
+
}
|
|
46
46
|
//# sourceMappingURL=Cube.d.ts.map
|