@progress/kendo-react-inputs 14.5.0-develop.4 → 14.5.0-develop.6
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/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +225 -220
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +88 -88
- package/colors/interfaces/ColorPickerProps.d.ts +6 -0
- package/common/AdaptiveMode.d.ts +1 -1
- package/common/AdaptiveMode.js +1 -1
- package/common/AdaptiveMode.mjs +1 -1
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
|
@@ -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),L=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:
|
|
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),L=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:S=!0,showPreview:z=!0,showClearButton:T=!0,view:E=e.views?void 0:"ColorGradient",views:d=E?void 0:["gradient","palette"],activeView:N="gradient",size:i=void 0,rounded:j=void 0}=e,[C,D]=t.useState((E||"ColorGradient")==="ColorGradient"),[g,V]=t.useState((d!=null?d:[])[0]==="gradient"&&N==="gradient"),[c,y]=t.useState(e.value||P||void 0),[k,M]=t.useState(e.value||P||void 0),_=e.value!==void 0?e.value:void 0;t.useEffect(()=>{y(e.value)},[e.value]);const v=p.useLocalization(),R=t.useCallback(()=>{h.current&&h.current.focus()},[h]);t.useImperativeHandle(h,()=>({element:w.current,focus:R,props:e,value:_}),[_,R,e]),t.useImperativeHandle(b,()=>h.current);const q=t.useCallback(a=>{(a==="ColorGradient"&&!C||a==="ColorPalette"&&C)&&D(!C)},[C]),I=t.useCallback(a=>{a==="gradient"&&!g||a==="palette"&&g||a==="palette"&&N==="gradient"?V(!g):a==="gradient"&&N==="palette"&&V(!0)},[N,g]),K=t.useCallback(a=>{var u;const r=P||void 0;if(y(r),M(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]),A=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&&M(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)&&(!S&&c!==void 0&&M(c),!S&&e.onChange)){const U={value:c,nativeEvent:a.nativeEvent,syntheticEvent:a};e.onChange.call(void 0,U)}},[c,S,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":v.toLanguageString(l.flatColorPickerColorGradientBtn,l.messages[l.flatColorPickerColorGradientBtn]),togglable:!0,size:i,fillMode:"flat",svgIcon:m.dropletSliderIcon,selected:g,onClick:()=>I("gradient")}),t.createElement(s.Button,{type:"button","aria-label":v.toLanguageString(l.flatColorPickerColorPaletteBtn,l.messages[l.flatColorPickerColorPaletteBtn]),togglable:!0,size:i,fillMode:"flat",svgIcon:m.paletteIcon,selected:!g,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":v.toLanguageString(l.flatColorPickerColorPaletteBtn,l.messages[l.flatColorPickerColorPaletteBtn]),togglable:!0,fillMode:"flat",size:i,svgIcon:m.paletteIcon,selected:!g,onClick:()=>I("palette")}),t.createElement(s.Button,{type:"button","aria-label":v.toLanguageString(l.flatColorPickerColorGradientBtn,l.messages[l.flatColorPickerColorGradientBtn]),togglable:!0,fillMode:"flat",size:i,svgIcon:m.dropletSliderIcon,selected:g,onClick:()=>I("gradient")})),E&&t.createElement(s.ButtonGroup,{className:"k-button-group-flat"},t.createElement(s.Button,{type:"button","aria-label":v.toLanguageString(l.flatColorPickerColorGradientBtn,l.messages[l.flatColorPickerColorGradientBtn]),togglable:!0,fillMode:"flat",size:i,selected:C,onClick:()=>q("ColorGradient"),icon:"droplet-slider",svgIcon:m.dropletSliderIcon}),t.createElement(s.Button,{type:"button","aria-label":v.toLanguageString(l.flatColorPickerColorPaletteBtn,l.messages[l.flatColorPickerColorPaletteBtn]),togglable:!0,fillMode:"flat",size:i,selected:!C,onClick:()=>q("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":v.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":_===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&&g)&&t.createElement(Z.ColorGradient,{ref:F,role:"none",ariaLabel:void 0,value:c,onChange:A,opacity:e.opacity,format:e.format,size:i,rounded:j,_adaptive:e._gradientSettings?e._gradientSettings._adaptive:void 0,...e._gradientSettings}),(E&&!C||d&&!g)&&t.createElement(Y.ColorPalette,{ariaDisabled:!0,ariaLabelledBy:"required_label",value:c,onChange:A,size:i,...e._paletteSettings})),S&&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},v.toLanguageString(l.flatColorPickerApplyBtn,l.messages[l.flatColorPickerApplyBtn])),t.createElement(s.Button,{type:"button",className:"k-coloreditor-cancel",onClick:W},v.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"])};L.displayName="KendoFlatColorPicker";L.propTypes=te;exports.FlatColorPicker=L;
|
|
@@ -7,34 +7,34 @@
|
|
|
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 V, paletteIcon as G, dropletSlashIcon as
|
|
13
|
-
import { ColorPalette as
|
|
14
|
-
import { ColorGradient as
|
|
10
|
+
import { validatePackage as oe, getLicenseMessage as ie, Navigation as re, getActiveElement as L, disableNavigatableContainer as K, focusFirstFocusableChild as ce, enableNavigatableContainer as se, keepFocusInContainer as de, classNames as _, kendoThemeMaps as ve, getTabIndex as ue, WatermarkOverlay as ge } from "@progress/kendo-react-common";
|
|
11
|
+
import { ButtonGroup as M, Button as v } from "@progress/kendo-react-buttons";
|
|
12
|
+
import { dropletSliderIcon as V, paletteIcon as G, dropletSlashIcon as me } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { ColorPalette as ke } from "./ColorPalette.mjs";
|
|
14
|
+
import { ColorGradient as Ce } 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 fe } from "@progress/kendo-react-intl";
|
|
17
|
+
import { flatColorPickerColorGradientBtn as k, messages as u, flatColorPickerColorPaletteBtn as C, flatColorPickerClearBtn as T, flatColorPickerApplyBtn as D, flatColorPickerCancelBtn as H } from "../messages/index.mjs";
|
|
18
|
+
const W = a.forwardRef((e, q) => {
|
|
19
|
+
const $ = !oe(O, { component: "FlatColorPicker" }), j = ie(O), f = a.useRef(null), y = a.useRef(null), J = a.useRef(null), {
|
|
20
20
|
defaultValue: b,
|
|
21
21
|
showButtons: w = !0,
|
|
22
|
-
showPreview:
|
|
23
|
-
showClearButton:
|
|
22
|
+
showPreview: Q = !0,
|
|
23
|
+
showClearButton: U = !0,
|
|
24
24
|
view: h = e.views ? void 0 : "ColorGradient",
|
|
25
25
|
views: r = h ? void 0 : ["gradient", "palette"],
|
|
26
26
|
activeView: P = "gradient",
|
|
27
27
|
size: o = void 0,
|
|
28
|
-
rounded:
|
|
29
|
-
} = e, [
|
|
28
|
+
rounded: X = void 0
|
|
29
|
+
} = e, [g, Y] = a.useState(
|
|
30
30
|
(h || "ColorGradient") === "ColorGradient"
|
|
31
31
|
), [s, x] = a.useState(
|
|
32
32
|
(r != null ? r : [])[0] === "gradient" && P === "gradient"
|
|
33
|
-
), [i, E] = a.useState(e.value || b || void 0), [
|
|
33
|
+
), [i, E] = a.useState(e.value || b || void 0), [m, I] = a.useState(e.value || b || void 0), B = e.value !== void 0 ? e.value : void 0;
|
|
34
34
|
a.useEffect(() => {
|
|
35
35
|
E(e.value);
|
|
36
36
|
}, [e.value]);
|
|
37
|
-
const
|
|
37
|
+
const d = fe(), R = a.useCallback(() => {
|
|
38
38
|
f.current && f.current.focus();
|
|
39
39
|
}, [f]);
|
|
40
40
|
a.useImperativeHandle(
|
|
@@ -46,18 +46,18 @@ const D = a.forwardRef((e, H) => {
|
|
|
46
46
|
value: B
|
|
47
47
|
}),
|
|
48
48
|
[B, R, e]
|
|
49
|
-
), a.useImperativeHandle(
|
|
49
|
+
), a.useImperativeHandle(q, () => f.current);
|
|
50
50
|
const A = a.useCallback(
|
|
51
51
|
(t) => {
|
|
52
|
-
(t === "ColorGradient" && !
|
|
52
|
+
(t === "ColorGradient" && !g || t === "ColorPalette" && g) && Y(!g);
|
|
53
53
|
},
|
|
54
|
-
[
|
|
54
|
+
[g]
|
|
55
55
|
), N = a.useCallback(
|
|
56
56
|
(t) => {
|
|
57
57
|
t === "gradient" && !s || t === "palette" && s || t === "palette" && P === "gradient" ? x(!s) : t === "gradient" && P === "palette" && x(!0);
|
|
58
58
|
},
|
|
59
59
|
[P, s]
|
|
60
|
-
),
|
|
60
|
+
), Z = a.useCallback(
|
|
61
61
|
(t) => {
|
|
62
62
|
var c;
|
|
63
63
|
const n = b || void 0;
|
|
@@ -85,7 +85,7 @@ const D = a.forwardRef((e, H) => {
|
|
|
85
85
|
(n = e._gradientSettings) != null && n._adaptive && e.setAdaptiveModeValue && e.setAdaptiveModeValue(t.value);
|
|
86
86
|
},
|
|
87
87
|
[e.onPreviewChange]
|
|
88
|
-
),
|
|
88
|
+
), p = a.useCallback(
|
|
89
89
|
(t) => {
|
|
90
90
|
if (i !== void 0 && I(i), e.onChange) {
|
|
91
91
|
const n = {
|
|
@@ -97,54 +97,54 @@ const D = a.forwardRef((e, H) => {
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
[i, e.onChange]
|
|
100
|
-
),
|
|
101
|
-
E(
|
|
102
|
-
}, [
|
|
100
|
+
), ee = a.useCallback(() => {
|
|
101
|
+
E(m), e.setOpen && e.setOpen(!1);
|
|
102
|
+
}, [m]), ae = a.useCallback(
|
|
103
103
|
(t) => {
|
|
104
|
-
if (E(
|
|
104
|
+
if (E(m), e.onPreviewChange) {
|
|
105
105
|
const n = {
|
|
106
|
-
value:
|
|
106
|
+
value: m,
|
|
107
107
|
nativeEvent: t.nativeEvent,
|
|
108
108
|
syntheticEvent: t
|
|
109
109
|
};
|
|
110
110
|
e.onPreviewChange.call(void 0, n);
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
[
|
|
114
|
-
),
|
|
113
|
+
[m, e.onPreviewChange]
|
|
114
|
+
), te = a.useCallback(
|
|
115
115
|
(t) => {
|
|
116
116
|
var c, S;
|
|
117
117
|
if ((!t.relatedTarget || !((c = y.current) != null && c.contains(t.relatedTarget))) && !((S = e._gradientSettings) != null && S._adaptive) && (!w && i !== void 0 && I(i), !w && e.onChange)) {
|
|
118
|
-
const
|
|
118
|
+
const ne = {
|
|
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, ne);
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
[i, w, e.onChange]
|
|
127
127
|
), z = a.useMemo(
|
|
128
|
-
() => new
|
|
128
|
+
() => new re({
|
|
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
|
+
L(document) === t ? K(t) : de(c, t);
|
|
136
136
|
},
|
|
137
137
|
Enter: (t, n, c) => {
|
|
138
|
-
|
|
138
|
+
L(document) === t && (ce(t), se(t));
|
|
139
139
|
},
|
|
140
140
|
Escape: (t, n, c) => {
|
|
141
|
-
|
|
141
|
+
L(document) !== t && (t.focus(), K(t));
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
}),
|
|
146
146
|
[]
|
|
147
|
-
),
|
|
147
|
+
), le = a.useCallback(z.triggerKeyboardEvent.bind(z), []);
|
|
148
148
|
return /* @__PURE__ */ a.createElement(
|
|
149
149
|
"div",
|
|
150
150
|
{
|
|
@@ -155,25 +155,25 @@ const D = a.forwardRef((e, H) => {
|
|
|
155
155
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
156
156
|
style: { position: "relative", ...e.style },
|
|
157
157
|
ref: y,
|
|
158
|
-
tabIndex:
|
|
159
|
-
className:
|
|
158
|
+
tabIndex: ue(e.tabIndex, e.disabled),
|
|
159
|
+
className: _(
|
|
160
160
|
"k-flatcolorpicker k-coloreditor",
|
|
161
161
|
{
|
|
162
|
-
[`k-coloreditor-${
|
|
162
|
+
[`k-coloreditor-${ve.sizeMap[o] || o}`]: o,
|
|
163
163
|
"k-disabled": e.disabled
|
|
164
164
|
},
|
|
165
165
|
e.className
|
|
166
166
|
),
|
|
167
|
-
onBlur:
|
|
168
|
-
onKeyDown:
|
|
167
|
+
onBlur: te,
|
|
168
|
+
onKeyDown: le
|
|
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(M, { className: "k-button-group-flat" }, /* @__PURE__ */ a.createElement(
|
|
171
|
+
v,
|
|
172
172
|
{
|
|
173
173
|
type: "button",
|
|
174
|
-
"aria-label":
|
|
174
|
+
"aria-label": d.toLanguageString(
|
|
175
175
|
k,
|
|
176
|
-
|
|
176
|
+
u[k]
|
|
177
177
|
),
|
|
178
178
|
togglable: !0,
|
|
179
179
|
size: o,
|
|
@@ -183,12 +183,12 @@ const D = a.forwardRef((e, H) => {
|
|
|
183
183
|
onClick: () => N("gradient")
|
|
184
184
|
}
|
|
185
185
|
), /* @__PURE__ */ a.createElement(
|
|
186
|
-
|
|
186
|
+
v,
|
|
187
187
|
{
|
|
188
188
|
type: "button",
|
|
189
|
-
"aria-label":
|
|
189
|
+
"aria-label": d.toLanguageString(
|
|
190
190
|
C,
|
|
191
|
-
|
|
191
|
+
u[C]
|
|
192
192
|
),
|
|
193
193
|
togglable: !0,
|
|
194
194
|
size: o,
|
|
@@ -197,13 +197,13 @@ const D = a.forwardRef((e, H) => {
|
|
|
197
197
|
selected: !s,
|
|
198
198
|
onClick: () => N("palette")
|
|
199
199
|
}
|
|
200
|
-
)), r && r[0] === "palette" && r[1] === "gradient" && /* @__PURE__ */ a.createElement(
|
|
201
|
-
|
|
200
|
+
)), r && r[0] === "palette" && r[1] === "gradient" && /* @__PURE__ */ a.createElement(M, { className: "k-button-group-flat" }, /* @__PURE__ */ a.createElement(
|
|
201
|
+
v,
|
|
202
202
|
{
|
|
203
203
|
type: "button",
|
|
204
|
-
"aria-label":
|
|
204
|
+
"aria-label": d.toLanguageString(
|
|
205
205
|
C,
|
|
206
|
-
|
|
206
|
+
u[C]
|
|
207
207
|
),
|
|
208
208
|
togglable: !0,
|
|
209
209
|
fillMode: "flat",
|
|
@@ -213,12 +213,12 @@ const D = a.forwardRef((e, H) => {
|
|
|
213
213
|
onClick: () => N("palette")
|
|
214
214
|
}
|
|
215
215
|
), /* @__PURE__ */ a.createElement(
|
|
216
|
-
|
|
216
|
+
v,
|
|
217
217
|
{
|
|
218
218
|
type: "button",
|
|
219
|
-
"aria-label":
|
|
219
|
+
"aria-label": d.toLanguageString(
|
|
220
220
|
k,
|
|
221
|
-
|
|
221
|
+
u[k]
|
|
222
222
|
),
|
|
223
223
|
togglable: !0,
|
|
224
224
|
fillMode: "flat",
|
|
@@ -227,56 +227,56 @@ const D = a.forwardRef((e, H) => {
|
|
|
227
227
|
selected: s,
|
|
228
228
|
onClick: () => N("gradient")
|
|
229
229
|
}
|
|
230
|
-
)), h && /* @__PURE__ */ a.createElement(
|
|
231
|
-
|
|
230
|
+
)), h && /* @__PURE__ */ a.createElement(M, { className: "k-button-group-flat" }, /* @__PURE__ */ a.createElement(
|
|
231
|
+
v,
|
|
232
232
|
{
|
|
233
233
|
type: "button",
|
|
234
|
-
"aria-label":
|
|
234
|
+
"aria-label": d.toLanguageString(
|
|
235
235
|
k,
|
|
236
|
-
|
|
236
|
+
u[k]
|
|
237
237
|
),
|
|
238
238
|
togglable: !0,
|
|
239
239
|
fillMode: "flat",
|
|
240
240
|
size: o,
|
|
241
|
-
selected:
|
|
241
|
+
selected: g,
|
|
242
242
|
onClick: () => A("ColorGradient"),
|
|
243
243
|
icon: "droplet-slider",
|
|
244
244
|
svgIcon: V
|
|
245
245
|
}
|
|
246
246
|
), /* @__PURE__ */ a.createElement(
|
|
247
|
-
|
|
247
|
+
v,
|
|
248
248
|
{
|
|
249
249
|
type: "button",
|
|
250
|
-
"aria-label":
|
|
250
|
+
"aria-label": d.toLanguageString(
|
|
251
251
|
C,
|
|
252
|
-
|
|
252
|
+
u[C]
|
|
253
253
|
),
|
|
254
254
|
togglable: !0,
|
|
255
255
|
fillMode: "flat",
|
|
256
256
|
size: o,
|
|
257
|
-
selected: !
|
|
257
|
+
selected: !g,
|
|
258
258
|
onClick: () => A("ColorPalette"),
|
|
259
259
|
icon: "palette",
|
|
260
260
|
svgIcon: G
|
|
261
261
|
}
|
|
262
|
-
))), /* @__PURE__ */ a.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
263
|
-
|
|
262
|
+
))), /* @__PURE__ */ a.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, U && /* @__PURE__ */ a.createElement(
|
|
263
|
+
v,
|
|
264
264
|
{
|
|
265
265
|
type: "button",
|
|
266
266
|
fillMode: "flat",
|
|
267
267
|
size: o,
|
|
268
|
-
onClick:
|
|
269
|
-
"aria-label":
|
|
268
|
+
onClick: Z,
|
|
269
|
+
"aria-label": d.toLanguageString(
|
|
270
270
|
T,
|
|
271
|
-
|
|
271
|
+
u[T]
|
|
272
272
|
),
|
|
273
273
|
icon: "droplet-slash",
|
|
274
|
-
svgIcon:
|
|
274
|
+
svgIcon: me
|
|
275
275
|
}
|
|
276
|
-
),
|
|
276
|
+
), Q && /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ a.createElement(
|
|
277
277
|
"span",
|
|
278
278
|
{
|
|
279
|
-
className:
|
|
279
|
+
className: _("k-coloreditor-preview-color", "k-color-preview", {
|
|
280
280
|
"k-no-color": B === void 0
|
|
281
281
|
})
|
|
282
282
|
},
|
|
@@ -290,23 +290,23 @@ const D = a.forwardRef((e, H) => {
|
|
|
290
290
|
), /* @__PURE__ */ a.createElement(
|
|
291
291
|
"span",
|
|
292
292
|
{
|
|
293
|
-
className:
|
|
294
|
-
"k-no-color":
|
|
293
|
+
className: _("k-coloreditor-current-color", "k-color-preview", {
|
|
294
|
+
"k-no-color": m === void 0
|
|
295
295
|
}),
|
|
296
|
-
onClick:
|
|
296
|
+
onClick: ae
|
|
297
297
|
},
|
|
298
298
|
/* @__PURE__ */ a.createElement(
|
|
299
299
|
"span",
|
|
300
300
|
{
|
|
301
301
|
className: "k-color-preview-mask",
|
|
302
|
-
style: { background:
|
|
302
|
+
style: { background: m || void 0 }
|
|
303
303
|
}
|
|
304
304
|
)
|
|
305
|
-
))),
|
|
306
|
-
/* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-views k-vstack" }, (h &&
|
|
307
|
-
|
|
305
|
+
))), $ && /* @__PURE__ */ a.createElement(ge, { message: j })),
|
|
306
|
+
/* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-views k-vstack" }, (h && g || r && s) && /* @__PURE__ */ a.createElement(
|
|
307
|
+
Ce,
|
|
308
308
|
{
|
|
309
|
-
ref:
|
|
309
|
+
ref: J,
|
|
310
310
|
role: "none",
|
|
311
311
|
ariaLabel: void 0,
|
|
312
312
|
value: i,
|
|
@@ -314,12 +314,12 @@ const D = a.forwardRef((e, H) => {
|
|
|
314
314
|
opacity: e.opacity,
|
|
315
315
|
format: e.format,
|
|
316
316
|
size: o,
|
|
317
|
-
rounded:
|
|
317
|
+
rounded: X,
|
|
318
318
|
_adaptive: e._gradientSettings ? e._gradientSettings._adaptive : void 0,
|
|
319
319
|
...e._gradientSettings
|
|
320
320
|
}
|
|
321
|
-
), (h && !
|
|
322
|
-
|
|
321
|
+
), (h && !g || r && !s) && /* @__PURE__ */ a.createElement(
|
|
322
|
+
ke,
|
|
323
323
|
{
|
|
324
324
|
ariaDisabled: !0,
|
|
325
325
|
ariaLabelledBy: "required_label",
|
|
@@ -330,15 +330,15 @@ const D = a.forwardRef((e, H) => {
|
|
|
330
330
|
}
|
|
331
331
|
)),
|
|
332
332
|
w && /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-start k-actions-horizontal" }, /* @__PURE__ */ a.createElement(
|
|
333
|
-
|
|
333
|
+
v,
|
|
334
334
|
{
|
|
335
335
|
type: "button",
|
|
336
336
|
themeColor: "primary",
|
|
337
337
|
className: "k-coloreditor-apply",
|
|
338
|
-
onClick:
|
|
338
|
+
onClick: p
|
|
339
339
|
},
|
|
340
|
-
|
|
341
|
-
), /* @__PURE__ */ a.createElement(
|
|
340
|
+
d.toLanguageString(D, u[D])
|
|
341
|
+
), /* @__PURE__ */ a.createElement(v, { type: "button", className: "k-coloreditor-cancel", onClick: ee }, d.toLanguageString(H, u[H])))
|
|
342
342
|
);
|
|
343
343
|
}), be = {
|
|
344
344
|
id: l.string,
|
|
@@ -362,8 +362,8 @@ const D = a.forwardRef((e, H) => {
|
|
|
362
362
|
views: l.array,
|
|
363
363
|
size: l.oneOf(["small", "medium", "large"])
|
|
364
364
|
};
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
W.displayName = "KendoFlatColorPicker";
|
|
366
|
+
W.propTypes = be;
|
|
367
367
|
export {
|
|
368
|
-
|
|
368
|
+
W as FlatColorPicker
|
|
369
369
|
};
|
package/common/AdaptiveMode.d.ts
CHANGED
package/common/AdaptiveMode.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 k=require("react"),s=require("@progress/kendo-react-layout"),v=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),y=require("@progress/kendo-react-common");function h(e){const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),s=require("@progress/kendo-react-layout"),v=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),y=require("@progress/kendo-react-common");function h(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(a,o,l.get?l:{enumerable:!0,get:()=>e[o]})}}return a.default=e,Object.freeze(a)}const n=h(k),C=e=>{const{windowWidth:a=0,children:o,navigatable:l,navigatableElements:d,expand:u,animation:m,title:p,subTitle:b,footer:t,onClose:r}=e,f=()=>n.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",size:"large",themeColor:"primary",svgIcon:v.checkIcon,onClick:r}),c=y.useAdaptiveModeContext(),g={navigatable:l||!1,navigatableElements:d||[],expand:u,animation:m,suffixActions:f(),onClose:r,animationStyles:c&&a<=c.small?{top:0,width:"100%",height:"100%"}:void 0,title:p,subTitle:b,className:"k-adaptive-actionsheet",position:c&&a<=c.small?"fullscreen":void 0};return n.createElement(s.ActionSheet,{...g},o,t&&n.createElement(s.ActionSheetFooter,{className:"k-actions k-actions-stretched"},n.createElement(i.Button,{size:"large",className:"k-coloreditor-cancel","aria-label":t.cancelText,onClick:t.onCancel},t.cancelText),n.createElement(i.Button,{themeColor:"primary",size:"large",className:"k-coloreditor-apply","aria-label":t.applyText,onClick:t.onApply},t.applyText)))};exports.AdaptiveMode=C;
|
package/common/AdaptiveMode.mjs
CHANGED
|
@@ -48,7 +48,7 @@ const E = (i) => {
|
|
|
48
48
|
className: "k-adaptive-actionsheet",
|
|
49
49
|
position: a && l <= a.small ? "fullscreen" : void 0
|
|
50
50
|
};
|
|
51
|
-
return /* @__PURE__ */ t.createElement(v, { ...b }, r, /* @__PURE__ */ t.createElement(x, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
|
|
51
|
+
return /* @__PURE__ */ t.createElement(v, { ...b }, r, e && /* @__PURE__ */ t.createElement(x, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
|
|
52
52
|
o,
|
|
53
53
|
{
|
|
54
54
|
size: "large",
|