@progress/kendo-react-inputs 15.2.0-develop.1 → 15.2.0-develop.2
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 +79 -77
- package/colors/ColorContrastLabels.js +1 -1
- package/colors/ColorContrastLabels.mjs +2 -2
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +51 -52
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +71 -72
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +247 -239
- package/colors/FlatColorPicker.d.ts +4 -4
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +104 -100
- package/colors/interfaces/ColorPaletteProps.d.ts +7 -0
- package/colors/interfaces/ColorPickerPaletteSettings.d.ts +5 -0
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/maskedtextbox/MaskedTextBox.d.ts +1 -0
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +26 -23
- package/maskedtextbox/MaskedTextBoxProps.d.ts +7 -0
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +2 -2
- package/otpinput/OTPInput.js +1 -1
- package/otpinput/OTPInput.mjs +141 -143
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +32 -30
- package/range-slider/RangeSlider.js +11 -11
- package/range-slider/RangeSlider.mjs +54 -54
- package/rating/Rating.d.ts +12 -0
- package/rating/Rating.js +2 -2
- package/rating/Rating.mjs +91 -92
- package/slider/Slider.d.ts +12 -0
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +61 -56
- package/switch/Switch.d.ts +15 -0
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +82 -79
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +11 -12
|
@@ -144,13 +144,13 @@ export interface FlatColorPickerProps {
|
|
|
144
144
|
*/
|
|
145
145
|
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
146
146
|
/**
|
|
147
|
-
*
|
|
147
|
+
* Specifies the settings of the ColorGradient when rendered inside the FlatColorPicker.
|
|
148
148
|
*/
|
|
149
|
-
|
|
149
|
+
gradientSettings?: ColorPickerGradientSettings;
|
|
150
150
|
/**
|
|
151
|
-
*
|
|
151
|
+
* Specifies the settings of the ColorPalette when rendered inside the FlatColorPicker.
|
|
152
152
|
*/
|
|
153
|
-
|
|
153
|
+
paletteSettings?: ColorPickerPaletteSettings;
|
|
154
154
|
/**
|
|
155
155
|
* @hidden
|
|
156
156
|
*/
|
|
@@ -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 X=require("react"),o=require("prop-types"),n=require("@progress/kendo-react-common"),s=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-svg-icons"),Y=require("./ColorPalette.js"),Z=require("./ColorGradient.js"),x=require("../package-metadata.js"),p=require("@progress/kendo-react-intl"),l=require("../messages/index.js");function ee(e){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const f in e)if(f!=="default"){const B=Object.getOwnPropertyDescriptor(e,f);Object.defineProperty(b,f,B.get?B:{enumerable:!0,get:()=>e[f]})}}return b.default=e,Object.freeze(b)}const t=ee(X),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),o=require("prop-types"),n=require("@progress/kendo-react-common"),s=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-svg-icons"),Y=require("./ColorPalette.js"),Z=require("./ColorGradient.js"),x=require("../package-metadata.js"),p=require("@progress/kendo-react-intl"),l=require("../messages/index.js");function ee(e){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const f in e)if(f!=="default"){const B=Object.getOwnPropertyDescriptor(e,f);Object.defineProperty(b,f,B.get?B:{enumerable:!0,get:()=>e[f]})}}return b.default=e,Object.freeze(b)}const t=ee(X),V=t.forwardRef((e,b)=>{const f=!n.validatePackage(x.packageMetadata,{component:"FlatColorPicker"}),B=n.getLicenseMessage(x.packageMetadata),h=t.useRef(null),w=t.useRef(null),F=t.useRef(null),{defaultValue:P,showButtons:N=!0,showPreview:z=!0,showClearButton:T=!0,view:E=e.views?void 0:"ColorGradient",views:d=E?void 0:["gradient","palette"],activeView:S="gradient",size:i=void 0,rounded:j=void 0}=e,[C,D]=t.useState((E||"ColorGradient")==="ColorGradient"),[v,_]=t.useState((d!=null?d:[])[0]==="gradient"&&S==="gradient"),[c,y]=t.useState(e.value||P||void 0),[k,L]=t.useState(e.value||P||void 0),M=e.value!==void 0?e.value:void 0;t.useEffect(()=>{y(e.value)},[e.value]);const g=p.useLocalization(),A=t.useCallback(()=>{h.current&&h.current.focus()},[h]);t.useImperativeHandle(h,()=>({element:w.current,focus:A,props:e,value:M}),[M,A,e]),t.useImperativeHandle(b,()=>h.current);const R=t.useCallback(a=>{(a==="ColorGradient"&&!C||a==="ColorPalette"&&C)&&D(!C)},[C]),I=t.useCallback(a=>{a==="gradient"&&!v||a==="palette"&&v||a==="palette"&&S==="gradient"?_(!v):a==="gradient"&&S==="palette"&&_(!0)},[S,v]),K=t.useCallback(a=>{var u;const r=P||void 0;if(y(r),L(r),(u=e.gradientSettings)!=null&&u._adaptive&&e.setAdaptiveModeValue&&e.setAdaptiveModeValue(r),e.onPreviewChange){const G={value:r,nativeEvent:a.nativeEvent,syntheticEvent:a};e.onPreviewChange.call(void 0,G)}},[P,e.onPreviewChange]),q=t.useCallback(a=>{var r;if(y(a.value),e.onPreviewChange){const u={value:a.value,nativeEvent:a.nativeEvent,syntheticEvent:a.syntheticEvent};e.onPreviewChange.call(void 0,u)}(r=e.gradientSettings)!=null&&r._adaptive&&e.setAdaptiveModeValue&&e.setAdaptiveModeValue(a.value)},[e.onPreviewChange]),H=t.useCallback(a=>{if(c!==void 0&&L(c),e.onChange){const r={value:c,nativeEvent:a.nativeEvent,syntheticEvent:a};e.onChange.call(void 0,r)}},[c,e.onChange]),W=t.useCallback(()=>{y(k),e.setOpen&&e.setOpen(!1)},[k]),$=t.useCallback(a=>{if(y(k),e.onPreviewChange){const r={value:k,nativeEvent:a.nativeEvent,syntheticEvent:a};e.onPreviewChange.call(void 0,r)}},[k,e.onPreviewChange]),J=t.useCallback(a=>{var u,G;if((!a.relatedTarget||!((u=w.current)!=null&&u.contains(a.relatedTarget)))&&!((G=e.gradientSettings)!=null&&G._adaptive)&&(!N&&c!==void 0&&L(c),!N&&e.onChange)){const U={value:c,nativeEvent:a.nativeEvent,syntheticEvent:a};e.onChange.call(void 0,U)}},[c,N,e.onChange]),O=t.useMemo(()=>new n.Navigation({root:w,selectors:[".k-coloreditor"],tabIndex:0,keyboardEvents:{keydown:{Tab:(a,r,u)=>{n.getActiveElement(document)===a?n.disableNavigatableContainer(a):n.keepFocusInContainer(u,a)},Enter:(a,r,u)=>{n.getActiveElement(document)===a&&(n.focusFirstFocusableChild(a),n.enableNavigatableContainer(a))},Escape:(a,r,u)=>{n.getActiveElement(document)!==a&&(a.focus(),n.disableNavigatableContainer(a))}}}}),[]),Q=t.useCallback(O.triggerKeyboardEvent.bind(O),[]);return t.createElement("div",{id:e.id,role:"textbox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-disabled":e.disabled?"true":void 0,style:{position:"relative",...e.style},ref:w,tabIndex:n.getTabIndex(e.tabIndex,e.disabled),className:n.classNames("k-flatcolorpicker k-coloreditor",{[`k-coloreditor-${n.kendoThemeMaps.sizeMap[i]||i}`]:i,"k-disabled":e.disabled},e.className),onBlur:J,onKeyDown:Q},e.header||t.createElement("div",{className:"k-coloreditor-header k-hstack"},t.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},d&&d[0]==="gradient"&&d[1]==="palette"&&t.createElement(s.ButtonGroup,{className:"k-button-group-flat"},t.createElement(s.Button,{type:"button","aria-label":g.toLanguageString(l.flatColorPickerColorGradientBtn,l.messages[l.flatColorPickerColorGradientBtn]),size:i,fillMode:"flat",svgIcon:m.dropletSliderIcon,className:v?"k-selected":void 0,onClick:()=>I("gradient")}),t.createElement(s.Button,{type:"button","aria-label":g.toLanguageString(l.flatColorPickerColorPaletteBtn,l.messages[l.flatColorPickerColorPaletteBtn]),size:i,fillMode:"flat",svgIcon:m.paletteIcon,className:v?void 0:"k-selected",onClick:()=>I("palette")})),d&&d[0]==="palette"&&d[1]==="gradient"&&t.createElement(s.ButtonGroup,{className:"k-button-group-flat"},t.createElement(s.Button,{type:"button","aria-label":g.toLanguageString(l.flatColorPickerColorPaletteBtn,l.messages[l.flatColorPickerColorPaletteBtn]),fillMode:"flat",size:i,svgIcon:m.paletteIcon,className:v?void 0:"k-selected",onClick:()=>I("palette")}),t.createElement(s.Button,{type:"button","aria-label":g.toLanguageString(l.flatColorPickerColorGradientBtn,l.messages[l.flatColorPickerColorGradientBtn]),fillMode:"flat",size:i,svgIcon:m.dropletSliderIcon,className:v?"k-selected":void 0,onClick:()=>I("gradient")})),E&&t.createElement(s.ButtonGroup,{className:"k-button-group-flat"},t.createElement(s.Button,{type:"button","aria-label":g.toLanguageString(l.flatColorPickerColorGradientBtn,l.messages[l.flatColorPickerColorGradientBtn]),fillMode:"flat",size:i,className:C?"k-selected":void 0,onClick:()=>R("ColorGradient"),icon:"droplet-slider",svgIcon:m.dropletSliderIcon}),t.createElement(s.Button,{type:"button","aria-label":g.toLanguageString(l.flatColorPickerColorPaletteBtn,l.messages[l.flatColorPickerColorPaletteBtn]),fillMode:"flat",size:i,className:C?void 0:"k-selected",onClick:()=>R("ColorPalette"),icon:"palette",svgIcon:m.paletteIcon}))),t.createElement("div",{className:"k-spacer"}),t.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},T&&t.createElement(s.Button,{type:"button",fillMode:"flat",size:i,onClick:K,"aria-label":g.toLanguageString(l.flatColorPickerClearBtn,l.messages[l.flatColorPickerClearBtn]),icon:"droplet-slash",svgIcon:m.dropletSlashIcon}),z&&t.createElement("div",{className:"k-coloreditor-preview k-vstack"},t.createElement("span",{className:n.classNames("k-coloreditor-preview-color","k-color-preview",{"k-no-color":M===void 0})},t.createElement("span",{className:"k-color-preview-mask",style:{background:c||void 0}})),t.createElement("span",{className:n.classNames("k-coloreditor-current-color","k-color-preview",{"k-no-color":k===void 0}),onClick:$},t.createElement("span",{className:"k-color-preview-mask",style:{background:k||void 0}})))),f&&t.createElement(n.WatermarkOverlay,{message:B})),t.createElement("div",{className:"k-coloreditor-views k-vstack"},(E&&C||d&&v)&&t.createElement(Z.ColorGradient,{ref:F,role:"none",ariaLabel:void 0,value:c,onChange:q,opacity:e.opacity,format:e.format,size:i,rounded:j,_adaptive:e.gradientSettings?e.gradientSettings._adaptive:void 0,...e.gradientSettings}),(E&&!C||d&&!v)&&t.createElement(Y.ColorPalette,{value:c,onChange:q,size:i,ariaLabel:g.toLanguageString(l.colorPaletteAriaLabel,l.messages[l.colorPaletteAriaLabel]),...e.paletteSettings})),N&&t.createElement("div",{className:"k-coloreditor-footer k-actions k-actions-start k-actions-horizontal"},t.createElement(s.Button,{type:"button",themeColor:"primary",className:"k-coloreditor-apply",onClick:H},g.toLanguageString(l.flatColorPickerApplyBtn,l.messages[l.flatColorPickerApplyBtn])),t.createElement(s.Button,{type:"button",className:"k-coloreditor-cancel",onClick:W},g.toLanguageString(l.flatColorPickerCancelBtn,l.messages[l.flatColorPickerCancelBtn]))))}),te={id:o.string,style:o.any,className:o.string,value:o.string,defaultValue:o.string,onPreviewChange:o.func,onChange:o.func,opacity:o.bool,format:o.any,tabIndex:o.number,ariaLabel:o.string,ariaLabelledBy:o.string,disabled:o.bool,view:o.any,header:o.any,showClearButton:o.bool,showPreview:o.bool,showButtons:o.bool,views:o.array,size:o.oneOf(["small","medium","large"])};V.displayName="KendoFlatColorPicker";V.propTypes=te;exports.FlatColorPicker=V;
|
|
@@ -7,61 +7,61 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as a from "react";
|
|
9
9
|
import l from "prop-types";
|
|
10
|
-
import { validatePackage as
|
|
11
|
-
import { ButtonGroup as
|
|
12
|
-
import { dropletSliderIcon as
|
|
13
|
-
import { ColorPalette as
|
|
14
|
-
import { ColorGradient as
|
|
10
|
+
import { validatePackage as ie, getLicenseMessage as re, Navigation as ce, getActiveElement as B, disableNavigatableContainer as K, focusFirstFocusableChild as se, enableNavigatableContainer as de, keepFocusInContainer as ve, classNames as M, kendoThemeMaps as ue, getTabIndex as ge, WatermarkOverlay as me } from "@progress/kendo-react-common";
|
|
11
|
+
import { ButtonGroup as V, Button as u } from "@progress/kendo-react-buttons";
|
|
12
|
+
import { dropletSliderIcon as G, paletteIcon as _, dropletSlashIcon as ke } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { ColorPalette as Ce } from "./ColorPalette.mjs";
|
|
14
|
+
import { ColorGradient as fe } from "./ColorGradient.mjs";
|
|
15
15
|
import { packageMetadata as O } from "../package-metadata.mjs";
|
|
16
|
-
import { useLocalization as
|
|
17
|
-
import { flatColorPickerColorGradientBtn as k, messages as
|
|
18
|
-
const
|
|
19
|
-
const
|
|
16
|
+
import { useLocalization as be } from "@progress/kendo-react-intl";
|
|
17
|
+
import { flatColorPickerColorGradientBtn as k, messages as v, flatColorPickerColorPaletteBtn as C, flatColorPickerClearBtn as T, colorPaletteAriaLabel as D, flatColorPickerApplyBtn as H, flatColorPickerCancelBtn as W } from "../messages/index.mjs";
|
|
18
|
+
const $ = a.forwardRef((e, j) => {
|
|
19
|
+
const q = !ie(O, { component: "FlatColorPicker" }), J = re(O), f = a.useRef(null), y = a.useRef(null), Q = a.useRef(null), {
|
|
20
20
|
defaultValue: b,
|
|
21
21
|
showButtons: w = !0,
|
|
22
|
-
showPreview:
|
|
23
|
-
showClearButton:
|
|
22
|
+
showPreview: U = !0,
|
|
23
|
+
showClearButton: X = !0,
|
|
24
24
|
view: h = e.views ? void 0 : "ColorGradient",
|
|
25
25
|
views: r = h ? void 0 : ["gradient", "palette"],
|
|
26
|
-
activeView:
|
|
26
|
+
activeView: P = "gradient",
|
|
27
27
|
size: o = void 0,
|
|
28
|
-
rounded:
|
|
29
|
-
} = e, [g,
|
|
28
|
+
rounded: Y = void 0
|
|
29
|
+
} = e, [g, Z] = a.useState(
|
|
30
30
|
(h || "ColorGradient") === "ColorGradient"
|
|
31
31
|
), [s, x] = a.useState(
|
|
32
|
-
(r != null ? r : [])[0] === "gradient" &&
|
|
33
|
-
), [i, E] = a.useState(e.value || b || void 0), [m,
|
|
32
|
+
(r != null ? r : [])[0] === "gradient" && P === "gradient"
|
|
33
|
+
), [i, E] = a.useState(e.value || b || void 0), [m, L] = a.useState(e.value || b || void 0), I = e.value !== void 0 ? e.value : void 0;
|
|
34
34
|
a.useEffect(() => {
|
|
35
35
|
E(e.value);
|
|
36
36
|
}, [e.value]);
|
|
37
|
-
const d =
|
|
37
|
+
const d = be(), A = a.useCallback(() => {
|
|
38
38
|
f.current && f.current.focus();
|
|
39
39
|
}, [f]);
|
|
40
40
|
a.useImperativeHandle(
|
|
41
41
|
f,
|
|
42
42
|
() => ({
|
|
43
43
|
element: y.current,
|
|
44
|
-
focus:
|
|
44
|
+
focus: A,
|
|
45
45
|
props: e,
|
|
46
|
-
value:
|
|
46
|
+
value: I
|
|
47
47
|
}),
|
|
48
|
-
[
|
|
49
|
-
), a.useImperativeHandle(
|
|
50
|
-
const
|
|
48
|
+
[I, A, e]
|
|
49
|
+
), a.useImperativeHandle(j, () => f.current);
|
|
50
|
+
const R = a.useCallback(
|
|
51
51
|
(t) => {
|
|
52
|
-
(t === "ColorGradient" && !g || t === "ColorPalette" && g) &&
|
|
52
|
+
(t === "ColorGradient" && !g || t === "ColorPalette" && g) && Z(!g);
|
|
53
53
|
},
|
|
54
54
|
[g]
|
|
55
|
-
),
|
|
55
|
+
), N = a.useCallback(
|
|
56
56
|
(t) => {
|
|
57
|
-
t === "gradient" && !s || t === "palette" && s || t === "palette" &&
|
|
57
|
+
t === "gradient" && !s || t === "palette" && s || t === "palette" && P === "gradient" ? x(!s) : t === "gradient" && P === "palette" && x(!0);
|
|
58
58
|
},
|
|
59
|
-
[
|
|
60
|
-
),
|
|
59
|
+
[P, s]
|
|
60
|
+
), p = a.useCallback(
|
|
61
61
|
(t) => {
|
|
62
62
|
var c;
|
|
63
63
|
const n = b || void 0;
|
|
64
|
-
if (E(n),
|
|
64
|
+
if (E(n), L(n), (c = e.gradientSettings) != null && c._adaptive && e.setAdaptiveModeValue && e.setAdaptiveModeValue(n), e.onPreviewChange) {
|
|
65
65
|
const S = {
|
|
66
66
|
value: n,
|
|
67
67
|
nativeEvent: t.nativeEvent,
|
|
@@ -82,12 +82,12 @@ const W = a.forwardRef((e, $) => {
|
|
|
82
82
|
};
|
|
83
83
|
e.onPreviewChange.call(void 0, c);
|
|
84
84
|
}
|
|
85
|
-
(n = e.
|
|
85
|
+
(n = e.gradientSettings) != null && n._adaptive && e.setAdaptiveModeValue && e.setAdaptiveModeValue(t.value);
|
|
86
86
|
},
|
|
87
87
|
[e.onPreviewChange]
|
|
88
|
-
),
|
|
88
|
+
), ee = a.useCallback(
|
|
89
89
|
(t) => {
|
|
90
|
-
if (i !== void 0 &&
|
|
90
|
+
if (i !== void 0 && L(i), e.onChange) {
|
|
91
91
|
const n = {
|
|
92
92
|
value: i,
|
|
93
93
|
nativeEvent: t.nativeEvent,
|
|
@@ -97,9 +97,9 @@ const W = a.forwardRef((e, $) => {
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
[i, e.onChange]
|
|
100
|
-
),
|
|
100
|
+
), ae = a.useCallback(() => {
|
|
101
101
|
E(m), e.setOpen && e.setOpen(!1);
|
|
102
|
-
}, [m]),
|
|
102
|
+
}, [m]), te = a.useCallback(
|
|
103
103
|
(t) => {
|
|
104
104
|
if (E(m), e.onPreviewChange) {
|
|
105
105
|
const n = {
|
|
@@ -111,40 +111,40 @@ const W = a.forwardRef((e, $) => {
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
[m, e.onPreviewChange]
|
|
114
|
-
),
|
|
114
|
+
), le = a.useCallback(
|
|
115
115
|
(t) => {
|
|
116
116
|
var c, S;
|
|
117
|
-
if ((!t.relatedTarget || !((c = y.current) != null && c.contains(t.relatedTarget))) && !((S = e.
|
|
118
|
-
const
|
|
117
|
+
if ((!t.relatedTarget || !((c = y.current) != null && c.contains(t.relatedTarget))) && !((S = e.gradientSettings) != null && S._adaptive) && (!w && i !== void 0 && L(i), !w && e.onChange)) {
|
|
118
|
+
const oe = {
|
|
119
119
|
value: i,
|
|
120
120
|
nativeEvent: t.nativeEvent,
|
|
121
121
|
syntheticEvent: t
|
|
122
122
|
};
|
|
123
|
-
e.onChange.call(void 0,
|
|
123
|
+
e.onChange.call(void 0, oe);
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
[i, w, e.onChange]
|
|
127
127
|
), z = a.useMemo(
|
|
128
|
-
() => new
|
|
128
|
+
() => new ce({
|
|
129
129
|
root: y,
|
|
130
130
|
selectors: [".k-coloreditor"],
|
|
131
131
|
tabIndex: 0,
|
|
132
132
|
keyboardEvents: {
|
|
133
133
|
keydown: {
|
|
134
134
|
Tab: (t, n, c) => {
|
|
135
|
-
|
|
135
|
+
B(document) === t ? K(t) : ve(c, t);
|
|
136
136
|
},
|
|
137
137
|
Enter: (t, n, c) => {
|
|
138
|
-
|
|
138
|
+
B(document) === t && (se(t), de(t));
|
|
139
139
|
},
|
|
140
140
|
Escape: (t, n, c) => {
|
|
141
|
-
|
|
141
|
+
B(document) !== t && (t.focus(), K(t));
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
}),
|
|
146
146
|
[]
|
|
147
|
-
),
|
|
147
|
+
), ne = a.useCallback(z.triggerKeyboardEvent.bind(z), []);
|
|
148
148
|
return /* @__PURE__ */ a.createElement(
|
|
149
149
|
"div",
|
|
150
150
|
{
|
|
@@ -155,123 +155,123 @@ const W = a.forwardRef((e, $) => {
|
|
|
155
155
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
156
156
|
style: { position: "relative", ...e.style },
|
|
157
157
|
ref: y,
|
|
158
|
-
tabIndex:
|
|
158
|
+
tabIndex: ge(e.tabIndex, e.disabled),
|
|
159
159
|
className: M(
|
|
160
160
|
"k-flatcolorpicker k-coloreditor",
|
|
161
161
|
{
|
|
162
|
-
[`k-coloreditor-${
|
|
162
|
+
[`k-coloreditor-${ue.sizeMap[o] || o}`]: o,
|
|
163
163
|
"k-disabled": e.disabled
|
|
164
164
|
},
|
|
165
165
|
e.className
|
|
166
166
|
),
|
|
167
|
-
onBlur:
|
|
168
|
-
onKeyDown:
|
|
167
|
+
onBlur: le,
|
|
168
|
+
onKeyDown: ne
|
|
169
169
|
},
|
|
170
|
-
e.header || /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header k-hstack" }, /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, r && r[0] === "gradient" && r[1] === "palette" && /* @__PURE__ */ a.createElement(
|
|
171
|
-
|
|
170
|
+
e.header || /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header k-hstack" }, /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, r && r[0] === "gradient" && r[1] === "palette" && /* @__PURE__ */ a.createElement(V, { className: "k-button-group-flat" }, /* @__PURE__ */ a.createElement(
|
|
171
|
+
u,
|
|
172
172
|
{
|
|
173
173
|
type: "button",
|
|
174
174
|
"aria-label": d.toLanguageString(
|
|
175
175
|
k,
|
|
176
|
-
|
|
176
|
+
v[k]
|
|
177
177
|
),
|
|
178
178
|
size: o,
|
|
179
179
|
fillMode: "flat",
|
|
180
|
-
svgIcon:
|
|
180
|
+
svgIcon: G,
|
|
181
181
|
className: s ? "k-selected" : void 0,
|
|
182
|
-
onClick: () =>
|
|
182
|
+
onClick: () => N("gradient")
|
|
183
183
|
}
|
|
184
184
|
), /* @__PURE__ */ a.createElement(
|
|
185
|
-
|
|
185
|
+
u,
|
|
186
186
|
{
|
|
187
187
|
type: "button",
|
|
188
188
|
"aria-label": d.toLanguageString(
|
|
189
189
|
C,
|
|
190
|
-
|
|
190
|
+
v[C]
|
|
191
191
|
),
|
|
192
192
|
size: o,
|
|
193
193
|
fillMode: "flat",
|
|
194
|
-
svgIcon:
|
|
194
|
+
svgIcon: _,
|
|
195
195
|
className: s ? void 0 : "k-selected",
|
|
196
|
-
onClick: () =>
|
|
196
|
+
onClick: () => N("palette")
|
|
197
197
|
}
|
|
198
|
-
)), r && r[0] === "palette" && r[1] === "gradient" && /* @__PURE__ */ a.createElement(
|
|
199
|
-
|
|
198
|
+
)), r && r[0] === "palette" && r[1] === "gradient" && /* @__PURE__ */ a.createElement(V, { className: "k-button-group-flat" }, /* @__PURE__ */ a.createElement(
|
|
199
|
+
u,
|
|
200
200
|
{
|
|
201
201
|
type: "button",
|
|
202
202
|
"aria-label": d.toLanguageString(
|
|
203
203
|
C,
|
|
204
|
-
|
|
204
|
+
v[C]
|
|
205
205
|
),
|
|
206
206
|
fillMode: "flat",
|
|
207
207
|
size: o,
|
|
208
|
-
svgIcon:
|
|
208
|
+
svgIcon: _,
|
|
209
209
|
className: s ? void 0 : "k-selected",
|
|
210
|
-
onClick: () =>
|
|
210
|
+
onClick: () => N("palette")
|
|
211
211
|
}
|
|
212
212
|
), /* @__PURE__ */ a.createElement(
|
|
213
|
-
|
|
213
|
+
u,
|
|
214
214
|
{
|
|
215
215
|
type: "button",
|
|
216
216
|
"aria-label": d.toLanguageString(
|
|
217
217
|
k,
|
|
218
|
-
|
|
218
|
+
v[k]
|
|
219
219
|
),
|
|
220
220
|
fillMode: "flat",
|
|
221
221
|
size: o,
|
|
222
|
-
svgIcon:
|
|
222
|
+
svgIcon: G,
|
|
223
223
|
className: s ? "k-selected" : void 0,
|
|
224
|
-
onClick: () =>
|
|
224
|
+
onClick: () => N("gradient")
|
|
225
225
|
}
|
|
226
|
-
)), h && /* @__PURE__ */ a.createElement(
|
|
227
|
-
|
|
226
|
+
)), h && /* @__PURE__ */ a.createElement(V, { className: "k-button-group-flat" }, /* @__PURE__ */ a.createElement(
|
|
227
|
+
u,
|
|
228
228
|
{
|
|
229
229
|
type: "button",
|
|
230
230
|
"aria-label": d.toLanguageString(
|
|
231
231
|
k,
|
|
232
|
-
|
|
232
|
+
v[k]
|
|
233
233
|
),
|
|
234
234
|
fillMode: "flat",
|
|
235
235
|
size: o,
|
|
236
236
|
className: g ? "k-selected" : void 0,
|
|
237
|
-
onClick: () =>
|
|
237
|
+
onClick: () => R("ColorGradient"),
|
|
238
238
|
icon: "droplet-slider",
|
|
239
|
-
svgIcon:
|
|
239
|
+
svgIcon: G
|
|
240
240
|
}
|
|
241
241
|
), /* @__PURE__ */ a.createElement(
|
|
242
|
-
|
|
242
|
+
u,
|
|
243
243
|
{
|
|
244
244
|
type: "button",
|
|
245
245
|
"aria-label": d.toLanguageString(
|
|
246
246
|
C,
|
|
247
|
-
|
|
247
|
+
v[C]
|
|
248
248
|
),
|
|
249
249
|
fillMode: "flat",
|
|
250
250
|
size: o,
|
|
251
251
|
className: g ? void 0 : "k-selected",
|
|
252
|
-
onClick: () =>
|
|
252
|
+
onClick: () => R("ColorPalette"),
|
|
253
253
|
icon: "palette",
|
|
254
|
-
svgIcon:
|
|
254
|
+
svgIcon: _
|
|
255
255
|
}
|
|
256
|
-
))), /* @__PURE__ */ a.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
257
|
-
|
|
256
|
+
))), /* @__PURE__ */ a.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, X && /* @__PURE__ */ a.createElement(
|
|
257
|
+
u,
|
|
258
258
|
{
|
|
259
259
|
type: "button",
|
|
260
260
|
fillMode: "flat",
|
|
261
261
|
size: o,
|
|
262
|
-
onClick:
|
|
262
|
+
onClick: p,
|
|
263
263
|
"aria-label": d.toLanguageString(
|
|
264
264
|
T,
|
|
265
|
-
|
|
265
|
+
v[T]
|
|
266
266
|
),
|
|
267
267
|
icon: "droplet-slash",
|
|
268
|
-
svgIcon:
|
|
268
|
+
svgIcon: ke
|
|
269
269
|
}
|
|
270
|
-
),
|
|
270
|
+
), U && /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ a.createElement(
|
|
271
271
|
"span",
|
|
272
272
|
{
|
|
273
273
|
className: M("k-coloreditor-preview-color", "k-color-preview", {
|
|
274
|
-
"k-no-color":
|
|
274
|
+
"k-no-color": I === void 0
|
|
275
275
|
})
|
|
276
276
|
},
|
|
277
277
|
/* @__PURE__ */ a.createElement(
|
|
@@ -287,7 +287,7 @@ const W = a.forwardRef((e, $) => {
|
|
|
287
287
|
className: M("k-coloreditor-current-color", "k-color-preview", {
|
|
288
288
|
"k-no-color": m === void 0
|
|
289
289
|
}),
|
|
290
|
-
onClick:
|
|
290
|
+
onClick: te
|
|
291
291
|
},
|
|
292
292
|
/* @__PURE__ */ a.createElement(
|
|
293
293
|
"span",
|
|
@@ -296,11 +296,11 @@ const W = a.forwardRef((e, $) => {
|
|
|
296
296
|
style: { background: m || void 0 }
|
|
297
297
|
}
|
|
298
298
|
)
|
|
299
|
-
))),
|
|
299
|
+
))), q && /* @__PURE__ */ a.createElement(me, { message: J })),
|
|
300
300
|
/* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-views k-vstack" }, (h && g || r && s) && /* @__PURE__ */ a.createElement(
|
|
301
|
-
|
|
301
|
+
fe,
|
|
302
302
|
{
|
|
303
|
-
ref:
|
|
303
|
+
ref: Q,
|
|
304
304
|
role: "none",
|
|
305
305
|
ariaLabel: void 0,
|
|
306
306
|
value: i,
|
|
@@ -308,37 +308,41 @@ const W = a.forwardRef((e, $) => {
|
|
|
308
308
|
opacity: e.opacity,
|
|
309
309
|
format: e.format,
|
|
310
310
|
size: o,
|
|
311
|
-
rounded:
|
|
312
|
-
_adaptive: e.
|
|
313
|
-
...e.
|
|
311
|
+
rounded: Y,
|
|
312
|
+
_adaptive: e.gradientSettings ? e.gradientSettings._adaptive : void 0,
|
|
313
|
+
...e.gradientSettings
|
|
314
314
|
}
|
|
315
315
|
), (h && !g || r && !s) && /* @__PURE__ */ a.createElement(
|
|
316
|
-
|
|
316
|
+
Ce,
|
|
317
317
|
{
|
|
318
318
|
value: i,
|
|
319
319
|
onChange: F,
|
|
320
320
|
size: o,
|
|
321
|
-
|
|
321
|
+
ariaLabel: d.toLanguageString(
|
|
322
|
+
D,
|
|
323
|
+
v[D]
|
|
324
|
+
),
|
|
325
|
+
...e.paletteSettings
|
|
322
326
|
}
|
|
323
327
|
)),
|
|
324
328
|
w && /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-start k-actions-horizontal" }, /* @__PURE__ */ a.createElement(
|
|
325
|
-
|
|
329
|
+
u,
|
|
326
330
|
{
|
|
327
331
|
type: "button",
|
|
328
332
|
themeColor: "primary",
|
|
329
333
|
className: "k-coloreditor-apply",
|
|
330
|
-
onClick:
|
|
334
|
+
onClick: ee
|
|
331
335
|
},
|
|
332
336
|
d.toLanguageString(
|
|
333
|
-
|
|
334
|
-
|
|
337
|
+
H,
|
|
338
|
+
v[H]
|
|
335
339
|
)
|
|
336
|
-
), /* @__PURE__ */ a.createElement(
|
|
337
|
-
|
|
338
|
-
|
|
340
|
+
), /* @__PURE__ */ a.createElement(u, { type: "button", className: "k-coloreditor-cancel", onClick: ae }, d.toLanguageString(
|
|
341
|
+
W,
|
|
342
|
+
v[W]
|
|
339
343
|
)))
|
|
340
344
|
);
|
|
341
|
-
}),
|
|
345
|
+
}), he = {
|
|
342
346
|
id: l.string,
|
|
343
347
|
style: l.any,
|
|
344
348
|
className: l.string,
|
|
@@ -360,8 +364,8 @@ const W = a.forwardRef((e, $) => {
|
|
|
360
364
|
views: l.array,
|
|
361
365
|
size: l.oneOf(["small", "medium", "large"])
|
|
362
366
|
};
|
|
363
|
-
|
|
364
|
-
|
|
367
|
+
$.displayName = "KendoFlatColorPicker";
|
|
368
|
+
$.propTypes = he;
|
|
365
369
|
export {
|
|
366
|
-
|
|
370
|
+
$ as FlatColorPicker
|
|
367
371
|
};
|
|
@@ -90,6 +90,13 @@ export interface ColorPaletteProps {
|
|
|
90
90
|
* This property is related to accessibility.
|
|
91
91
|
*/
|
|
92
92
|
ariaLabelledBy?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Sets the `aria-label` attribute on the ColorPalette.
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
* This property is related to accessibility.
|
|
98
|
+
*/
|
|
99
|
+
ariaLabel?: string;
|
|
93
100
|
/**
|
|
94
101
|
* @hidden
|
|
95
102
|
*/
|
|
@@ -36,4 +36,9 @@ export interface ColorPickerPaletteSettings {
|
|
|
36
36
|
* * `{ width: number, height: number }`
|
|
37
37
|
*/
|
|
38
38
|
tileSize?: number | TileSize;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the `aria-label` attribute of the color palette grid.
|
|
41
|
+
* Use this to provide an accessible name when the palette is embedded inside another component.
|
|
42
|
+
*/
|
|
43
|
+
ariaLabel?: string;
|
|
39
44
|
}
|