@itwin/imodel-components-react 4.0.0-dev.15 → 4.0.0-dev.17

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.
Files changed (172) hide show
  1. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  2. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +2 -2
  3. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +1 -1
  4. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  5. package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +63 -63
  6. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  7. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
  8. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  9. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  10. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -62
  11. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  12. package/lib/cjs/imodel-components-react/color/HueSlider.scss +61 -61
  13. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  14. package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +35 -35
  15. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  16. package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -22
  17. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  18. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  19. package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
  20. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  21. package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
  22. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  23. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  24. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
  25. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  26. package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
  27. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  28. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
  29. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  30. package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
  31. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +0 -21
  32. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  33. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +1 -25
  34. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  35. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
  36. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  37. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
  38. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  39. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
  40. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  41. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  43. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  44. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  45. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  46. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  47. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  48. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  49. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  50. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  51. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  52. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  53. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  54. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  55. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  56. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  57. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  58. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  59. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  60. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
  61. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  62. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -28
  63. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  64. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -105
  65. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  66. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -359
  67. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  68. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  69. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
  70. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  71. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +177 -177
  72. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +0 -29
  73. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  74. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  75. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  76. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  77. package/lib/cjs/imodel-components-react.d.ts +0 -1
  78. package/lib/cjs/imodel-components-react.d.ts.map +1 -1
  79. package/lib/cjs/imodel-components-react.js +0 -1
  80. package/lib/cjs/imodel-components-react.js.map +1 -1
  81. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  82. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +2 -2
  83. package/lib/esm/imodel-components-react/color/AlphaSlider.js +1 -1
  84. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  85. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
  86. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  87. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
  88. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  89. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  90. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -62
  91. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  92. package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
  93. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  94. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
  95. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  96. package/lib/esm/imodel-components-react/color/Swatch.scss +22 -22
  97. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  98. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  99. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
  100. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  101. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
  102. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  103. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  104. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
  105. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  106. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
  107. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  108. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
  109. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  110. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
  111. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +0 -21
  112. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  113. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +0 -24
  114. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  115. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
  116. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  117. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
  118. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  119. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
  120. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  121. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  122. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  123. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  124. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  125. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  126. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  127. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  128. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  129. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  130. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  131. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  132. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  133. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  134. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  135. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  136. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  137. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  138. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  139. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  140. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
  141. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  142. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -28
  143. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  144. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -105
  145. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  146. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -359
  147. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  148. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  149. package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
  150. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  151. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +177 -177
  152. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +0 -29
  153. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  154. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  155. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  156. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  157. package/lib/esm/imodel-components-react.d.ts +0 -1
  158. package/lib/esm/imodel-components-react.d.ts.map +1 -1
  159. package/lib/esm/imodel-components-react.js +0 -1
  160. package/lib/esm/imodel-components-react.js.map +1 -1
  161. package/lib/public/locales/en/UiIModelComponents.json +139 -139
  162. package/package.json +5 -5
  163. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
  164. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
  165. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +0 -150
  166. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
  167. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +0 -94
  168. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
  169. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
  170. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +0 -123
  171. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
  172. package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +0 -94
@@ -1,94 +0,0 @@
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/index";
6
-
7
- $hovered-icon-color: $buic-foreground-primary-tone;
8
- $saturation-hue-height: 150px;
9
-
10
- .components-colorpicker-panel {
11
- display: flex;
12
- flex-direction: column;
13
-
14
- .components-colorpicker-panel-color {
15
- display: flex;
16
- flex-direction: row;
17
- height: 100%;
18
- column-gap: 20px;
19
-
20
- .components-colorpicker-saturation {
21
- margin: 1em;
22
- display: block;
23
- width: calc(100% - 40px);
24
- height: $saturation-hue-height;
25
- }
26
-
27
- .components-hue-container-vertical {
28
- height: $saturation-hue-height;
29
- margin-top: 1em;
30
- margin-right: .5em;
31
- }
32
- }
33
-
34
- .components-color-swatch {
35
- width: 2.0em;
36
- height: 2.0em;
37
- }
38
- }
39
-
40
- .components-colorpicker-panel-presets {
41
- width: 100%;
42
- height: 100%;
43
- padding-top: 10px;
44
- margin-top: 10px;
45
- margin-bottom: 10px;
46
- display: grid;
47
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
48
- column-gap: 2px;
49
- row-gap: 10px;
50
- border-top: 1px solid var(--iui-color-border-foreground);
51
- justify-items: center;
52
-
53
- .components-colorpicker-panel-swatch {
54
- width: 2em;
55
- height: 2em;
56
- padding: 0;
57
- border-color: var(--iui-color-border-foreground);
58
- }
59
- }
60
-
61
- .components-colorpicker-popup-panel-padding {
62
- display: flex;
63
- flex-direction: column;
64
-
65
- button.core-dialog-close {
66
- margin-left: auto;
67
- background: transparent;
68
- border: none;
69
- color: var(--buic-foreground-body);
70
- }
71
- }
72
-
73
- .components-colorpicker-input-panel {
74
- display: flex;
75
- flex-direction: row;
76
- align-items: center;
77
- justify-content: space-evenly;
78
-
79
- .components-colorpicker-input-value-wrapper {
80
- align-items: center;
81
- display: flex;
82
- flex-direction: row;
83
- gap: 4px;
84
-
85
- .uicore-inputs-labeled-input {
86
- text-align: right;
87
- margin: 0;
88
- }
89
-
90
- .core-number-input-container {
91
- width: 54px;
92
- }
93
- }
94
- }
@@ -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,123 +0,0 @@
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 Color
7
- */
8
- // cSpell:ignore colorpicker
9
- import * as React from "react";
10
- import { ColorDef } from "@itwin/core-common";
11
- import { ColorSwatch } from "./Swatch";
12
- import { HueSlider } from "./HueSlider";
13
- import { SaturationPicker } from "./SaturationPicker";
14
- import "./ColorPickerPanel.scss";
15
- import { NumberInput } from "@itwin/core-react";
16
- /**
17
- * Color Picker Dialog to use as modal dialog.
18
- * @public @deprecated in 3.0. Use `ColorPicker` for itwinui-react
19
- */
20
- // istanbul ignore next
21
- export function ColorPickerPanel({ activeColor, onColorChange, colorPresets, colorInputType }) {
22
- const handlePresetColorPick = React.useCallback((newColor, e) => {
23
- e.preventDefault();
24
- if (onColorChange) {
25
- onColorChange(newColor);
26
- }
27
- }, [onColorChange]);
28
- const handleHueChange = React.useCallback((newHsvColor) => {
29
- // for a ColorDef to be created from hsv s can't be 0
30
- if (newHsvColor.s === 0) {
31
- newHsvColor = newHsvColor.clone(undefined, 0.5);
32
- }
33
- const newColorDef = newHsvColor.toColorDef();
34
- if (onColorChange) {
35
- onColorChange(newColorDef);
36
- }
37
- }, [onColorChange]);
38
- const handleSaturationChange = React.useCallback((newHsvColor) => {
39
- const newColorDef = newHsvColor.toColorDef();
40
- if (onColorChange) {
41
- onColorChange(newColorDef);
42
- }
43
- }, [onColorChange]);
44
- const currentHsl = React.useMemo(() => activeColor.toHSL(), [activeColor]);
45
- const currentHsv = React.useMemo(() => activeColor.toHSV(), [activeColor]);
46
- const color = React.useMemo(() => activeColor.colors, [activeColor]);
47
- const handleLightnessValueChange = React.useCallback((value, _stringValue) => {
48
- const newHsl = currentHsl.clone(undefined, undefined, (value ?? 0) / 100);
49
- if (onColorChange) {
50
- const newColorDef = newHsl.toColorDef();
51
- onColorChange(newColorDef);
52
- }
53
- }, [currentHsl, onColorChange]);
54
- const handleHueValueChange = React.useCallback((value, _stringValue) => {
55
- const newHsl = currentHsl.clone((value ?? 0) / 360, undefined, undefined);
56
- if (onColorChange) {
57
- const newColorDef = newHsl.toColorDef();
58
- onColorChange(newColorDef);
59
- }
60
- }, [currentHsl, onColorChange]);
61
- const handleSaturationValueChange = React.useCallback((value, _stringValue) => {
62
- const newHsl = currentHsl.clone(undefined, (value ?? 0) / 100, undefined);
63
- if (onColorChange) {
64
- const newColorDef = newHsl.toColorDef();
65
- onColorChange(newColorDef);
66
- }
67
- }, [currentHsl, onColorChange]);
68
- const handleRedChange = React.useCallback((value, _stringValue) => {
69
- if (undefined !== value) {
70
- const newColorDef = ColorDef.from(value, color.g, color.b);
71
- if (onColorChange) {
72
- onColorChange(newColorDef);
73
- }
74
- }
75
- }, [color, onColorChange]);
76
- const handleGreenChange = React.useCallback((value, _stringValue) => {
77
- if (undefined !== value) {
78
- const newColorDef = ColorDef.from(color.r, value, color.b);
79
- if (onColorChange) {
80
- onColorChange(newColorDef);
81
- }
82
- }
83
- }, [color, onColorChange]);
84
- const handleBlueChange = React.useCallback((value, _stringValue) => {
85
- if (undefined !== value) {
86
- const newColorDef = ColorDef.from(color.r, color.g, value);
87
- if (onColorChange) {
88
- onColorChange(newColorDef);
89
- }
90
- }
91
- }, [color, onColorChange]);
92
- return (React.createElement("div", { "data-testid": "components-colorpicker-panel", className: "components-colorpicker-panel" },
93
- React.createElement("div", { className: "components-colorpicker-panel-color" },
94
- React.createElement("div", { className: "components-colorpicker-saturation" },
95
- React.createElement(SaturationPicker, { hsv: currentHsv, onSaturationChange: handleSaturationChange })),
96
- React.createElement("div", { className: "components-colorpicker-hue" },
97
- React.createElement(HueSlider, { hsv: currentHsv, onHueChange: handleHueChange, isHorizontal: false }))),
98
- (colorInputType === "RGB") &&
99
- React.createElement("div", { "data-testid": "components-colorpicker-input-panel", className: "components-colorpicker-input-panel" },
100
- React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
101
- React.createElement("span", { className: "uicore-inputs-labeled-input" }, "R"),
102
- React.createElement(NumberInput, { "data-testid": "components-colorpicker-input-value-red", value: color.r, onChange: handleRedChange, min: 0, max: 255 })),
103
- React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
104
- React.createElement("span", { className: "uicore-inputs-labeled-input" }, "G"),
105
- React.createElement(NumberInput, { "data-testid": "components-colorpicker-input-value-green", value: color.g, onChange: handleGreenChange, min: 0, max: 255 })),
106
- React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
107
- React.createElement("span", { className: "uicore-inputs-labeled-input" }, "B"),
108
- React.createElement(NumberInput, { "data-testid": "components-colorpicker-input-value-blue", value: color.b, onChange: handleBlueChange, min: 0, max: 255 }))),
109
- (colorInputType === "HSL") &&
110
- React.createElement("div", { "data-testid": "components-colorpicker-input-panel", className: "components-colorpicker-input-panel" },
111
- React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
112
- React.createElement("span", { className: "uicore-inputs-labeled-input" }, "H"),
113
- React.createElement(NumberInput, { "data-testid": "components-colorpicker-input-value-hue", value: Math.round(currentHsl.h * 360), onChange: handleHueValueChange, min: 0, max: 360 })),
114
- React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
115
- React.createElement("span", { className: "uicore-inputs-labeled-input" }, "S"),
116
- React.createElement(NumberInput, { "data-testid": "components-colorpicker-input-value-saturation", value: Math.round(currentHsl.s * 100), onChange: handleSaturationValueChange, min: 0, max: 100 })),
117
- React.createElement("div", { className: "components-colorpicker-input-value-wrapper" },
118
- React.createElement("span", { className: "uicore-inputs-labeled-input" }, "L"),
119
- React.createElement(NumberInput, { "data-testid": "components-colorpicker-input-value-lightness", value: Math.round(currentHsl.l * 100), onChange: handleLightnessValueChange, min: 0, max: 100 }))),
120
- colorPresets && colorPresets.length &&
121
- React.createElement("div", { className: "components-colorpicker-panel-presets" }, colorPresets.map((preset, index) => React.createElement(ColorSwatch, { className: "components-colorpicker-panel-swatch", key: index, colorDef: preset, round: false, onColorPick: handlePresetColorPick })))));
122
- }
123
- //# sourceMappingURL=ColorPickerPanel.js.map
@@ -1 +0,0 @@
1
- {"version":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AG,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,WAAW,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","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"]}
@@ -1,94 +0,0 @@
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/index";
6
-
7
- $hovered-icon-color: $buic-foreground-primary-tone;
8
- $saturation-hue-height: 150px;
9
-
10
- .components-colorpicker-panel {
11
- display: flex;
12
- flex-direction: column;
13
-
14
- .components-colorpicker-panel-color {
15
- display: flex;
16
- flex-direction: row;
17
- height: 100%;
18
- column-gap: 20px;
19
-
20
- .components-colorpicker-saturation {
21
- margin: 1em;
22
- display: block;
23
- width: calc(100% - 40px);
24
- height: $saturation-hue-height;
25
- }
26
-
27
- .components-hue-container-vertical {
28
- height: $saturation-hue-height;
29
- margin-top: 1em;
30
- margin-right: .5em;
31
- }
32
- }
33
-
34
- .components-color-swatch {
35
- width: 2.0em;
36
- height: 2.0em;
37
- }
38
- }
39
-
40
- .components-colorpicker-panel-presets {
41
- width: 100%;
42
- height: 100%;
43
- padding-top: 10px;
44
- margin-top: 10px;
45
- margin-bottom: 10px;
46
- display: grid;
47
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
48
- column-gap: 2px;
49
- row-gap: 10px;
50
- border-top: 1px solid var(--iui-color-border-foreground);
51
- justify-items: center;
52
-
53
- .components-colorpicker-panel-swatch {
54
- width: 2em;
55
- height: 2em;
56
- padding: 0;
57
- border-color: var(--iui-color-border-foreground);
58
- }
59
- }
60
-
61
- .components-colorpicker-popup-panel-padding {
62
- display: flex;
63
- flex-direction: column;
64
-
65
- button.core-dialog-close {
66
- margin-left: auto;
67
- background: transparent;
68
- border: none;
69
- color: var(--buic-foreground-body);
70
- }
71
- }
72
-
73
- .components-colorpicker-input-panel {
74
- display: flex;
75
- flex-direction: row;
76
- align-items: center;
77
- justify-content: space-evenly;
78
-
79
- .components-colorpicker-input-value-wrapper {
80
- align-items: center;
81
- display: flex;
82
- flex-direction: row;
83
- gap: 4px;
84
-
85
- .uicore-inputs-labeled-input {
86
- text-align: right;
87
- margin: 0;
88
- }
89
-
90
- .core-number-input-container {
91
- width: 54px;
92
- }
93
- }
94
- }