@dextinity/admin-color-picker 2.0.0-canary-20260729062014
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/LICENSE +24 -0
- package/lib/ColorField.d.ts +5 -0
- package/lib/ColorField.d.ts.map +1 -0
- package/lib/ColorField.js +17 -0
- package/lib/ColorPicker.d.ts +47 -0
- package/lib/ColorPicker.d.ts.map +1 -0
- package/lib/ColorPicker.js +198 -0
- package/lib/ColorPicker.slots.d.ts +123 -0
- package/lib/ColorPicker.slots.d.ts.map +1 -0
- package/lib/ColorPicker.slots.js +111 -0
- package/lib/FinalFormColorPicker.d.ts +12 -0
- package/lib/FinalFormColorPicker.d.ts.map +1 -0
- package/lib/FinalFormColorPicker.js +22 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +3 -0
- package/package.json +80 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, Vivid Planet Software GmbH
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
19
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type FieldProps } from "@dextinity/admin";
|
|
2
|
+
import { type FinalFormColorPickerProps } from "./FinalFormColorPicker";
|
|
3
|
+
export type ColorFieldProps = FieldProps<string, HTMLInputElement> & FinalFormColorPickerProps;
|
|
4
|
+
export declare const ColorField: ({ ...restProps }: ColorFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=ColorField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorField.d.ts","sourceRoot":"","sources":["../src/ColorField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAwB,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAE9F,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,yBAAyB,CAAC;AAE/F,eAAO,MAAM,UAAU,GAAI,kBAAkB,eAAe,4CAE3D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
8
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
9
|
+
import { Field } from "@dextinity/admin";
|
|
10
|
+
import { FinalFormColorPicker } from "./FinalFormColorPicker";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
export var ColorField = function ColorField(_ref) {
|
|
13
|
+
var restProps = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
14
|
+
return /*#__PURE__*/_jsx(Field, _objectSpread({
|
|
15
|
+
component: FinalFormColorPicker
|
|
16
|
+
}, restProps));
|
|
17
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type InputWithPopperComponents, type InputWithPopperProps } from "@dextinity/admin";
|
|
2
|
+
import { type ComponentsOverrides, type InputBaseProps } from "@mui/material";
|
|
3
|
+
import { type Theme } from "@mui/material/styles";
|
|
4
|
+
import { type ComponentType, type HTMLAttributes, type ReactNode } from "react";
|
|
5
|
+
import { type ColorPickerClassKey, type PreviewIndicatorColorProps, type PreviewIndicatorEmptyOrInvalidProps, type SlotProps } from "./ColorPicker.slots";
|
|
6
|
+
export interface ColorPickerColorPreviewProps extends Omit<HTMLAttributes<HTMLDivElement>, "color">, PreviewIndicatorColorProps {
|
|
7
|
+
}
|
|
8
|
+
export interface ColorPickerNoColorPreviewProps extends HTMLAttributes<HTMLDivElement>, PreviewIndicatorEmptyOrInvalidProps {
|
|
9
|
+
}
|
|
10
|
+
export interface ColorPickerPropsComponents extends InputWithPopperComponents {
|
|
11
|
+
ColorPickerColorPreview?: ComponentType<ColorPickerColorPreviewProps>;
|
|
12
|
+
ColorPickerInvalidPreview?: ComponentType<ColorPickerNoColorPreviewProps>;
|
|
13
|
+
ColorPickerEmptyPreview?: ComponentType<ColorPickerNoColorPreviewProps>;
|
|
14
|
+
}
|
|
15
|
+
export interface ColorPickerProps extends Omit<InputWithPopperProps, "children" | "onChange" | "value" | "components" | "slotProps"> {
|
|
16
|
+
value?: string | null;
|
|
17
|
+
onChange?: (color?: string) => void;
|
|
18
|
+
colorFormat?: "hex" | "rgba";
|
|
19
|
+
colorPalette?: string[];
|
|
20
|
+
hidePicker?: boolean;
|
|
21
|
+
hideHeader?: boolean;
|
|
22
|
+
hideFooter?: boolean;
|
|
23
|
+
fullWidth?: boolean;
|
|
24
|
+
startAdornment?: InputBaseProps["startAdornment"];
|
|
25
|
+
endAdornment?: InputBaseProps["endAdornment"];
|
|
26
|
+
required?: boolean;
|
|
27
|
+
titleText?: ReactNode;
|
|
28
|
+
clearButtonText?: ReactNode;
|
|
29
|
+
components?: ColorPickerPropsComponents;
|
|
30
|
+
slotProps?: SlotProps;
|
|
31
|
+
}
|
|
32
|
+
export declare const ColorPicker: (inProps: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
declare module "@mui/material/styles" {
|
|
34
|
+
interface ComponentNameToClassKey {
|
|
35
|
+
CometAdminColorPicker: ColorPickerClassKey;
|
|
36
|
+
}
|
|
37
|
+
interface ComponentsPropsList {
|
|
38
|
+
CometAdminColorPicker: ColorPickerProps;
|
|
39
|
+
}
|
|
40
|
+
interface Components {
|
|
41
|
+
CometAdminColorPicker?: {
|
|
42
|
+
defaultProps?: Partial<ComponentsPropsList["CometAdminColorPicker"]>;
|
|
43
|
+
styleOverrides?: ComponentsOverrides<Theme>["CometAdminColorPicker"];
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=ColorPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../src/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,yBAAyB,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAElH,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,cAAc,EAAc,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,KAAK,KAAK,EAAiB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAoB,KAAK,aAAa,EAAmB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAKxI,OAAO,EAGH,KAAK,mBAAmB,EAYxB,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EAGxC,KAAK,SAAS,EACjB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EAAE,0BAA0B;CAAG;AAClI,MAAM,WAAW,8BAA+B,SAAQ,cAAc,CAAC,cAAc,CAAC,EAAE,mCAAmC;CAAG;AAE9H,MAAM,WAAW,0BAA2B,SAAQ,yBAAyB;IACzE,uBAAuB,CAAC,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;IACtE,yBAAyB,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAC;IAC1E,uBAAuB,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAC;CAC3E;AAUD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAAC;IAChI,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,gBAAgB,4CAoKpD,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IAClC,UAAU,uBAAuB;QAC7B,qBAAqB,EAAE,mBAAmB,CAAC;KAC9C;IAED,UAAU,mBAAmB;QACzB,qBAAqB,EAAE,gBAAgB,CAAC;KAC3C;IAED,UAAU,UAAU;QAChB,qBAAqB,CAAC,EAAE;YACpB,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC,CAAC;YACrE,cAAc,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,uBAAuB,CAAC,CAAC;SACxE,CAAC;KACL;CACJ"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["classes", "value", "colorFormat", "hidePicker", "hideHeader", "hideFooter", "colorPalette", "onChange", "startAdornment", "endAdornment", "onBlur", "required", "titleText", "clearButtonText", "components", "slotProps"],
|
|
3
|
+
_excluded2 = ["ColorPickerColorPreview", "ColorPickerInvalidPreview", "ColorPickerEmptyPreview"];
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
10
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
14
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
|
+
import { ClearInputAdornment } from "@dextinity/admin";
|
|
18
|
+
import { Close } from "@dextinity/admin-icons";
|
|
19
|
+
import { Typography } from "@mui/material";
|
|
20
|
+
import { useThemeProps } from "@mui/material/styles";
|
|
21
|
+
import { useEffect, useState } from "react";
|
|
22
|
+
import { FormattedMessage } from "react-intl";
|
|
23
|
+
import tinycolor from "tinycolor2";
|
|
24
|
+
import { useDebouncedCallback } from "use-debounce";
|
|
25
|
+
import { ColorPalette, ColorPaletteItem, ColorPickerWrapper, Footer, FooterClearButton, Header, HeaderCloseButton, HeaderTitleText, HexColorPicker, InputAdornment, PopperRoot, Preview, PreviewIndicator, RgbaStringColorPicker, Root } from "./ColorPicker.slots";
|
|
26
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
var DefaultColorPreviewIndicator = function DefaultColorPreviewIndicator(_ref) {
|
|
28
|
+
var type = _ref.type,
|
|
29
|
+
color = _ref.color;
|
|
30
|
+
return /*#__PURE__*/_jsx(PreviewIndicator, {
|
|
31
|
+
ownerState: {
|
|
32
|
+
type: type,
|
|
33
|
+
color: color
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var DefaultNoColorPreviewIndicator = function DefaultNoColorPreviewIndicator(_ref2) {
|
|
38
|
+
var type = _ref2.type;
|
|
39
|
+
return /*#__PURE__*/_jsx(PreviewIndicator, {
|
|
40
|
+
ownerState: {
|
|
41
|
+
type: type
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export var ColorPicker = function ColorPicker(inProps) {
|
|
46
|
+
var _useThemeProps = useThemeProps({
|
|
47
|
+
props: inProps,
|
|
48
|
+
name: "CometAdminColorPicker"
|
|
49
|
+
}),
|
|
50
|
+
classes = _useThemeProps.classes,
|
|
51
|
+
value = _useThemeProps.value,
|
|
52
|
+
_useThemeProps$colorF = _useThemeProps.colorFormat,
|
|
53
|
+
colorFormat = _useThemeProps$colorF === void 0 ? "hex" : _useThemeProps$colorF,
|
|
54
|
+
hidePicker = _useThemeProps.hidePicker,
|
|
55
|
+
hideHeader = _useThemeProps.hideHeader,
|
|
56
|
+
hideFooter = _useThemeProps.hideFooter,
|
|
57
|
+
colorPalette = _useThemeProps.colorPalette,
|
|
58
|
+
onChange = _useThemeProps.onChange,
|
|
59
|
+
startAdornment = _useThemeProps.startAdornment,
|
|
60
|
+
endAdornment = _useThemeProps.endAdornment,
|
|
61
|
+
_onBlur = _useThemeProps.onBlur,
|
|
62
|
+
required = _useThemeProps.required,
|
|
63
|
+
_useThemeProps$titleT = _useThemeProps.titleText,
|
|
64
|
+
titleText = _useThemeProps$titleT === void 0 ? /*#__PURE__*/_jsx(FormattedMessage, {
|
|
65
|
+
id: "comet.colorPicker.title",
|
|
66
|
+
defaultMessage: "Choose a color"
|
|
67
|
+
}) : _useThemeProps$titleT,
|
|
68
|
+
_useThemeProps$clearB = _useThemeProps.clearButtonText,
|
|
69
|
+
clearButtonText = _useThemeProps$clearB === void 0 ? /*#__PURE__*/_jsx(FormattedMessage, {
|
|
70
|
+
id: "comet.colorPicker.clearButton",
|
|
71
|
+
defaultMessage: "clear color"
|
|
72
|
+
}) : _useThemeProps$clearB,
|
|
73
|
+
_useThemeProps$compon = _useThemeProps.components,
|
|
74
|
+
components = _useThemeProps$compon === void 0 ? {} : _useThemeProps$compon,
|
|
75
|
+
slotProps = _useThemeProps.slotProps,
|
|
76
|
+
restProps = _objectWithoutProperties(_useThemeProps, _excluded);
|
|
77
|
+
var _components$ColorPick = components.ColorPickerColorPreview,
|
|
78
|
+
ColorPreview = _components$ColorPick === void 0 ? DefaultColorPreviewIndicator : _components$ColorPick,
|
|
79
|
+
_components$ColorPick2 = components.ColorPickerInvalidPreview,
|
|
80
|
+
InvalidPreview = _components$ColorPick2 === void 0 ? DefaultNoColorPreviewIndicator : _components$ColorPick2,
|
|
81
|
+
_components$ColorPick3 = components.ColorPickerEmptyPreview,
|
|
82
|
+
EmptyPreview = _components$ColorPick3 === void 0 ? DefaultNoColorPreviewIndicator : _components$ColorPick3,
|
|
83
|
+
inputWithPopperComponents = _objectWithoutProperties(components, _excluded2);
|
|
84
|
+
var _useState = useState(value !== null && value !== void 0 ? value : ""),
|
|
85
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
86
|
+
displayValue = _useState2[0],
|
|
87
|
+
setDisplayValue = _useState2[1];
|
|
88
|
+
var previewColor = displayValue ? tinycolor(displayValue) : null;
|
|
89
|
+
useEffect(function () {
|
|
90
|
+
setDisplayValue(value !== null && value !== void 0 ? value : "");
|
|
91
|
+
}, [value, setDisplayValue]);
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* When quickly sliding in the color-picker, multiple `onChange` events would be triggered every second.
|
|
95
|
+
* Debouncing those events ensures the picker is always responsive and prevents it from sometimes crashing.
|
|
96
|
+
*/
|
|
97
|
+
var debouncedOnChange = useDebouncedCallback(function (color) {
|
|
98
|
+
onChange === null || onChange === void 0 || onChange(color);
|
|
99
|
+
}, 250);
|
|
100
|
+
var onChangeColor = function onChangeColor(color) {
|
|
101
|
+
var colorValue = tinycolor(color);
|
|
102
|
+
if (colorValue.isValid()) {
|
|
103
|
+
var stringValue = colorFormat === "rgba" ? colorValue.toRgbString() : colorValue.toHexString();
|
|
104
|
+
debouncedOnChange(stringValue);
|
|
105
|
+
setDisplayValue(stringValue);
|
|
106
|
+
} else {
|
|
107
|
+
debouncedOnChange(null);
|
|
108
|
+
setDisplayValue("");
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return /*#__PURE__*/_jsx(Root, _objectSpread(_objectSpread(_objectSpread({
|
|
112
|
+
required: required,
|
|
113
|
+
startAdornment: startAdornment ? startAdornment : /*#__PURE__*/_jsx(InputAdornment, _objectSpread(_objectSpread({
|
|
114
|
+
position: "start",
|
|
115
|
+
disablePointerEvents: true
|
|
116
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.inputAdornment), {}, {
|
|
117
|
+
children: /*#__PURE__*/_jsx(Preview, {
|
|
118
|
+
children: previewColor ? previewColor.isValid() ? /*#__PURE__*/_jsx(ColorPreview, _objectSpread(_objectSpread({
|
|
119
|
+
type: "color",
|
|
120
|
+
color: previewColor.toRgbString()
|
|
121
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.previewIndicator), slotProps === null || slotProps === void 0 ? void 0 : slotProps.previewIndicatorColor)) : /*#__PURE__*/_jsx(InvalidPreview, _objectSpread(_objectSpread(_objectSpread({
|
|
122
|
+
type: "invalid"
|
|
123
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.previewIndicator), slotProps === null || slotProps === void 0 ? void 0 : slotProps.previewIndicatorInvalid), {}, {
|
|
124
|
+
children: "?"
|
|
125
|
+
})) : /*#__PURE__*/_jsx(EmptyPreview, _objectSpread(_objectSpread({
|
|
126
|
+
type: "empty"
|
|
127
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.previewIndicator), slotProps === null || slotProps === void 0 ? void 0 : slotProps.previewIndicatorEmpty))
|
|
128
|
+
})
|
|
129
|
+
})),
|
|
130
|
+
endAdornment: !required && value ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
131
|
+
children: [/*#__PURE__*/_jsx(ClearInputAdornment, {
|
|
132
|
+
position: "end",
|
|
133
|
+
onClick: function onClick() {
|
|
134
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(undefined);
|
|
135
|
+
}
|
|
136
|
+
}), endAdornment]
|
|
137
|
+
}) : endAdornment,
|
|
138
|
+
value: displayValue,
|
|
139
|
+
onChange: function onChange(e) {
|
|
140
|
+
setDisplayValue(e.currentTarget.value);
|
|
141
|
+
},
|
|
142
|
+
onBlur: function onBlur(e) {
|
|
143
|
+
_onBlur === null || _onBlur === void 0 || _onBlur(e);
|
|
144
|
+
onChangeColor(displayValue);
|
|
145
|
+
},
|
|
146
|
+
components: inputWithPopperComponents
|
|
147
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.root), restProps), {}, {
|
|
148
|
+
children: function children(closePopper) {
|
|
149
|
+
return /*#__PURE__*/_jsxs(PopperRoot, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.popperRoot), {}, {
|
|
150
|
+
children: [!hideHeader && /*#__PURE__*/_jsxs(Header, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.header), {}, {
|
|
151
|
+
children: [/*#__PURE__*/_jsx(HeaderTitleText, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.headerTitleText), {}, {
|
|
152
|
+
children: titleText
|
|
153
|
+
})), /*#__PURE__*/_jsx(HeaderCloseButton, _objectSpread(_objectSpread({
|
|
154
|
+
onClick: function onClick() {
|
|
155
|
+
return closePopper(true);
|
|
156
|
+
}
|
|
157
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.headerCloseButton), {}, {
|
|
158
|
+
children: /*#__PURE__*/_jsx(Close, {})
|
|
159
|
+
}))]
|
|
160
|
+
})), !hidePicker && /*#__PURE__*/_jsxs(ColorPickerWrapper, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.colorPickerWrapper), {}, {
|
|
161
|
+
children: [colorFormat === "hex" && /*#__PURE__*/_jsx(HexColorPicker, _objectSpread({
|
|
162
|
+
color: value !== null && value !== void 0 ? value : "",
|
|
163
|
+
onChange: onChangeColor
|
|
164
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.hexColorPicker)), colorFormat === "rgba" && /*#__PURE__*/_jsx(RgbaStringColorPicker, _objectSpread({
|
|
165
|
+
color: value !== null && value !== void 0 ? value : "",
|
|
166
|
+
onChange: onChangeColor
|
|
167
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.rgbaStringColorPicker))]
|
|
168
|
+
})), (colorPalette === null || colorPalette === void 0 ? void 0 : colorPalette.length) && /*#__PURE__*/_jsx(ColorPalette, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.colorPalette), {}, {
|
|
169
|
+
children: colorPalette.map(function (color, index) {
|
|
170
|
+
return /*#__PURE__*/_jsx(ColorPaletteItem, _objectSpread({
|
|
171
|
+
onClick: function onClick() {
|
|
172
|
+
onChangeColor(color);
|
|
173
|
+
closePopper(true);
|
|
174
|
+
},
|
|
175
|
+
ownerState: {
|
|
176
|
+
colorValue: color
|
|
177
|
+
}
|
|
178
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.colorPaletteItem), "".concat(index, "_").concat(color));
|
|
179
|
+
})
|
|
180
|
+
})), !hideFooter && /*#__PURE__*/_jsx(Footer, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.footer), {}, {
|
|
181
|
+
children: /*#__PURE__*/_jsxs(FooterClearButton, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.footerClearButton), {}, {
|
|
182
|
+
onClick: function onClick() {
|
|
183
|
+
onChangeColor("");
|
|
184
|
+
closePopper(true);
|
|
185
|
+
},
|
|
186
|
+
children: [/*#__PURE__*/_jsx(Preview, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.preview), {}, {
|
|
187
|
+
children: /*#__PURE__*/_jsx(EmptyPreview, _objectSpread(_objectSpread({
|
|
188
|
+
type: "empty"
|
|
189
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.previewIndicator), slotProps === null || slotProps === void 0 ? void 0 : slotProps.previewIndicatorEmpty))
|
|
190
|
+
})), /*#__PURE__*/_jsx(Typography, {
|
|
191
|
+
children: clearButtonText
|
|
192
|
+
})]
|
|
193
|
+
}))
|
|
194
|
+
}))]
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
}));
|
|
198
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { InputWithPopper, type ThemedComponentBaseProps } from "@dextinity/admin";
|
|
2
|
+
import { Box, ButtonBase, IconButton, Typography } from "@mui/material";
|
|
3
|
+
import { type Theme } from "@mui/material/styles";
|
|
4
|
+
import type { ComponentProps, ComponentType } from "react";
|
|
5
|
+
import { HexColorPicker as HexColorPickerBase, RgbaStringColorPicker as RgbaStringColorPickerBase } from "react-colorful";
|
|
6
|
+
export type ColorPickerClassKey = "root" | "inputAdornment" | "popperRoot" | "popperSection" | "header" | "headerTitleText" | "headerCloseButton" | "colorPickerWrapper" | "colorPalette" | "colorPaletteItem" | "footer" | "footerClearButton" | "preview" | "previewIndicator" | "previewIndicatorColor" | "previewIndicatorEmpty" | "previewIndicatorInvalid" | "hexColorPicker" | "rgbaStringColorPicker";
|
|
7
|
+
export type SlotProps = ThemedComponentBaseProps<{
|
|
8
|
+
root: typeof InputWithPopper;
|
|
9
|
+
inputAdornment: typeof InputAdornment;
|
|
10
|
+
popperRoot: "div";
|
|
11
|
+
header: "div";
|
|
12
|
+
headerTitleText: typeof Typography;
|
|
13
|
+
headerCloseButton: typeof IconButton;
|
|
14
|
+
colorPickerWrapper: "div";
|
|
15
|
+
colorPalette: "div";
|
|
16
|
+
colorPaletteItem: typeof Box;
|
|
17
|
+
footer: "div";
|
|
18
|
+
footerClearButton: typeof ButtonBase;
|
|
19
|
+
preview: "div";
|
|
20
|
+
previewIndicator: "div";
|
|
21
|
+
previewIndicatorColor: "div";
|
|
22
|
+
previewIndicatorEmpty: "div";
|
|
23
|
+
previewIndicatorInvalid: "div";
|
|
24
|
+
hexColorPicker: typeof HexColorPickerBase;
|
|
25
|
+
rgbaStringColorPicker: typeof RgbaStringColorPickerBase;
|
|
26
|
+
}>["slotProps"];
|
|
27
|
+
export declare const Root: import("react").ForwardRefExoticComponent<Omit<Pick<import("@dextinity/admin").InputWithPopperProps, keyof import("@dextinity/admin").InputWithPopperProps> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
28
|
+
ownerState?: undefined;
|
|
29
|
+
} & {
|
|
30
|
+
className?: string;
|
|
31
|
+
ownerState?: object;
|
|
32
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
33
|
+
export declare const InputAdornment: import("react").ForwardRefExoticComponent<Omit<Pick<import("@mui/material").InputAdornmentOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "className" | "classes" | "children" | "disablePointerEvents" | "disableTypography" | "position" | "sx" | "variant">, "slot" | "style" | "title" | "className" | "classes" | "ref" | "children" | "disablePointerEvents" | "disableTypography" | "position" | "sx" | "variant" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
34
|
+
ownerState?: undefined;
|
|
35
|
+
} & {
|
|
36
|
+
className?: string;
|
|
37
|
+
ownerState?: object;
|
|
38
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
39
|
+
export declare const PopperRoot: import("react").ForwardRefExoticComponent<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
40
|
+
ownerState?: undefined;
|
|
41
|
+
} & {
|
|
42
|
+
className?: string;
|
|
43
|
+
ownerState?: object;
|
|
44
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
45
|
+
export declare const Header: import("react").ForwardRefExoticComponent<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
46
|
+
ownerState?: undefined;
|
|
47
|
+
} & {
|
|
48
|
+
className?: string;
|
|
49
|
+
ownerState?: object;
|
|
50
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
51
|
+
export declare const HeaderTitleText: import("react").ForwardRefExoticComponent<Omit<Pick<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "className" | "classes" | "children" | "position" | "sx" | "variant" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "p" | "slot" | "style" | "title" | "className" | "classes" | "ref" | "children" | "position" | "sx" | "variant" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
52
|
+
ownerState?: undefined;
|
|
53
|
+
} & {
|
|
54
|
+
className?: string;
|
|
55
|
+
ownerState?: object;
|
|
56
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
57
|
+
export declare const HeaderCloseButton: import("react").ForwardRefExoticComponent<Omit<Pick<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "className" | "classes" | "children" | "sx" | "tabIndex" | "color" | "disabled" | "size" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loading" | "loadingIndicator">, "form" | "slot" | "style" | "title" | "className" | "classes" | "ref" | "children" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "disabled" | "name" | "size" | "type" | "value" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loading" | "loadingIndicator" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
58
|
+
ownerState?: undefined;
|
|
59
|
+
} & {
|
|
60
|
+
className?: string;
|
|
61
|
+
ownerState?: object;
|
|
62
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
63
|
+
export declare const ColorPickerWrapper: import("react").ForwardRefExoticComponent<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
64
|
+
ownerState?: undefined;
|
|
65
|
+
} & {
|
|
66
|
+
className?: string;
|
|
67
|
+
ownerState?: object;
|
|
68
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
69
|
+
export declare const ColorPalette: import("react").ForwardRefExoticComponent<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
70
|
+
ownerState?: undefined;
|
|
71
|
+
} & {
|
|
72
|
+
className?: string;
|
|
73
|
+
ownerState?: object;
|
|
74
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
75
|
+
type ColorPaletteItemProps = {
|
|
76
|
+
colorValue: string;
|
|
77
|
+
};
|
|
78
|
+
export declare const ColorPaletteItem: import("react").ForwardRefExoticComponent<Omit<Pick<import("@mui/system").BoxOwnProps<Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<Theme>>, "slot" | "style" | "title" | "className" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
79
|
+
ownerState: ColorPaletteItemProps;
|
|
80
|
+
} & {
|
|
81
|
+
className?: string;
|
|
82
|
+
ownerState?: object;
|
|
83
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
84
|
+
export declare const Footer: import("react").ForwardRefExoticComponent<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
85
|
+
ownerState?: undefined;
|
|
86
|
+
} & {
|
|
87
|
+
className?: string;
|
|
88
|
+
ownerState?: object;
|
|
89
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
90
|
+
export declare const FooterClearButton: import("react").ForwardRefExoticComponent<Omit<Pick<import("@mui/material").ButtonBaseOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "className" | "classes" | "children" | "sx" | "tabIndex" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef">, "form" | "slot" | "style" | "title" | "className" | "classes" | "ref" | "children" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "disabled" | "name" | "type" | "value" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
91
|
+
ownerState?: undefined;
|
|
92
|
+
} & {
|
|
93
|
+
className?: string;
|
|
94
|
+
ownerState?: object;
|
|
95
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
96
|
+
export declare const Preview: import("react").ForwardRefExoticComponent<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
97
|
+
ownerState?: undefined;
|
|
98
|
+
} & {
|
|
99
|
+
className?: string;
|
|
100
|
+
ownerState?: object;
|
|
101
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
102
|
+
export type PreviewIndicatorEmptyOrInvalidProps = {
|
|
103
|
+
type: "empty" | "invalid";
|
|
104
|
+
};
|
|
105
|
+
export type PreviewIndicatorColorProps = {
|
|
106
|
+
type: "color";
|
|
107
|
+
color: string;
|
|
108
|
+
};
|
|
109
|
+
export declare const PreviewIndicator: import("react").ForwardRefExoticComponent<(Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
110
|
+
ownerState: PreviewIndicatorEmptyOrInvalidProps;
|
|
111
|
+
} & {
|
|
112
|
+
className?: string;
|
|
113
|
+
ownerState?: object;
|
|
114
|
+
}, "ref"> | Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
115
|
+
ownerState: PreviewIndicatorColorProps;
|
|
116
|
+
} & {
|
|
117
|
+
className?: string;
|
|
118
|
+
ownerState?: object;
|
|
119
|
+
}, "ref">) & import("react").RefAttributes<unknown>>;
|
|
120
|
+
export declare const HexColorPicker: ComponentType<ComponentProps<typeof HexColorPickerBase>>;
|
|
121
|
+
export declare const RgbaStringColorPicker: ComponentType<ComponentProps<typeof RgbaStringColorPickerBase>>;
|
|
122
|
+
export {};
|
|
123
|
+
//# sourceMappingURL=ColorPicker.slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPicker.slots.d.ts","sourceRoot":"","sources":["../src/ColorPicker.slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAAuC,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAO,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,qBAAqB,IAAI,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAE1H,MAAM,MAAM,mBAAmB,GACzB,MAAM,GACN,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,QAAQ,GACR,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,cAAc,GACd,kBAAkB,GAClB,QAAQ,GACR,mBAAmB,GACnB,SAAS,GACT,kBAAkB,GAClB,uBAAuB,GACvB,uBAAuB,GACvB,yBAAyB,GACzB,gBAAgB,GAChB,uBAAuB,CAAC;AAE9B,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC;IAC7C,IAAI,EAAE,OAAO,eAAe,CAAC;IAC7B,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,UAAU,EAAE,KAAK,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC;IACd,eAAe,EAAE,OAAO,UAAU,CAAC;IACnC,iBAAiB,EAAE,OAAO,UAAU,CAAC;IACrC,kBAAkB,EAAE,KAAK,CAAC;IAC1B,YAAY,EAAE,KAAK,CAAC;IACpB,gBAAgB,EAAE,OAAO,GAAG,CAAC;IAC7B,MAAM,EAAE,KAAK,CAAC;IACd,iBAAiB,EAAE,OAAO,UAAU,CAAC;IACrC,OAAO,EAAE,KAAK,CAAC;IACf,gBAAgB,EAAE,KAAK,CAAC;IACxB,qBAAqB,EAAE,KAAK,CAAC;IAC7B,qBAAqB,EAAE,KAAK,CAAC;IAC7B,uBAAuB,EAAE,KAAK,CAAC;IAC/B,cAAc,EAAE,OAAO,kBAAkB,CAAC;IAC1C,qBAAqB,EAAE,OAAO,yBAAyB,CAAC;CAC3D,CAAC,CAAC,WAAW,CAAC,CAAC;AAUhB,eAAO,MAAM,IAAI;;;;;mDAGb,CAAC;AAEL,eAAO,MAAM,cAAc;;;;;mDAGvB,CAAC;AAEL,eAAO,MAAM,UAAU;;;;;mDAKrB,CAAC;AAEH,eAAO,MAAM,MAAM;;;;;mDASlB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;mDAO3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;mDAU7B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;mDA4C9B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;mDAaxB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;mDAc5B,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;mDAWlB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;mDAS7B,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;mDAQlB,CAAC;AAIH,MAAM,MAAM,mCAAmC,GAAG;IAC9C,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;oDAkD5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAGhF,CAAC;AAEL,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,cAAc,CAAC,OAAO,yBAAyB,CAAC,CAK9F,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
2
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
3
|
+
import { createComponentSlot, InputWithPopper } from "@dextinity/admin";
|
|
4
|
+
import { Box, ButtonBase, IconButton, InputAdornment as MuiInputAdornment, Typography } from "@mui/material";
|
|
5
|
+
import { css } from "@mui/material/styles";
|
|
6
|
+
import { HexColorPicker as HexColorPickerBase, RgbaStringColorPicker as RgbaStringColorPickerBase } from "react-colorful";
|
|
7
|
+
var getPopperSectionStyles = function getPopperSectionStyles(theme) {
|
|
8
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: ", ";\n\n &:not(:last-child) {\n border-bottom: thin solid ", ";\n }\n"])), theme.spacing(3), theme.palette.grey[100]);
|
|
9
|
+
};
|
|
10
|
+
export var Root = createComponentSlot(InputWithPopper)({
|
|
11
|
+
componentName: "ColorPicker",
|
|
12
|
+
slotName: "root"
|
|
13
|
+
})();
|
|
14
|
+
export var InputAdornment = createComponentSlot(MuiInputAdornment)({
|
|
15
|
+
componentName: "ColorPicker",
|
|
16
|
+
slotName: "inputAdornment"
|
|
17
|
+
})();
|
|
18
|
+
export var PopperRoot = createComponentSlot("div")({
|
|
19
|
+
componentName: "ColorPicker",
|
|
20
|
+
slotName: "popperRoot"
|
|
21
|
+
})(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 300px;\n"]))));
|
|
22
|
+
export var Header = createComponentSlot("div")({
|
|
23
|
+
componentName: "ColorPicker",
|
|
24
|
+
slotName: "header"
|
|
25
|
+
})(function (_ref) {
|
|
26
|
+
var theme = _ref.theme;
|
|
27
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n position: relative;\n padding-right: 40px;\n "])), getPopperSectionStyles(theme));
|
|
28
|
+
});
|
|
29
|
+
export var HeaderTitleText = createComponentSlot(Typography)({
|
|
30
|
+
componentName: "ColorPicker",
|
|
31
|
+
slotName: "headerTitleText"
|
|
32
|
+
})(function (_ref2) {
|
|
33
|
+
var theme = _ref2.theme;
|
|
34
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-weight: ", ";\n "])), theme.typography.fontWeightBold);
|
|
35
|
+
});
|
|
36
|
+
export var HeaderCloseButton = createComponentSlot(IconButton)({
|
|
37
|
+
componentName: "ColorPicker",
|
|
38
|
+
slotName: "headerCloseButton"
|
|
39
|
+
})(function (_ref3) {
|
|
40
|
+
var theme = _ref3.theme;
|
|
41
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: ", ";\n "])), theme.spacing(2));
|
|
42
|
+
});
|
|
43
|
+
export var ColorPickerWrapper = createComponentSlot("div")({
|
|
44
|
+
componentName: "ColorPicker",
|
|
45
|
+
slotName: "colorPickerWrapper",
|
|
46
|
+
classesResolver: function classesResolver() {
|
|
47
|
+
return ["popperSection"];
|
|
48
|
+
}
|
|
49
|
+
})(function (_ref4) {
|
|
50
|
+
var theme = _ref4.theme;
|
|
51
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n\n .react-colorful {\n width: 100%;\n height: auto;\n\n &__pointer {\n width: 30px;\n height: 30px;\n }\n\n &__saturation,\n &__hue,\n &__alpha {\n border-radius: 0;\n\n &:not(:last-child) {\n margin-bottom: ", ";\n }\n }\n\n &__saturation {\n border-bottom: none;\n height: 270px;\n }\n\n &__hue,\n &__alpha {\n height: 20px;\n }\n\n &__alpha-gradient {\n box-shadow: none;\n }\n }\n "])), getPopperSectionStyles(theme), theme.spacing(3));
|
|
52
|
+
});
|
|
53
|
+
export var ColorPalette = createComponentSlot("div")({
|
|
54
|
+
componentName: "ColorPicker",
|
|
55
|
+
slotName: "colorPalette",
|
|
56
|
+
classesResolver: function classesResolver() {
|
|
57
|
+
return ["popperSection"];
|
|
58
|
+
}
|
|
59
|
+
})(function (_ref5) {
|
|
60
|
+
var theme = _ref5.theme;
|
|
61
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n "])), getPopperSectionStyles(theme), theme.spacing(1));
|
|
62
|
+
});
|
|
63
|
+
export var ColorPaletteItem = createComponentSlot(Box)({
|
|
64
|
+
componentName: "ColorPicker",
|
|
65
|
+
slotName: "colorPaletteItem"
|
|
66
|
+
})(function (_ref6) {
|
|
67
|
+
var theme = _ref6.theme,
|
|
68
|
+
ownerState = _ref6.ownerState;
|
|
69
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n cursor: pointer;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n border: thin solid ", ";\n border-radius: ", ";\n box-sizing: border-box;\n background-color: ", ";\n "])), theme.palette.grey[100], theme.shape.borderRadius, ownerState.colorValue);
|
|
70
|
+
});
|
|
71
|
+
export var Footer = createComponentSlot("div")({
|
|
72
|
+
componentName: "ColorPicker",
|
|
73
|
+
slotName: "footer",
|
|
74
|
+
classesResolver: function classesResolver() {
|
|
75
|
+
return ["popperSection"];
|
|
76
|
+
}
|
|
77
|
+
})(function (_ref7) {
|
|
78
|
+
var theme = _ref7.theme;
|
|
79
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n padding: ", ";\n "])), getPopperSectionStyles(theme), theme.spacing(1));
|
|
80
|
+
});
|
|
81
|
+
export var FooterClearButton = createComponentSlot(ButtonBase)({
|
|
82
|
+
componentName: "ColorPicker",
|
|
83
|
+
slotName: "footerClearButton"
|
|
84
|
+
})(function (_ref8) {
|
|
85
|
+
var theme = _ref8.theme;
|
|
86
|
+
return css(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["\n padding: ", ";\n border-radius: ", ";\n gap: 8px;\n "])), theme.spacing(2), theme.shape.borderRadius);
|
|
87
|
+
});
|
|
88
|
+
export var Preview = createComponentSlot("div")({
|
|
89
|
+
componentName: "ColorPicker",
|
|
90
|
+
slotName: "preview"
|
|
91
|
+
})(css(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n width: 24px;\n height: 24px;\n"]))));
|
|
92
|
+
export var PreviewIndicator = createComponentSlot("div")({
|
|
93
|
+
componentName: "ColorPicker",
|
|
94
|
+
slotName: "previewIndicator",
|
|
95
|
+
classesResolver: function classesResolver(_ref9) {
|
|
96
|
+
var type = _ref9.type;
|
|
97
|
+
return [type === "color" && "previewIndicatorColor", type === "empty" && "previewIndicatorEmpty", type === "invalid" && "previewIndicatorInvalid"];
|
|
98
|
+
}
|
|
99
|
+
})(function (_ref0) {
|
|
100
|
+
var theme = _ref0.theme,
|
|
101
|
+
ownerState = _ref0.ownerState;
|
|
102
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border: thin solid ", ";\n border-radius: ", ";\n\n ", "\n\n ", "\n\n ", "\n "])), theme.palette.divider, theme.shape.borderRadius, ownerState.type === "color" && css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), ownerState.color), ownerState.type === "empty" && css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:before {\n content: \"\";\n display: block;\n background-color: #f62929;\n width: 1px;\n height: calc(100% - 4px);\n transform: rotate(45deg);\n }\n "]))), ownerState.type === "invalid" && css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-size: 16px;\n line-height: 24px;\n font-weight: ", ";\n color: ", ";\n text-align: center;\n "])), theme.typography.fontWeightBold, theme.palette.text.secondary));
|
|
103
|
+
});
|
|
104
|
+
export var HexColorPicker = createComponentSlot(HexColorPickerBase)({
|
|
105
|
+
componentName: "ColorPicker",
|
|
106
|
+
slotName: "hexColorPicker"
|
|
107
|
+
})();
|
|
108
|
+
export var RgbaStringColorPicker = createComponentSlot(RgbaStringColorPickerBase)({
|
|
109
|
+
componentName: "ColorPicker",
|
|
110
|
+
slotName: "rgbaStringColorPicker"
|
|
111
|
+
})();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FieldRenderProps } from "react-final-form";
|
|
2
|
+
import { type ColorPickerProps } from "./ColorPicker";
|
|
3
|
+
export type FinalFormColorPickerProps = ColorPickerProps;
|
|
4
|
+
type FinalFormColorPickerInternalProps = FieldRenderProps<string, HTMLInputElement | HTMLTextAreaElement>;
|
|
5
|
+
/**
|
|
6
|
+
* Final Form-compatible ColorPicker component.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link ColorField} – preferred for typical form use. Use this only if no Field wrapper is needed.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FinalFormColorPicker: ({ meta, input, ...restProps }: FinalFormColorPickerProps & FinalFormColorPickerInternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=FinalFormColorPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FinalFormColorPicker.d.ts","sourceRoot":"","sources":["../src/FinalFormColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,CAAC;AAEzD,KAAK,iCAAiC,GAAG,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;AAC1G;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,+BAA+B,yBAAyB,GAAG,iCAAiC,4CAEhI,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["meta", "input"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
10
|
+
import { ColorPicker } from "./ColorPicker";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
/**
|
|
13
|
+
* Final Form-compatible ColorPicker component.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link ColorField} – preferred for typical form use. Use this only if no Field wrapper is needed.
|
|
16
|
+
*/
|
|
17
|
+
export var FinalFormColorPicker = function FinalFormColorPicker(_ref) {
|
|
18
|
+
var meta = _ref.meta,
|
|
19
|
+
input = _ref.input,
|
|
20
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
return /*#__PURE__*/_jsx(ColorPicker, _objectSpread(_objectSpread({}, input), restProps));
|
|
22
|
+
};
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ColorField, type ColorFieldProps } from "./ColorField";
|
|
2
|
+
export type { ColorPickerNoColorPreviewProps } from "./ColorPicker";
|
|
3
|
+
export { ColorPicker, type ColorPickerColorPreviewProps, type ColorPickerProps, type ColorPickerPropsComponents } from "./ColorPicker";
|
|
4
|
+
export type { ColorPickerClassKey } from "./ColorPicker.slots";
|
|
5
|
+
export { FinalFormColorPicker, type FinalFormColorPickerProps } from "./FinalFormColorPicker";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,KAAK,4BAA4B,EAAE,KAAK,gBAAgB,EAAE,KAAK,0BAA0B,EAAE,MAAM,eAAe,CAAC;AACvI,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/lib/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dextinity/admin-color-picker",
|
|
3
|
+
"version": "2.0.0-canary-20260729062014",
|
|
4
|
+
"description": "Comet Admin Color Picker component",
|
|
5
|
+
"repository": {
|
|
6
|
+
"directory": "packages/admin/admin-color-picker",
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/vivid-planet/comet"
|
|
9
|
+
},
|
|
10
|
+
"license": "BSD-2-Clause",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./lib/index.js",
|
|
16
|
+
"types": "./lib/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"react-colorful": "^5.6.1",
|
|
24
|
+
"tinycolor2": "^1.6.0",
|
|
25
|
+
"use-debounce": "^10.0.6",
|
|
26
|
+
"@dextinity/admin": "2.0.0-canary-20260729062014",
|
|
27
|
+
"@dextinity/admin-icons": "2.0.0-canary-20260729062014"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@babel/cli": "^7.29.7",
|
|
31
|
+
"@babel/core": "^7.29.7",
|
|
32
|
+
"@mui/material": "^7.3.11",
|
|
33
|
+
"@types/react": "^19.2.15",
|
|
34
|
+
"@types/react-dom": "^19.2.3",
|
|
35
|
+
"@types/tinycolor2": "^1.4.6",
|
|
36
|
+
"eslint": "^9.39.4",
|
|
37
|
+
"final-form": "^4.20.10",
|
|
38
|
+
"npm-run-all2": "^8.0.4",
|
|
39
|
+
"prettier": "^3.6.2",
|
|
40
|
+
"react": "^19.2.6",
|
|
41
|
+
"react-dom": "^19.2.6",
|
|
42
|
+
"react-final-form": "^6.5.9",
|
|
43
|
+
"react-intl": "^7.1.11",
|
|
44
|
+
"rimraf": "^6.1.2",
|
|
45
|
+
"typescript": "^5.9.3",
|
|
46
|
+
"@dextinity/admin-babel-preset": "2.0.0-canary-20260729062014",
|
|
47
|
+
"@dextinity/eslint-config": "2.0.0-canary-20260729062014"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@mui/material": "^7.0.0",
|
|
51
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
52
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
|
+
"react-final-form": "^6.3.1",
|
|
54
|
+
"react-intl": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=22.0.0"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public",
|
|
61
|
+
"registry": "https://registry.npmjs.org"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "pnpm run clean && run-p build:babel build:types",
|
|
65
|
+
"build:babel": "pnpm exec babel ./src -x \".ts,.tsx\" -d lib",
|
|
66
|
+
"build:types": "tsc --project ./tsconfig.json --emitDeclarationOnly",
|
|
67
|
+
"clean": "rimraf lib",
|
|
68
|
+
"lint": "run-p lint:prettier lint:eslint lint:tsc",
|
|
69
|
+
"lint:ci": "pnpm run lint",
|
|
70
|
+
"lint:eslint": "eslint --max-warnings 0 src/ '**/*.json' --no-warn-ignored",
|
|
71
|
+
"lint:fix": "run-p lint:fix:eslint lint:fix:prettier",
|
|
72
|
+
"lint:fix:eslint": "pnpm run lint:eslint --fix",
|
|
73
|
+
"lint:fix:prettier": "pnpm run lint:prettier --write",
|
|
74
|
+
"lint:prettier": "pnpm exec prettier --check '*.{ts,js,json,md,yml,yaml}'",
|
|
75
|
+
"lint:tsc": "tsc --noEmit",
|
|
76
|
+
"start": "run-p start:babel start:types",
|
|
77
|
+
"start:babel": "pnpm exec babel ./src -x \".ts,.tsx\" -d lib -w",
|
|
78
|
+
"start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput"
|
|
79
|
+
}
|
|
80
|
+
}
|