@synerise/ds-color-picker 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/ColorPicker.d.ts +2 -2
- package/dist/ColorPicker.js +5 -2
- package/dist/ColorPicker.styles.d.ts +2 -12
- package/dist/ColorPicker.styles.js +1 -2
- package/dist/ColorPicker.types.d.ts +3 -2
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **color-picker:** adjust styles, add getPopupContainer ([026303b](https://github.com/Synerise/synerise-design/commit/026303bbf056504eaa42af7c3bf279e0bd59b89a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **button:** add support for tag in button ([32b6956](https://github.com/Synerise/synerise-design/commit/32b6956d5e1f46df03abb4de8fbaf0a7d487043e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [0.4.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-color-picker@0.4.8...@synerise/ds-color-picker@0.4.9) (2025-03-10)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @synerise/ds-color-picker
|
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, {
|
|
@@ -3,12 +3,7 @@ import Button from '@synerise/ds-button';
|
|
|
3
3
|
export declare const TagDot: import("styled-components").StyledComponent<"div", any, {
|
|
4
4
|
pressed?: boolean | undefined;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const ColorTag: import("styled-components").StyledComponent<{
|
|
7
|
-
({ id, name, className, disabled, removable, image, shape, color, textColor, onRemove, onClick, prefixel, suffixel, texts, asPill, dashed, ...htmlAttributes }: import("@synerise/ds-tags/dist/Tag/Tag.types").TagProps): import("react").JSX.Element;
|
|
8
|
-
defaultProps: {
|
|
9
|
-
shape: import("@synerise/ds-tags").TagShape;
|
|
10
|
-
};
|
|
11
|
-
}, any, {}, never>;
|
|
6
|
+
export declare const ColorTag: import("styled-components").StyledComponent<({ id, name, className, disabled, removable, image, shape, color, textColor, onRemove, onClick, prefixel, suffixel, texts, asPill, dashed, ...htmlAttributes }: import("@synerise/ds-tags").TagProps) => import("react").JSX.Element, any, {}, never>;
|
|
12
7
|
export declare const AddColorButton: import("styled-components").StyledComponent<typeof Button, any, {}, never>;
|
|
13
8
|
export declare const CopyIcon: import("styled-components").StyledComponent<({ name, component, className, ...rest }: import("@synerise/ds-icon").IconProps) => import("react").JSX.Element, any, {}, never>;
|
|
14
9
|
export declare const ColorPickerInput: import("styled-components").StyledComponent<({ className, errorText, label, description, counterLimit, tooltip, tooltipConfig, icon1, icon1Tooltip, autoResize, icon2, icon2Tooltip, resetMargin, handleInputRef, prefixel, suffixel, error, expandable, expandableTooltip, renderCustomCounter, ...antdInputProps }: import("@synerise/ds-input").InputProps) => import("react").JSX.Element, any, {}, never>;
|
|
@@ -30,12 +25,7 @@ declare const _default: {
|
|
|
30
25
|
SubContainer: import("styled-components").StyledComponent<"div", any, {
|
|
31
26
|
savedColors?: boolean | undefined;
|
|
32
27
|
}, never>;
|
|
33
|
-
ColorTag: import("styled-components").StyledComponent<{
|
|
34
|
-
({ id, name, className, disabled, removable, image, shape, color, textColor, onRemove, onClick, prefixel, suffixel, texts, asPill, dashed, ...htmlAttributes }: import("@synerise/ds-tags/dist/Tag/Tag.types").TagProps): import("react").JSX.Element;
|
|
35
|
-
defaultProps: {
|
|
36
|
-
shape: import("@synerise/ds-tags").TagShape;
|
|
37
|
-
};
|
|
38
|
-
}, any, {}, never>;
|
|
28
|
+
ColorTag: import("styled-components").StyledComponent<({ id, name, className, disabled, removable, image, shape, color, textColor, onRemove, onClick, prefixel, suffixel, texts, asPill, dashed, ...htmlAttributes }: import("@synerise/ds-tags").TagProps) => import("react").JSX.Element, any, {}, never>;
|
|
39
29
|
PrefixTag: import("styled-components").StyledComponent<"div", any, {
|
|
40
30
|
height?: boolean | undefined;
|
|
41
31
|
size?: "S" | "M" | "L" | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled, { createGlobalStyle } from 'styled-components';
|
|
2
|
-
// @ts-ignore
|
|
3
2
|
import { TagsStyles, Tag } from '@synerise/ds-tags';
|
|
4
3
|
import Button from '@synerise/ds-button';
|
|
5
4
|
import Icon from '@synerise/ds-icon';
|
|
@@ -17,7 +16,7 @@ var SIZE_DEFAULT = 168;
|
|
|
17
16
|
var Container = styled.div.withConfig({
|
|
18
17
|
displayName: "ColorPickerstyles__Container",
|
|
19
18
|
componentId: "sc-1iu8b6j-1"
|
|
20
|
-
})(["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) {
|
|
21
20
|
return props.theme.palette.white;
|
|
22
21
|
}, function (props) {
|
|
23
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.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Color-Picker Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.
|
|
38
|
-
"@synerise/ds-divider": "^1.0.
|
|
39
|
-
"@synerise/ds-dropdown": "^1.0.
|
|
40
|
-
"@synerise/ds-icon": "^1.
|
|
41
|
-
"@synerise/ds-input": "^1.0.
|
|
42
|
-
"@synerise/ds-tags": "^1.
|
|
43
|
-
"@synerise/ds-tooltip": "^1.
|
|
44
|
-
"@synerise/ds-utils": "^1.0.
|
|
37
|
+
"@synerise/ds-button": "^1.1.1",
|
|
38
|
+
"@synerise/ds-divider": "^1.0.2",
|
|
39
|
+
"@synerise/ds-dropdown": "^1.0.2",
|
|
40
|
+
"@synerise/ds-icon": "^1.1.0",
|
|
41
|
+
"@synerise/ds-input": "^1.0.2",
|
|
42
|
+
"@synerise/ds-tags": "^1.1.1",
|
|
43
|
+
"@synerise/ds-tooltip": "^1.1.1",
|
|
44
|
+
"@synerise/ds-utils": "^1.0.1",
|
|
45
45
|
"copy-to-clipboard": "^3.3.1",
|
|
46
46
|
"react-colorful": "^5.2.0"
|
|
47
47
|
},
|
|
@@ -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": "47960dcd849dc47c85bd134bcfeb90a5505656a7"
|
|
55
55
|
}
|