gantri-components 2.258.0 → 2.259.0
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/components/color-picker/color-picker.types.d.ts +6 -0
- package/dist/components/color-picker/components/color-picker-item/color-picker-item.styles.d.ts +2 -3
- package/dist/components/color-picker/components/color-picker-item/color-picker-item.types.d.ts +3 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
|
@@ -25,6 +25,12 @@ export interface ColorPickerProps extends Partial<ColorPickerDefaultProps> {
|
|
|
25
25
|
export interface ColorPickerDefaultProps {
|
|
26
26
|
allowDeselecting: boolean;
|
|
27
27
|
allowMultipleSelection: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* When `true`, `disabled` colors collapse to a small centered dot (e.g. a
|
|
30
|
+
* "Creator's choice" view). When `false` (default) they keep their full size
|
|
31
|
+
* but stay non-selectable (e.g. an "All colors" view). The change animates.
|
|
32
|
+
*/
|
|
33
|
+
collapseDisabled: boolean;
|
|
28
34
|
/** List of colors to render. Defaults to Gantri's product colors list. */
|
|
29
35
|
colors: ColorDetails[];
|
|
30
36
|
/**
|
package/dist/components/color-picker/components/color-picker-item/color-picker-item.styles.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { CSSProperties } from 'styled-components';
|
|
|
4
4
|
import { ColorPickerVariantProp } from '../../color-picker.types';
|
|
5
5
|
import { ProductColorCode } from '../../../../styles/theme';
|
|
6
6
|
interface StyledColorOutlineProps {
|
|
7
|
+
$collapsed?: boolean;
|
|
7
8
|
$disabled?: boolean;
|
|
8
9
|
$isClickable: boolean;
|
|
9
10
|
$selected?: boolean;
|
|
@@ -11,9 +12,6 @@ interface StyledColorOutlineProps {
|
|
|
11
12
|
$variant?: ColorPickerVariantProp;
|
|
12
13
|
}
|
|
13
14
|
export declare const StyledColorOutline: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledColorOutlineProps>> & string;
|
|
14
|
-
export declare const StyledDisabledDot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
15
|
-
color: ProductColorCode;
|
|
16
|
-
}>> & string;
|
|
17
15
|
export declare const StyledColor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react-spring").AnimatedProps<{
|
|
18
16
|
hidden?: boolean | undefined;
|
|
19
17
|
color?: string | undefined;
|
|
@@ -1133,6 +1131,7 @@ export declare const StyledColor: import("styled-components/dist/types").IStyled
|
|
|
1133
1131
|
scrollLeft?: number | import("@react-spring/shared/dist/declarations/src/fluids").FluidValue<number, any> | undefined;
|
|
1134
1132
|
viewBox?: string | import("@react-spring/shared/dist/declarations/src/fluids").FluidValue<string, any> | undefined;
|
|
1135
1133
|
}, {
|
|
1134
|
+
$collapsed?: boolean | undefined;
|
|
1136
1135
|
color: ProductColorCode;
|
|
1137
1136
|
}>> & string & Omit<import("react-spring").AnimatedComponent<"span">, keyof import("react").Component<any, {}, any>>;
|
|
1138
1137
|
export {};
|
package/dist/components/color-picker/components/color-picker-item/color-picker-item.types.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ import { CSSProperties } from 'styled-components';
|
|
|
2
2
|
import { ColorDetails, ColorPickerVariantProp } from '../../color-picker.types';
|
|
3
3
|
export interface ColorPickerItemProps extends Partial<ColorPickerItemDefaultProps> {
|
|
4
4
|
active?: boolean;
|
|
5
|
+
/** When true (with `disabled`), collapse the swatch to a small centered dot. */
|
|
6
|
+
collapseDisabled?: boolean;
|
|
5
7
|
color: ColorDetails;
|
|
6
|
-
/** Not selectable
|
|
8
|
+
/** Not selectable. Collapses to a small centered dot when `collapseDisabled`. */
|
|
7
9
|
disabled?: boolean;
|
|
8
10
|
onColorClick?: (color: ColorDetails) => void;
|
|
9
11
|
readOnly?: boolean;
|