@sendoutcards/quantum-design-ui 1.7.67 → 1.7.68
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/dist/index.es.js +12 -11
- package/package.json +1 -1
- package/dist/src/atoms/companion/companion.d.ts +0 -17
package/dist/index.es.js
CHANGED
|
@@ -19676,20 +19676,20 @@ var DropperIcon = function (props) {
|
|
|
19676
19676
|
};
|
|
19677
19677
|
|
|
19678
19678
|
var QuantumColorPicker = function (_a) {
|
|
19679
|
-
var _b;
|
|
19679
|
+
var _b, _c, _d;
|
|
19680
19680
|
|
|
19681
19681
|
var color = _a.color,
|
|
19682
19682
|
onChange = _a.onChange,
|
|
19683
19683
|
convertedColorCallback = _a.convertedColorCallback,
|
|
19684
|
-
|
|
19685
|
-
convertedColorType =
|
|
19686
|
-
|
|
19687
|
-
showEyeDropper =
|
|
19684
|
+
_e = _a.convertedColorType,
|
|
19685
|
+
convertedColorType = _e === void 0 ? 'hex' : _e,
|
|
19686
|
+
_f = _a.showEyeDropper,
|
|
19687
|
+
showEyeDropper = _f === void 0 ? false : _f,
|
|
19688
19688
|
palette = _a.palette;
|
|
19689
19689
|
|
|
19690
|
-
var
|
|
19691
|
-
ref =
|
|
19692
|
-
width =
|
|
19690
|
+
var _g = useResizeObserver(),
|
|
19691
|
+
ref = _g.ref,
|
|
19692
|
+
width = _g.width;
|
|
19693
19693
|
|
|
19694
19694
|
var formattedHexValue = function (value) {
|
|
19695
19695
|
return value.startsWith('#') ? value : "#" + value;
|
|
@@ -19722,6 +19722,7 @@ var QuantumColorPicker = function (_a) {
|
|
|
19722
19722
|
}
|
|
19723
19723
|
};
|
|
19724
19724
|
|
|
19725
|
+
var paletteArray = (_b = palette === null || palette === void 0 ? void 0 : palette.colors) !== null && _b !== void 0 ? _b : Array.from(Array((_c = palette === null || palette === void 0 ? void 0 : palette.count) !== null && _c !== void 0 ? _c : 12));
|
|
19725
19726
|
return jsx(Div, {
|
|
19726
19727
|
inset: "x2",
|
|
19727
19728
|
display: "flex",
|
|
@@ -19759,11 +19760,11 @@ var QuantumColorPicker = function (_a) {
|
|
|
19759
19760
|
return handleOnChange(formattedHexValue(value));
|
|
19760
19761
|
},
|
|
19761
19762
|
type: "text"
|
|
19762
|
-
})), palette && palette.colors && jsx(React.Fragment, null, jsx(Spacer, {
|
|
19763
|
+
})), (palette && palette.colors || (palette === null || palette === void 0 ? void 0 : palette.isLoading)) && jsx(React.Fragment, null, jsx(Spacer, {
|
|
19763
19764
|
space: "x1"
|
|
19764
19765
|
}), jsx(Text, {
|
|
19765
19766
|
type: "caption",
|
|
19766
|
-
content: (
|
|
19767
|
+
content: (_d = palette.title) !== null && _d !== void 0 ? _d : 'Presets',
|
|
19767
19768
|
color: "primaryBody",
|
|
19768
19769
|
lineHeight: 1.2,
|
|
19769
19770
|
inset: {
|
|
@@ -19781,7 +19782,7 @@ var QuantumColorPicker = function (_a) {
|
|
|
19781
19782
|
inset: {
|
|
19782
19783
|
bottom: '6px'
|
|
19783
19784
|
}
|
|
19784
|
-
},
|
|
19785
|
+
}, paletteArray.map(function (paletteColor, index) {
|
|
19785
19786
|
return jsx(ColorThumbnail, {
|
|
19786
19787
|
key: index,
|
|
19787
19788
|
isRounded: true,
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { HOCBaseProps } from "../../helpers/hoc-types/hocBasePropTypes";
|
|
3
|
-
import { HOCMotionProps } from "../../helpers/hoc-types/hocMotionTypes";
|
|
4
|
-
export declare type DivProps = {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
outsideClick?: () => void;
|
|
7
|
-
clickElementBypass?: string;
|
|
8
|
-
} & HOCBaseProps & HOCMotionProps;
|
|
9
|
-
export declare const Companion: React.ForwardRefExoticComponent<{
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
outsideClick?: (() => void) | undefined;
|
|
12
|
-
clickElementBypass?: string | undefined;
|
|
13
|
-
} & HOCBaseProps & {
|
|
14
|
-
className?: string | undefined;
|
|
15
|
-
motionKey?: string | number | undefined;
|
|
16
|
-
id?: string | undefined;
|
|
17
|
-
} & import("framer-motion").MotionProps & React.RefAttributes<HTMLDivElement>>;
|