@synerise/ds-color-picker 1.1.0 → 1.1.2
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 +19 -0
- package/dist/ColorPicker.d.ts +2 -2
- package/dist/ColorPicker.js +5 -2
- package/dist/ColorPicker.styles.js +1 -1
- package/dist/ColorPicker.types.d.ts +3 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.1.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-color-picker@1.1.1...@synerise/ds-color-picker@1.1.2) (2025-03-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-color-picker
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-color-picker@1.1.0...@synerise/ds-color-picker@1.1.1) (2025-03-26)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **color-picker:** adjust styles, add getPopupContainer ([026303b](https://github.com/Synerise/synerise-design/commit/026303bbf056504eaa42af7c3bf279e0bd59b89a))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [1.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-color-picker@1.0.0...@synerise/ds-color-picker@1.1.0) (2025-03-18)
|
|
7
26
|
|
|
8
27
|
|
package/dist/ColorPicker.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ColorPickerProps } from './ColorPicker.types';
|
|
3
|
-
declare const ColorPicker: ({ maxWidth, value, onChange, colors, onSaveColors, infix, placeholder, inputProps, maxSavedColors, tooltip, isShownSavedColors, size, errorText, description, }: ColorPickerProps) => JSX.Element;
|
|
3
|
+
declare const ColorPicker: ({ maxWidth, value, onChange, colors, onSaveColors, infix, getPopupContainer, placeholder, inputProps, maxSavedColors, tooltip, isShownSavedColors, size, errorText, description, }: ColorPickerProps) => React.JSX.Element;
|
|
4
4
|
export default ColorPicker;
|
package/dist/ColorPicker.js
CHANGED
|
@@ -7,7 +7,7 @@ import Icon, { FormulaPlusM, CopyClipboardM } from '@synerise/ds-icon';
|
|
|
7
7
|
import copy from 'copy-to-clipboard';
|
|
8
8
|
import Tooltip from '@synerise/ds-tooltip';
|
|
9
9
|
import Dropdown from '@synerise/ds-dropdown';
|
|
10
|
-
import { useOnClickOutside } from '@synerise/ds-utils';
|
|
10
|
+
import { useOnClickOutside, getPopupContainer as defaultGetPopupContainer } from '@synerise/ds-utils';
|
|
11
11
|
import { isValidHexColor, isValidTextColor, convert3DigitHexTo6Digit, filterAlphanumeric, standardizeColor } from './utils';
|
|
12
12
|
import ColorPickerStyles from './ColorPicker.styles';
|
|
13
13
|
var DEFAULT_MAX_WIDTH_PICKER = 228;
|
|
@@ -23,6 +23,8 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
23
23
|
infix = _ref$infix === void 0 ? function () {
|
|
24
24
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
25
25
|
} : _ref$infix,
|
|
26
|
+
_ref$getPopupContaine = _ref.getPopupContainer,
|
|
27
|
+
getPopupContainer = _ref$getPopupContaine === void 0 ? defaultGetPopupContainer : _ref$getPopupContaine,
|
|
26
28
|
placeholder = _ref.placeholder,
|
|
27
29
|
inputProps = _ref.inputProps,
|
|
28
30
|
_ref$maxSavedColors = _ref.maxSavedColors,
|
|
@@ -191,7 +193,8 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
191
193
|
},
|
|
192
194
|
visible: dropdownVisible,
|
|
193
195
|
overlay: dropdown,
|
|
194
|
-
placement: "bottomLeft"
|
|
196
|
+
placement: "bottomLeft",
|
|
197
|
+
getPopupContainer: getPopupContainer
|
|
195
198
|
}, /*#__PURE__*/React.createElement(ColorPickerStyles.ColorPickerSelect, _extends({
|
|
196
199
|
"data-testid": "color-picker",
|
|
197
200
|
prefix: /*#__PURE__*/React.createElement(ColorPickerStyles.ColorTag, {
|
|
@@ -16,7 +16,7 @@ var SIZE_DEFAULT = 168;
|
|
|
16
16
|
var Container = styled.div.withConfig({
|
|
17
17
|
displayName: "ColorPickerstyles__Container",
|
|
18
18
|
componentId: "sc-1iu8b6j-1"
|
|
19
|
-
})(["width:100%;@media (min-width:200px){min-width:200px;
|
|
19
|
+
})(["width:100%;@media (min-width:200px){min-width:200px;background-color:", ";}.react-colorful__last-control{margin:24px 56px 8px 17px;border-radius:4px;height:8px;}.react-colorful__saturation{border-bottom:0px;border-radius:4px 4px 0 0;height:96px;.react-colorful__interactive{width:100%;height:100%;}}&&& .ds-tag{width:16px;height:16px;border:1px solid ", ";margin:0 0 0 4px;&:hover{", "{display:flex;}}}.react-colorful__pointer{width:16px;height:16px;}.react-colorful{width:100%;height:", "px;}.react-colorful__hue-pointer{border:1px solid ", ";box-shadow:none !important;.react-colorful__pointer-fill{background-color:", " !important;}}.ant-divider-horizontal{margin:16px 0px;}", "{margin-bottom:-8px;}"], function (props) {
|
|
20
20
|
return props.theme.palette.white;
|
|
21
21
|
}, function (props) {
|
|
22
22
|
return props.theme.palette['grey-300'];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { InputProps } from 'antd/lib/input';
|
|
3
|
+
import { DropdownProps } from '@synerise/ds-dropdown';
|
|
3
4
|
export type ColorHookType = {
|
|
4
5
|
color: string;
|
|
5
6
|
setColor: (color: string) => void;
|
|
@@ -9,7 +10,7 @@ export declare enum ColorPickerSize {
|
|
|
9
10
|
'M' = 168,
|
|
10
11
|
'L' = 200
|
|
11
12
|
}
|
|
12
|
-
export
|
|
13
|
+
export type ColorPickerProps = {
|
|
13
14
|
maxWidth?: number;
|
|
14
15
|
value?: string;
|
|
15
16
|
onChange?: (color: string) => void;
|
|
@@ -30,4 +31,4 @@ export interface ColorPickerProps extends Partial<Pick<HTMLInputElement, 'placeh
|
|
|
30
31
|
size?: 'S' | 'M' | 'L';
|
|
31
32
|
errorText?: string;
|
|
32
33
|
description?: string;
|
|
33
|
-
}
|
|
34
|
+
} & Partial<Pick<HTMLInputElement, 'placeholder'>> & Partial<Pick<DropdownProps, 'getPopupContainer'>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-color-picker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Color-Picker Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.1.
|
|
38
|
-
"@synerise/ds-divider": "^1.0.
|
|
39
|
-
"@synerise/ds-dropdown": "^1.0.
|
|
40
|
-
"@synerise/ds-icon": "^1.0
|
|
41
|
-
"@synerise/ds-input": "^1.0.
|
|
42
|
-
"@synerise/ds-tags": "^1.1.
|
|
43
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
37
|
+
"@synerise/ds-button": "^1.1.2",
|
|
38
|
+
"@synerise/ds-divider": "^1.0.3",
|
|
39
|
+
"@synerise/ds-dropdown": "^1.0.3",
|
|
40
|
+
"@synerise/ds-icon": "^1.2.0",
|
|
41
|
+
"@synerise/ds-input": "^1.0.3",
|
|
42
|
+
"@synerise/ds-tags": "^1.1.2",
|
|
43
|
+
"@synerise/ds-tooltip": "^1.1.2",
|
|
44
44
|
"@synerise/ds-utils": "^1.0.1",
|
|
45
45
|
"copy-to-clipboard": "^3.3.1",
|
|
46
46
|
"react-colorful": "^5.2.0"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react": ">=16.9.0 <= 18.3.1",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "5438445467b16dbc0c2ca97d969ae0e09b74131b"
|
|
55
55
|
}
|