@progress/kendo-react-inputs 13.4.0-develop.3 → 13.4.0-develop.5
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/checkbox/Checkbox.js +1 -1
- package/checkbox/Checkbox.mjs +133 -118
- package/checkbox/interfaces/CheckboxProps.d.ts +1 -1
- package/colors/ColorInput.d.ts +1 -1
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +1 -1
- package/colors/FlatColorPicker.d.ts +1 -1
- package/colors/HexInput.d.ts +1 -1
- package/colors/interfaces/ColorGradientProps.d.ts +1 -1
- package/colors/interfaces/ColorPickerProps.d.ts +1 -1
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/input/Input.js +1 -1
- package/input/Input.mjs +120 -101
- package/maskedtextbox/MaskedTextBox.d.ts +7 -1
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +83 -62
- package/maskedtextbox/MaskedTextBoxProps.d.ts +1 -1
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +243 -219
- package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +1 -1
- package/signature/interfaces/SignatureProps.d.ts +1 -1
- package/switch/Switch.d.ts +2 -2
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +109 -90
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +132 -116
- package/textarea/interfaces/TextAreaProps.d.ts +1 -1
- package/textbox/Textbox.d.ts +2 -1
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +77 -62
package/checkbox/Checkbox.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("react"),e=require("prop-types"),o=require("@progress/kendo-react-common"),Pe=require("@progress/kendo-react-intl"),I=require("../messages/index.js");function Ve(c){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const r in c)if(r!=="default"){const k=Object.getOwnPropertyDescriptor(c,r);Object.defineProperty(b,r,k.get?k:{enumerable:!0,get:()=>c[r]})}}return b.default=c,Object.freeze(b)}const t=Ve(xe),G=o.createPropsContext(),M=t.forwardRef((c,b)=>{const r=o.usePropsContext(G,c),{ariaDescribedBy:k,ariaLabelledBy:J,checked:O,className:Q,labelClassName:X,children:Y,defaultChecked:Z,disabled:n,defaultValue:ee,id:h,size:v=W.size,rounded:g=W.rounded,label:T,labelPlacement:q,name:z,labelOptional:te,onChange:C,onFocus:y,onBlur:x,tabIndex:ae,value:i,required:p,valid:D,validationMessage:F,validityStyles:K,autoFocus:ne,visited:Ee,touched:Ne,modified:Se,...oe}=r,l=t.useRef(null),R=t.useCallback(()=>{l.current&&l.current.focus()},[]),d=t.useCallback(()=>({element:l.current,focus:R,get name(){return l.current&&l.current.name}}),[R]);t.useImperativeHandle(b,d);const[le,se]=t.useState(Z),[ce,re]=t.useState(ee),w=typeof i=="boolean"||i===null,P=O!==void 0,m=w,V=m?i:ce,E=P?O:m?void 0:le,j=z||h,L=E===void 0&&V,_=L?V:E,f=L||m?i===null?i:void 0:i||V,ie=_===null||f===null,H=o.useId(),de=Pe.useLocalization(),U=a=>de.toLanguageString(a,I.messages[a]),$=U(I.checkboxValidation),ue=U(I.checkboxOptionalText),N=D!==void 0?D:p?!!E:!0;t.useEffect(()=>{l.current&&l.current.setCustomValidity&&l.current.setCustomValidity(N?"":F||$)},[N,F,$]);const u=t.useCallback((a,s)=>{!m&&!n&&(re(s),!P&&!n&&se(s)),C&&!n&&o.dispatchEvent(C,a,{...d(),value:s},{value:s})},[P,n,C,m,d]),be=t.useCallback(a=>{const s={target:l.current,currentTarget:l.current};u(s,a)},[u]);o.useKendoPaste(l,{fieldName:j,onValueChange:be,enabled:!!j});const me=t.useCallback(a=>{const s=a.target.checked;u(a,s)},[u,i]),ke=t.useCallback(a=>{if(n)return;const{keyCode:s}=a,ye=a.currentTarget.checked;s===o.Keys.space&&(a.preventDefault(),a.stopPropagation(),u(a,!ye))},[n,u]),pe=t.useCallback(a=>{if(n)return;const{keyCode:s}=a;s===o.Keys.space&&a.preventDefault()},[n]),fe=t.useCallback(a=>{y&&!n&&o.dispatchEvent(y,a,d(),void 0)},[y,n,d]),he=t.useCallback(a=>{x&&!n&&o.dispatchEvent(x,a,d(),void 0)},[x,n,d]),ve=o.useDir(l,r.dir),ge=o.classNames("k-checkbox-wrap",Q),A={type:"checkbox",className:o.classNames("k-checkbox",{[`k-checkbox-${o.kendoThemeMaps.sizeMap[v]||v}`]:v,[`k-rounded-${o.kendoThemeMaps.roundedMap[g]||g}`]:g,"k-indeterminate":ie,"k-disabled":n,"k-invalid k-invalid":!(N||K!==void 0||K===!0)}),ref:l,name:z,id:h||H,disabled:n,required:p!==void 0?p:!1,tabIndex:o.getTabIndex(ae,n),role:"checkbox",checked:!!_,"aria-describedby":k,"aria-labelledby":J,"aria-disabled":n||void 0,"aria-required":p,autoFocus:ne,...oe,onChange:me,onKeyDown:ke,onKeyUp:pe,onFocus:fe,onBlur:he},Ce=f===void 0?t.createElement("input",{...A}):t.createElement("input",{...A,value:w?void 0:f===null?"":f}),S=T!==void 0?t.createElement("label",{className:o.classNames("k-checkbox-label",X),htmlFor:h||H,style:{userSelect:"none"}},T,te&&t.createElement("span",{className:"k-label-optional"},ue)):null,B=t.createElement("span",{className:ge},Ce,Y);return t.createElement(t.Fragment,null,q==="before"?t.createElement("div",{dir:"rtl"},B,S):q==="after"?t.createElement("div",{dir:"ltr"},B,S):t.createElement("div",{dir:ve},B,S))});M.propTypes={checked:e.bool,className:e.string,defaultChecked:e.bool,defaultValue:e.any,dir:e.string,disabled:e.bool,id:e.string,size:e.oneOf(["small","medium","large"]),rounded:e.oneOf(["small","medium","large","none"]),ariaLabelledBy:e.string,ariaDescribedBy:e.string,label:e.any,labelPlacement:e.string,labelOptional:e.bool,name:e.string,tabIndex:e.number,value:e.any,validationMessage:e.string,required:e.bool,validate:e.bool,valid:e.bool,autoFocus:e.bool,onChange:e.func,onFocus:e.func,onBlur:e.func};const W={size:void 0,rounded:void 0};M.displayName="KendoCheckbox";exports.Checkbox=M;exports.CheckboxPropsContext=G;
|
package/checkbox/Checkbox.mjs
CHANGED
|
@@ -5,47 +5,47 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
import { createPropsContext as
|
|
11
|
-
import { useLocalization as
|
|
12
|
-
import { messages as
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
ariaDescribedBy:
|
|
16
|
-
ariaLabelledBy:
|
|
17
|
-
checked:
|
|
18
|
-
className:
|
|
19
|
-
labelClassName:
|
|
20
|
-
children:
|
|
21
|
-
defaultChecked:
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import a from "prop-types";
|
|
10
|
+
import { createPropsContext as Ve, usePropsContext as Pe, useId as Ee, dispatchEvent as P, useKendoPaste as Be, Keys as _, useDir as Ne, classNames as E, getTabIndex as Ie, kendoThemeMaps as $ } from "@progress/kendo-react-common";
|
|
11
|
+
import { useLocalization as Fe } from "@progress/kendo-react-intl";
|
|
12
|
+
import { messages as ze, checkboxValidation as Ke, checkboxOptionalText as Me } from "../messages/index.mjs";
|
|
13
|
+
const Se = Ve(), W = e.forwardRef((j, G) => {
|
|
14
|
+
const B = Pe(Se, j), {
|
|
15
|
+
ariaDescribedBy: J,
|
|
16
|
+
ariaLabelledBy: Q,
|
|
17
|
+
checked: N,
|
|
18
|
+
className: X,
|
|
19
|
+
labelClassName: Y,
|
|
20
|
+
children: Z,
|
|
21
|
+
defaultChecked: ee,
|
|
22
22
|
disabled: o,
|
|
23
|
-
defaultValue:
|
|
24
|
-
id:
|
|
25
|
-
size:
|
|
26
|
-
rounded:
|
|
27
|
-
label:
|
|
28
|
-
labelPlacement:
|
|
29
|
-
name:
|
|
30
|
-
labelOptional:
|
|
31
|
-
onChange:
|
|
32
|
-
onFocus:
|
|
33
|
-
onBlur:
|
|
34
|
-
tabIndex:
|
|
23
|
+
defaultValue: ae,
|
|
24
|
+
id: b,
|
|
25
|
+
size: m = A.size,
|
|
26
|
+
rounded: p = A.rounded,
|
|
27
|
+
label: I,
|
|
28
|
+
labelPlacement: F,
|
|
29
|
+
name: z,
|
|
30
|
+
labelOptional: te,
|
|
31
|
+
onChange: k,
|
|
32
|
+
onFocus: f,
|
|
33
|
+
onBlur: h,
|
|
34
|
+
tabIndex: oe,
|
|
35
35
|
value: s,
|
|
36
|
-
required:
|
|
37
|
-
valid:
|
|
36
|
+
required: d,
|
|
37
|
+
valid: K,
|
|
38
38
|
validationMessage: M,
|
|
39
39
|
validityStyles: S,
|
|
40
|
-
autoFocus:
|
|
40
|
+
autoFocus: ne,
|
|
41
41
|
// Removed to support direct use in Form Field component
|
|
42
|
-
visited:
|
|
43
|
-
touched:
|
|
44
|
-
modified:
|
|
45
|
-
...
|
|
46
|
-
} =
|
|
42
|
+
visited: De,
|
|
43
|
+
touched: Te,
|
|
44
|
+
modified: we,
|
|
45
|
+
...le
|
|
46
|
+
} = B, n = e.useRef(null), D = e.useCallback(() => {
|
|
47
47
|
n.current && n.current.focus();
|
|
48
|
-
}, []), c =
|
|
48
|
+
}, []), c = e.useCallback(
|
|
49
49
|
() => ({
|
|
50
50
|
element: n.current,
|
|
51
51
|
focus: D,
|
|
@@ -55,15 +55,15 @@ const Fe = ye(), $ = a.forwardRef((A, W) => {
|
|
|
55
55
|
}),
|
|
56
56
|
[D]
|
|
57
57
|
);
|
|
58
|
-
|
|
59
|
-
const [
|
|
60
|
-
|
|
61
|
-
n.current && n.current.setCustomValidity && n.current.setCustomValidity(
|
|
62
|
-
}, [
|
|
63
|
-
const
|
|
58
|
+
e.useImperativeHandle(G, c);
|
|
59
|
+
const [se, ce] = e.useState(ee), [re, ie] = e.useState(ae), T = typeof s == "boolean" || s === null, v = N !== void 0, i = T, C = i ? s : re, g = v ? N : i ? void 0 : se, w = z || b, L = g === void 0 && C, O = L ? C : g, u = L || i ? s === null ? s : void 0 : s || C, de = O === null || u === null, q = Ee(), ue = Fe(), R = (t) => ue.toLanguageString(t, ze[t]), H = R(Ke), be = R(Me), y = K !== void 0 ? K : d ? !!g : !0;
|
|
60
|
+
e.useEffect(() => {
|
|
61
|
+
n.current && n.current.setCustomValidity && n.current.setCustomValidity(y ? "" : M || H);
|
|
62
|
+
}, [y, M, H]);
|
|
63
|
+
const r = e.useCallback(
|
|
64
64
|
(t, l) => {
|
|
65
|
-
!
|
|
66
|
-
|
|
65
|
+
!i && !o && (ie(l), !v && !o && ce(l)), k && !o && P(
|
|
66
|
+
k,
|
|
67
67
|
t,
|
|
68
68
|
{
|
|
69
69
|
...c(),
|
|
@@ -72,116 +72,131 @@ const Fe = ye(), $ = a.forwardRef((A, W) => {
|
|
|
72
72
|
{ value: l }
|
|
73
73
|
);
|
|
74
74
|
},
|
|
75
|
-
[
|
|
76
|
-
),
|
|
75
|
+
[v, o, k, i, c]
|
|
76
|
+
), me = e.useCallback(
|
|
77
|
+
(t) => {
|
|
78
|
+
const l = {
|
|
79
|
+
target: n.current,
|
|
80
|
+
currentTarget: n.current
|
|
81
|
+
};
|
|
82
|
+
r(l, t);
|
|
83
|
+
},
|
|
84
|
+
[r]
|
|
85
|
+
);
|
|
86
|
+
Be(n, {
|
|
87
|
+
fieldName: w,
|
|
88
|
+
onValueChange: me,
|
|
89
|
+
enabled: !!w
|
|
90
|
+
});
|
|
91
|
+
const pe = e.useCallback(
|
|
77
92
|
(t) => {
|
|
78
93
|
const l = t.target.checked;
|
|
79
|
-
|
|
94
|
+
r(t, l);
|
|
80
95
|
},
|
|
81
|
-
[
|
|
82
|
-
),
|
|
96
|
+
[r, s]
|
|
97
|
+
), ke = e.useCallback(
|
|
83
98
|
(t) => {
|
|
84
99
|
if (o)
|
|
85
100
|
return;
|
|
86
|
-
const { keyCode: l } = t,
|
|
87
|
-
l ===
|
|
101
|
+
const { keyCode: l } = t, xe = t.currentTarget.checked;
|
|
102
|
+
l === _.space && (t.preventDefault(), t.stopPropagation(), r(t, !xe));
|
|
88
103
|
},
|
|
89
|
-
[o,
|
|
90
|
-
),
|
|
104
|
+
[o, r]
|
|
105
|
+
), fe = e.useCallback(
|
|
91
106
|
(t) => {
|
|
92
107
|
if (o)
|
|
93
108
|
return;
|
|
94
109
|
const { keyCode: l } = t;
|
|
95
|
-
l ===
|
|
110
|
+
l === _.space && t.preventDefault();
|
|
96
111
|
},
|
|
97
112
|
[o]
|
|
98
|
-
),
|
|
113
|
+
), he = e.useCallback(
|
|
99
114
|
(t) => {
|
|
100
|
-
|
|
115
|
+
f && !o && P(f, t, c(), void 0);
|
|
101
116
|
},
|
|
102
|
-
[
|
|
103
|
-
),
|
|
117
|
+
[f, o, c]
|
|
118
|
+
), ve = e.useCallback(
|
|
104
119
|
(t) => {
|
|
105
|
-
|
|
120
|
+
h && !o && P(h, t, c(), void 0);
|
|
106
121
|
},
|
|
107
|
-
[
|
|
108
|
-
),
|
|
122
|
+
[h, o, c]
|
|
123
|
+
), Ce = Ne(n, B.dir), ge = E("k-checkbox-wrap", X), U = {
|
|
109
124
|
type: "checkbox",
|
|
110
125
|
className: E("k-checkbox", {
|
|
111
|
-
[`k-checkbox-${
|
|
112
|
-
[`k-rounded-${
|
|
113
|
-
"k-indeterminate":
|
|
126
|
+
[`k-checkbox-${$.sizeMap[m] || m}`]: m,
|
|
127
|
+
[`k-rounded-${$.roundedMap[p] || p}`]: p,
|
|
128
|
+
"k-indeterminate": de,
|
|
114
129
|
"k-disabled": o,
|
|
115
|
-
"k-invalid k-invalid": !(
|
|
130
|
+
"k-invalid k-invalid": !(y || S !== void 0 || S === !0)
|
|
116
131
|
}),
|
|
117
132
|
ref: n,
|
|
118
|
-
name:
|
|
119
|
-
id:
|
|
133
|
+
name: z,
|
|
134
|
+
id: b || q,
|
|
120
135
|
disabled: o,
|
|
121
|
-
required:
|
|
122
|
-
tabIndex:
|
|
136
|
+
required: d !== void 0 ? d : !1,
|
|
137
|
+
tabIndex: Ie(oe, o),
|
|
123
138
|
role: "checkbox",
|
|
124
|
-
checked: !!
|
|
125
|
-
"aria-describedby":
|
|
126
|
-
"aria-labelledby":
|
|
139
|
+
checked: !!O,
|
|
140
|
+
"aria-describedby": J,
|
|
141
|
+
"aria-labelledby": Q,
|
|
127
142
|
"aria-disabled": o || void 0,
|
|
128
|
-
"aria-required":
|
|
129
|
-
autoFocus:
|
|
130
|
-
...
|
|
131
|
-
onChange:
|
|
132
|
-
onKeyDown:
|
|
133
|
-
onKeyUp:
|
|
134
|
-
onFocus:
|
|
135
|
-
onBlur:
|
|
136
|
-
},
|
|
143
|
+
"aria-required": d,
|
|
144
|
+
autoFocus: ne,
|
|
145
|
+
...le,
|
|
146
|
+
onChange: pe,
|
|
147
|
+
onKeyDown: ke,
|
|
148
|
+
onKeyUp: fe,
|
|
149
|
+
onFocus: he,
|
|
150
|
+
onBlur: ve
|
|
151
|
+
}, ye = (
|
|
137
152
|
// removing value prop is required due to bug in react where
|
|
138
153
|
// value set to undefined override default submit value
|
|
139
|
-
|
|
140
|
-
),
|
|
154
|
+
u === void 0 ? /* @__PURE__ */ e.createElement("input", { ...U }) : /* @__PURE__ */ e.createElement("input", { ...U, value: T ? void 0 : u === null ? "" : u })
|
|
155
|
+
), x = I !== void 0 ? /* @__PURE__ */ e.createElement(
|
|
141
156
|
"label",
|
|
142
157
|
{
|
|
143
|
-
className: E("k-checkbox-label",
|
|
144
|
-
htmlFor:
|
|
158
|
+
className: E("k-checkbox-label", Y),
|
|
159
|
+
htmlFor: b || q,
|
|
145
160
|
style: { userSelect: "none" }
|
|
146
161
|
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
) : null,
|
|
150
|
-
return /* @__PURE__ */
|
|
162
|
+
I,
|
|
163
|
+
te && /* @__PURE__ */ e.createElement("span", { className: "k-label-optional" }, be)
|
|
164
|
+
) : null, V = /* @__PURE__ */ e.createElement("span", { className: ge }, ye, Z);
|
|
165
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, F === "before" ? /* @__PURE__ */ e.createElement("div", { dir: "rtl" }, V, x) : F === "after" ? /* @__PURE__ */ e.createElement("div", { dir: "ltr" }, V, x) : /* @__PURE__ */ e.createElement("div", { dir: Ce }, V, x));
|
|
151
166
|
});
|
|
152
|
-
|
|
153
|
-
checked:
|
|
154
|
-
className:
|
|
155
|
-
defaultChecked:
|
|
156
|
-
defaultValue:
|
|
157
|
-
dir:
|
|
158
|
-
disabled:
|
|
159
|
-
id:
|
|
160
|
-
size:
|
|
161
|
-
rounded:
|
|
162
|
-
ariaLabelledBy:
|
|
163
|
-
ariaDescribedBy:
|
|
164
|
-
label:
|
|
165
|
-
labelPlacement:
|
|
166
|
-
labelOptional:
|
|
167
|
-
name:
|
|
168
|
-
tabIndex:
|
|
169
|
-
value:
|
|
170
|
-
validationMessage:
|
|
171
|
-
required:
|
|
172
|
-
validate:
|
|
173
|
-
valid:
|
|
174
|
-
autoFocus:
|
|
175
|
-
onChange:
|
|
176
|
-
onFocus:
|
|
177
|
-
onBlur:
|
|
167
|
+
W.propTypes = {
|
|
168
|
+
checked: a.bool,
|
|
169
|
+
className: a.string,
|
|
170
|
+
defaultChecked: a.bool,
|
|
171
|
+
defaultValue: a.any,
|
|
172
|
+
dir: a.string,
|
|
173
|
+
disabled: a.bool,
|
|
174
|
+
id: a.string,
|
|
175
|
+
size: a.oneOf(["small", "medium", "large"]),
|
|
176
|
+
rounded: a.oneOf(["small", "medium", "large", "none"]),
|
|
177
|
+
ariaLabelledBy: a.string,
|
|
178
|
+
ariaDescribedBy: a.string,
|
|
179
|
+
label: a.any,
|
|
180
|
+
labelPlacement: a.string,
|
|
181
|
+
labelOptional: a.bool,
|
|
182
|
+
name: a.string,
|
|
183
|
+
tabIndex: a.number,
|
|
184
|
+
value: a.any,
|
|
185
|
+
validationMessage: a.string,
|
|
186
|
+
required: a.bool,
|
|
187
|
+
validate: a.bool,
|
|
188
|
+
valid: a.bool,
|
|
189
|
+
autoFocus: a.bool,
|
|
190
|
+
onChange: a.func,
|
|
191
|
+
onFocus: a.func,
|
|
192
|
+
onBlur: a.func
|
|
178
193
|
};
|
|
179
|
-
const
|
|
194
|
+
const A = {
|
|
180
195
|
size: void 0,
|
|
181
196
|
rounded: void 0
|
|
182
197
|
};
|
|
183
|
-
|
|
198
|
+
W.displayName = "KendoCheckbox";
|
|
184
199
|
export {
|
|
185
|
-
|
|
186
|
-
|
|
200
|
+
W as Checkbox,
|
|
201
|
+
Se as CheckboxPropsContext
|
|
187
202
|
};
|
|
@@ -91,7 +91,7 @@ export interface CheckboxProps extends ToggleBaseProps, FormComponentProps, Omit
|
|
|
91
91
|
*
|
|
92
92
|
* @default `medium`
|
|
93
93
|
*/
|
|
94
|
-
rounded?: 'small' | 'medium' | 'large';
|
|
94
|
+
rounded?: 'small' | 'medium' | 'large' | 'none';
|
|
95
95
|
/**
|
|
96
96
|
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
97
97
|
* For example these elements could contain error or hint message.
|
package/colors/ColorInput.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface ColorInputProps {
|
|
|
21
21
|
defaultInputMode?: 'rgba' | 'rgb' | 'hex';
|
|
22
22
|
size?: 'small' | 'medium' | 'large';
|
|
23
23
|
fillMode?: 'solid' | 'outline' | 'flat';
|
|
24
|
-
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
24
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* @hidden
|
package/colors/ColorPicker.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("react"),r=require("prop-types"),n=require("@progress/kendo-react-common"),ke=require("../package-metadata.js"),qe=require("./Picker.js"),Ve=require("./ColorGradient.js"),Q=require("./ColorPalette.js"),N=require("./FlatColorPicker.js"),Me=require("@progress/kendo-react-buttons"),He=require("@progress/kendo-svg-icons"),d=require("../messages/index.js"),We=require("@progress/kendo-react-intl"),Ue=require("../common/AdaptiveMode.js"),je=require("@progress/kendo-react-layout");function Ge(g){const T=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(g){for(const P in g)if(P!=="default"){const F=Object.getOwnPropertyDescriptor(g,P);Object.defineProperty(T,P,F.get?F:{enumerable:!0,get:()=>g[P]})}}return T.default=g,Object.freeze(T)}const t=Ge(xe),Ke={opacity:!0},$e={palette:Q.DEFAULT_PRESET,tileSize:Q.DEFAULT_TILE_SIZE},J=g=>g!==void 0,me=n.createPropsContext(),X=t.forwardRef((g,T)=>{var ue,de;const P=!n.validatePackage(ke.packageMetadata,{component:"ColorPicker"}),F=n.getLicenseMessage(ke.packageMetadata),l=n.usePropsContext(me,g),_=We.useLocalization(),Y=n.useAdaptiveModeContext(),{size:p=w.size,rounded:C=w.rounded,fillMode:x=w.fillMode,gradientSettings:y=w.gradientSettings,paletteSettings:h=w.paletteSettings,flatColorPickerSettings:R,view:f=l.views?void 0:w.view,views:s=f?void 0:w.views,activeView:ee,popupSettings:b,valid:Ce,disabled:q,tabIndex:be,icon:V,svgIcon:M,iconClassName:B,onChange:H,onFocus:W,onBlur:U,onActiveColorClick:j,className:Ee,adaptive:we,adaptiveTitle:te=_.toLanguageString(d.colorPickerAdaptiveTitle,d.messages[d.colorPickerAdaptiveTitle]),adaptiveSubtitle:ne}=l,u=t.useRef(null),A=t.useRef(null),O=t.useRef(null),m=t.useRef(null),S=t.useRef(void 0),Pe=t.useRef(null),[ye,ae]=t.useState(!1),[Se,Te]=t.useState(l.defaultValue||void 0),[_e,he]=t.useState(!1),[D,Re]=t.useState(),G=J(l.value),E=J(l.open),i=G?l.value:Se,v=E?l.open:_e,oe=t.useRef(i),re=t.useCallback(()=>{u.current&&u.current.focus()},[]);t.useImperativeHandle(T,()=>({element:u.current,actionElement:Pe.current,value:i,focus:re}),[i,re]);const K=!!(D&&Y&&D<=Y.medium&&we);t.useEffect(()=>{const e=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(ze.bind(void 0));return document!=null&&document.body&&e&&e.observe(document.body),()=>{document!=null&&document.body&&e&&e.disconnect()}},[]);const o=t.useCallback((e,c)=>{E||(!e&&!c&&u&&u.current&&u.current.focus(),he(e))},[E]),le=t.useMemo(()=>new n.Navigation({root:u,selectors:[".k-colorpicker",".k-color-picker-popup"],tabIndex:0,keyboardEvents:{keydown:{Escape:(e,c,a)=>{o(!1)},Enter:(e,c,a)=>{!E&&e===u.current&&(a.preventDefault(),a.stopPropagation(),o(!0))},ArrowDown:(e,c,a)=>{a.altKey&&(a.preventDefault(),a.stopPropagation(),o(!0))},ArrowUp:(e,c,a)=>{a.altKey&&(a.preventDefault(),a.stopPropagation(),o(!1))},Tab:(e,c,a)=>{var I,pe,ge;if(n.getActiveElement(document)!==u.current){const fe=(I=O.current)==null?void 0:I.wrapperRef.current,z=(pe=A.current)==null?void 0:pe.wrapperRef.current,ve=(ge=m.current)==null?void 0:ge.element;f==="palette"&&fe?n.keepFocusInContainer(a,fe):f==="gradient"&&z?n.keepFocusInContainer(a,z):f==="combo"&&z?n.keepFocusInContainer(a,z.parentElement):s&&ve&&n.keepFocusInContainer(a,ve)}}}}}),[o,E]),Ae=t.useCallback(le.triggerKeyboardEvent.bind(le),[]),Ie=t.useCallback(()=>{E||(A.current&&A.current.wrapperRef.current?n.focusFirstFocusableChild(A.current.wrapperRef.current):O.current?O.current.focus():m.current&&m.current.element&&n.focusFirstFocusableChild(m.current.element))},[E]),L=e=>oe.current=e,ie=t.useCallback(e=>{const c={value:oe.current,nativeEvent:e.nativeEvent,syntheticEvent:e};k(c),o(!v,!0)},[v]),$=t.useCallback(()=>{o(!1,!0)},[o]),Fe=t.useCallback(e=>{j&&j.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:i,target:{element:u.current,value:i}})},[j,i]),Be=t.useCallback(e=>{S.current?(clearTimeout(S.current),S.current=void 0):(ae(!0),K&&!v&&o(!0)),W&&W.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})},[K,W,v,o]),Oe=t.useCallback(()=>{o(!1,!0),ae(!1),S.current=void 0},[]),De=t.useCallback(e=>{clearTimeout(S.current),S.current=window.setTimeout(Oe),U&&U.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})},[U]),k=t.useCallback((e,c)=>{var I;const a=c?e.rgbaValue||"":(I=e.value)!=null?I:"";G||Te(a),H&&H.call(void 0,{value:a,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent,target:{element:u.current,value:a}}),o(!1)},[G,H]),ce=t.useCallback(e=>k(e,!0),[J,k]),Z=t.useCallback(e=>t.createElement(t.Fragment,null,(f==="combo"||f==="gradient")&&t.createElement(Ve.ColorGradient,{...y,_adaptive:e,ref:A,isInsidePopup:!0,size:e?"large":p,value:i,onChange:k}),(f==="combo"||f==="palette")&&t.createElement(Q.ColorPalette,{...h,ref:O,size:e?"large":p,value:i,onChange:ce}),s&&s[0]==="gradient"&&s[1]==="palette"&&t.createElement(N.FlatColorPicker,{...R,_paletteSettings:h,_gradientSettings:{_adaptive:e,...y},ref:m,size:e?"large":p,rounded:C,views:["gradient","palette"],activeView:ee,setOpen:o,showButtons:!e,value:i,onChange:k,setAdaptiveModeValue:L}),s&&s[0]==="palette"&&s[1]==="gradient"&&t.createElement(N.FlatColorPicker,{...R,_paletteSettings:h,_gradientSettings:{_adaptive:e,...y},ref:m,size:e?"large":p,rounded:C,views:["palette","gradient"],setOpen:o,showButtons:!e,value:i,onChange:k,setAdaptiveModeValue:L}),s&&s.includes("gradient")&&!s.includes("palette")&&t.createElement(N.FlatColorPicker,{...R,_gradientSettings:{_adaptive:e,...y},ref:m,size:e?"large":p,rounded:C,views:["gradient"],showButtons:!e,setOpen:o,value:i,onChange:k,setAdaptiveModeValue:L}),s&&s.includes("palette")&&!s.includes("gradient")&&t.createElement(N.FlatColorPicker,{...R,_paletteSettings:h,_gradientSettings:{_adaptive:e,...y},ref:m,size:e?"large":p,rounded:C,views:["palette"],showButtons:!e,setOpen:o,value:i,onChange:k,setAdaptiveModeValue:L}),P&&t.createElement(n.WatermarkOverlay,{message:F})),[ee,x,R,y,k,ce,h,o,p,i,f,s]),Le=t.useCallback(()=>{var c;const e={animation:!!((c=b==null?void 0:b.animate)==null||c),title:te,subTitle:ne,expand:v,onClose:$,windowWidth:D,footer:{cancelText:_.toLanguageString(d.flatColorPickerCancelBtn,d.messages[d.flatColorPickerCancelBtn]),onCancel:$,applyText:_.toLanguageString(d.flatColorPickerApplyBtn,d.messages[d.flatColorPickerApplyBtn]),onApply:ie}};return t.createElement(Ue.AdaptiveMode,{...e},t.createElement(je.ActionSheetContent,null,Z(!0)))},[b==null?void 0:b.animate,te,ne,v,$,D,_,ie,Z]),ze=t.useCallback(e=>{for(const c of e)Re(c.target.clientWidth)},[]),se=n.useDir(u,l.dir),Ne=Ce!==!1;return t.createElement("span",{id:l.id,role:"combobox","aria-label":l.ariaLabel,"aria-labelledby":l.ariaLabelledBy,"aria-describedby":l.ariaDescribedBy,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":`k-colorpicker-popup-${(ue=l.id)!=null?ue:0}`,"aria-disabled":q?"true":void 0,className:n.classNames("k-colorpicker","k-picker","k-icon-picker",{[`k-picker-${n.kendoThemeMaps.sizeMap[p]||p}`]:p,[`k-picker-${x}`]:x,[`k-rounded-${n.kendoThemeMaps.roundedMap[C]||C}`]:C,"k-invalid":!Ne,"k-disabled":q,"k-focus":ye,className:Ee}),ref:u,tabIndex:n.getTabIndex(be,q),title:l.title,onKeyDown:Ae,onFocus:Be,onBlur:De,dir:se},t.createElement(qe.Picker,{dir:se,open:v,onOpen:Ie,popupAnchor:u.current||void 0,popupSettings:{id:`k-colorpicker-popup-${(de=l.id)!=null?de:0}`,...b},input:t.createElement("span",{onClick:Fe,className:"k-input-inner"},t.createElement("span",{className:n.classNames("k-value-icon","k-color-preview",{"k-no-color":!i,"k-icon-color-preview":V||M||B})},B&&t.createElement("span",{className:n.classNames("k-color-preview-icon",B)}),!B&&(V||M)&&t.createElement(n.IconWrap,{name:V,icon:M}),t.createElement("span",{className:"k-color-preview-mask",style:{backgroundColor:i}}))),button:t.createElement(Me.Button,{tabIndex:-1,type:"button",onClick:()=>o(!v),className:"k-input-button",icon:"caret-alt-down",svgIcon:He.caretAltDownIcon,"aria-label":_.toLanguageString(d.colorPickerDropdownButtonAriaLabel,d.messages[d.colorPickerDropdownButtonAriaLabel])}),content:Z(!1),_mobileMode:K,_actionSheet:Le()}))});X.propTypes={value:r.string,defaultValue:r.string,disabled:r.bool,view:r.oneOf(["gradient","palette","combo"]),views:r.arrayOf(r.oneOf(["gradient","palette"])),dir:r.string,id:r.string,icon:r.string,svgIcon:n.svgIconPropType,ariaLabelledBy:r.string,ariaDescribedBy:r.string,size:r.oneOf(["small","medium","large"]),rounded:r.oneOf(["small","medium","large","full"]),fillMode:r.oneOf(["solid","flat","outline"]),className:r.string,adaptive:r.bool,adaptiveTitle:r.string,adaptiveSubtitle:r.string};const w={size:void 0,rounded:void 0,fillMode:void 0,view:"palette",views:["gradient","palette"],gradientSettings:Ke,paletteSettings:$e};X.displayName="KendoColorPicker";exports.ColorPicker=X;exports.ColorPickerPropsContext=me;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("react"),r=require("prop-types"),n=require("@progress/kendo-react-common"),ke=require("../package-metadata.js"),qe=require("./Picker.js"),Ve=require("./ColorGradient.js"),Q=require("./ColorPalette.js"),N=require("./FlatColorPicker.js"),Me=require("@progress/kendo-react-buttons"),He=require("@progress/kendo-svg-icons"),d=require("../messages/index.js"),We=require("@progress/kendo-react-intl"),Ue=require("../common/AdaptiveMode.js"),je=require("@progress/kendo-react-layout");function Ge(g){const T=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(g){for(const P in g)if(P!=="default"){const F=Object.getOwnPropertyDescriptor(g,P);Object.defineProperty(T,P,F.get?F:{enumerable:!0,get:()=>g[P]})}}return T.default=g,Object.freeze(T)}const t=Ge(xe),Ke={opacity:!0},$e={palette:Q.DEFAULT_PRESET,tileSize:Q.DEFAULT_TILE_SIZE},J=g=>g!==void 0,me=n.createPropsContext(),X=t.forwardRef((g,T)=>{var ue,de;const P=!n.validatePackage(ke.packageMetadata,{component:"ColorPicker"}),F=n.getLicenseMessage(ke.packageMetadata),l=n.usePropsContext(me,g),_=We.useLocalization(),Y=n.useAdaptiveModeContext(),{size:p=w.size,rounded:C=w.rounded,fillMode:x=w.fillMode,gradientSettings:y=w.gradientSettings,paletteSettings:h=w.paletteSettings,flatColorPickerSettings:R,view:f=l.views?void 0:w.view,views:s=f?void 0:w.views,activeView:ee,popupSettings:b,valid:Ce,disabled:q,tabIndex:be,icon:V,svgIcon:M,iconClassName:B,onChange:H,onFocus:W,onBlur:U,onActiveColorClick:j,className:Ee,adaptive:we,adaptiveTitle:te=_.toLanguageString(d.colorPickerAdaptiveTitle,d.messages[d.colorPickerAdaptiveTitle]),adaptiveSubtitle:ne}=l,u=t.useRef(null),A=t.useRef(null),O=t.useRef(null),m=t.useRef(null),S=t.useRef(void 0),Pe=t.useRef(null),[ye,ae]=t.useState(!1),[Se,Te]=t.useState(l.defaultValue||void 0),[_e,he]=t.useState(!1),[D,Re]=t.useState(),G=J(l.value),E=J(l.open),i=G?l.value:Se,v=E?l.open:_e,oe=t.useRef(i),re=t.useCallback(()=>{u.current&&u.current.focus()},[]);t.useImperativeHandle(T,()=>({element:u.current,actionElement:Pe.current,value:i,focus:re}),[i,re]);const K=!!(D&&Y&&D<=Y.medium&&we);t.useEffect(()=>{const e=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(ze.bind(void 0));return document!=null&&document.body&&e&&e.observe(document.body),()=>{document!=null&&document.body&&e&&e.disconnect()}},[]);const o=t.useCallback((e,c)=>{E||(!e&&!c&&u&&u.current&&u.current.focus(),he(e))},[E]),le=t.useMemo(()=>new n.Navigation({root:u,selectors:[".k-colorpicker",".k-color-picker-popup"],tabIndex:0,keyboardEvents:{keydown:{Escape:(e,c,a)=>{o(!1)},Enter:(e,c,a)=>{!E&&e===u.current&&(a.preventDefault(),a.stopPropagation(),o(!0))},ArrowDown:(e,c,a)=>{a.altKey&&(a.preventDefault(),a.stopPropagation(),o(!0))},ArrowUp:(e,c,a)=>{a.altKey&&(a.preventDefault(),a.stopPropagation(),o(!1))},Tab:(e,c,a)=>{var I,pe,ge;if(n.getActiveElement(document)!==u.current){const fe=(I=O.current)==null?void 0:I.wrapperRef.current,z=(pe=A.current)==null?void 0:pe.wrapperRef.current,ve=(ge=m.current)==null?void 0:ge.element;f==="palette"&&fe?n.keepFocusInContainer(a,fe):f==="gradient"&&z?n.keepFocusInContainer(a,z):f==="combo"&&z?n.keepFocusInContainer(a,z.parentElement):s&&ve&&n.keepFocusInContainer(a,ve)}}}}}),[o,E]),Ae=t.useCallback(le.triggerKeyboardEvent.bind(le),[]),Ie=t.useCallback(()=>{E||(A.current&&A.current.wrapperRef.current?n.focusFirstFocusableChild(A.current.wrapperRef.current):O.current?O.current.focus():m.current&&m.current.element&&n.focusFirstFocusableChild(m.current.element))},[E]),L=e=>oe.current=e,ie=t.useCallback(e=>{const c={value:oe.current,nativeEvent:e.nativeEvent,syntheticEvent:e};k(c),o(!v,!0)},[v]),$=t.useCallback(()=>{o(!1,!0)},[o]),Fe=t.useCallback(e=>{j&&j.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:i,target:{element:u.current,value:i}})},[j,i]),Be=t.useCallback(e=>{S.current?(clearTimeout(S.current),S.current=void 0):(ae(!0),K&&!v&&o(!0)),W&&W.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})},[K,W,v,o]),Oe=t.useCallback(()=>{o(!1,!0),ae(!1),S.current=void 0},[]),De=t.useCallback(e=>{clearTimeout(S.current),S.current=window.setTimeout(Oe),U&&U.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})},[U]),k=t.useCallback((e,c)=>{var I;const a=c?e.rgbaValue||"":(I=e.value)!=null?I:"";G||Te(a),H&&H.call(void 0,{value:a,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent,target:{element:u.current,value:a}}),o(!1)},[G,H]),ce=t.useCallback(e=>k(e,!0),[J,k]),Z=t.useCallback(e=>t.createElement(t.Fragment,null,(f==="combo"||f==="gradient")&&t.createElement(Ve.ColorGradient,{...y,_adaptive:e,ref:A,isInsidePopup:!0,size:e?"large":p,value:i,onChange:k}),(f==="combo"||f==="palette")&&t.createElement(Q.ColorPalette,{...h,ref:O,size:e?"large":p,value:i,onChange:ce}),s&&s[0]==="gradient"&&s[1]==="palette"&&t.createElement(N.FlatColorPicker,{...R,_paletteSettings:h,_gradientSettings:{_adaptive:e,...y},ref:m,size:e?"large":p,rounded:C,views:["gradient","palette"],activeView:ee,setOpen:o,showButtons:!e,value:i,onChange:k,setAdaptiveModeValue:L}),s&&s[0]==="palette"&&s[1]==="gradient"&&t.createElement(N.FlatColorPicker,{...R,_paletteSettings:h,_gradientSettings:{_adaptive:e,...y},ref:m,size:e?"large":p,rounded:C,views:["palette","gradient"],setOpen:o,showButtons:!e,value:i,onChange:k,setAdaptiveModeValue:L}),s&&s.includes("gradient")&&!s.includes("palette")&&t.createElement(N.FlatColorPicker,{...R,_gradientSettings:{_adaptive:e,...y},ref:m,size:e?"large":p,rounded:C,views:["gradient"],showButtons:!e,setOpen:o,value:i,onChange:k,setAdaptiveModeValue:L}),s&&s.includes("palette")&&!s.includes("gradient")&&t.createElement(N.FlatColorPicker,{...R,_paletteSettings:h,_gradientSettings:{_adaptive:e,...y},ref:m,size:e?"large":p,rounded:C,views:["palette"],showButtons:!e,setOpen:o,value:i,onChange:k,setAdaptiveModeValue:L}),P&&t.createElement(n.WatermarkOverlay,{message:F})),[ee,x,R,y,k,ce,h,o,p,i,f,s]),Le=t.useCallback(()=>{var c;const e={animation:!!((c=b==null?void 0:b.animate)==null||c),title:te,subTitle:ne,expand:v,onClose:$,windowWidth:D,footer:{cancelText:_.toLanguageString(d.flatColorPickerCancelBtn,d.messages[d.flatColorPickerCancelBtn]),onCancel:$,applyText:_.toLanguageString(d.flatColorPickerApplyBtn,d.messages[d.flatColorPickerApplyBtn]),onApply:ie}};return t.createElement(Ue.AdaptiveMode,{...e},t.createElement(je.ActionSheetContent,null,Z(!0)))},[b==null?void 0:b.animate,te,ne,v,$,D,_,ie,Z]),ze=t.useCallback(e=>{for(const c of e)Re(c.target.clientWidth)},[]),se=n.useDir(u,l.dir),Ne=Ce!==!1;return t.createElement("span",{id:l.id,role:"combobox","aria-label":l.ariaLabel,"aria-labelledby":l.ariaLabelledBy,"aria-describedby":l.ariaDescribedBy,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":`k-colorpicker-popup-${(ue=l.id)!=null?ue:0}`,"aria-disabled":q?"true":void 0,className:n.classNames("k-colorpicker","k-picker","k-icon-picker",{[`k-picker-${n.kendoThemeMaps.sizeMap[p]||p}`]:p,[`k-picker-${x}`]:x,[`k-rounded-${n.kendoThemeMaps.roundedMap[C]||C}`]:C,"k-invalid":!Ne,"k-disabled":q,"k-focus":ye,className:Ee}),ref:u,tabIndex:n.getTabIndex(be,q),title:l.title,onKeyDown:Ae,onFocus:Be,onBlur:De,dir:se},t.createElement(qe.Picker,{dir:se,open:v,onOpen:Ie,popupAnchor:u.current||void 0,popupSettings:{id:`k-colorpicker-popup-${(de=l.id)!=null?de:0}`,...b},input:t.createElement("span",{onClick:Fe,className:"k-input-inner"},t.createElement("span",{className:n.classNames("k-value-icon","k-color-preview",{"k-no-color":!i,"k-icon-color-preview":V||M||B})},B&&t.createElement("span",{className:n.classNames("k-color-preview-icon",B)}),!B&&(V||M)&&t.createElement(n.IconWrap,{name:V,icon:M}),t.createElement("span",{className:"k-color-preview-mask",style:{backgroundColor:i}}))),button:t.createElement(Me.Button,{tabIndex:-1,type:"button",onClick:()=>o(!v),className:"k-input-button",icon:"caret-alt-down",svgIcon:He.caretAltDownIcon,"aria-label":_.toLanguageString(d.colorPickerDropdownButtonAriaLabel,d.messages[d.colorPickerDropdownButtonAriaLabel])}),content:Z(!1),_mobileMode:K,_actionSheet:Le()}))});X.propTypes={value:r.string,defaultValue:r.string,disabled:r.bool,view:r.oneOf(["gradient","palette","combo"]),views:r.arrayOf(r.oneOf(["gradient","palette"])),dir:r.string,id:r.string,icon:r.string,svgIcon:n.svgIconPropType,ariaLabelledBy:r.string,ariaDescribedBy:r.string,size:r.oneOf(["small","medium","large"]),rounded:r.oneOf(["small","medium","large","full","none"]),fillMode:r.oneOf(["solid","flat","outline"]),className:r.string,adaptive:r.bool,adaptiveTitle:r.string,adaptiveSubtitle:r.string};const w={size:void 0,rounded:void 0,fillMode:void 0,view:"palette",views:["gradient","palette"],gradientSettings:Ke,paletteSettings:$e};X.displayName="KendoColorPicker";exports.ColorPicker=X;exports.ColorPickerPropsContext=me;
|
package/colors/ColorPicker.mjs
CHANGED
|
@@ -382,7 +382,7 @@ Ee.propTypes = {
|
|
|
382
382
|
ariaLabelledBy: r.string,
|
|
383
383
|
ariaDescribedBy: r.string,
|
|
384
384
|
size: r.oneOf(["small", "medium", "large"]),
|
|
385
|
-
rounded: r.oneOf(["small", "medium", "large", "full"]),
|
|
385
|
+
rounded: r.oneOf(["small", "medium", "large", "full", "none"]),
|
|
386
386
|
fillMode: r.oneOf(["solid", "flat", "outline"]),
|
|
387
387
|
className: r.string,
|
|
388
388
|
adaptive: r.bool,
|
package/colors/HexInput.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface HexInputProps {
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
size?: 'small' | 'medium' | 'large';
|
|
17
17
|
fillMode?: 'solid' | 'outline' | 'flat';
|
|
18
|
-
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
18
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* @hidden
|
|
@@ -190,7 +190,7 @@ export interface ColorPickerProps {
|
|
|
190
190
|
* <ColorPicker rounded="full" />
|
|
191
191
|
* ```
|
|
192
192
|
*/
|
|
193
|
-
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
193
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
194
194
|
/**
|
|
195
195
|
* Configures the `fillMode` of the ColorPicker.
|
|
196
196
|
*
|