@progress/kendo-react-inputs 11.0.0-develop.3 → 11.0.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.
@@ -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 ze=require("react"),o=require("prop-types"),n=require("@progress/kendo-react-common"),Le=require("../package-metadata.js"),Ne=require("./Picker.js"),xe=require("./ColorGradient.js"),Z=require("./ColorPalette.js"),L=require("./FlatColorPicker.js"),qe=require("@progress/kendo-react-buttons"),Ve=require("@progress/kendo-svg-icons"),d=require("../messages/index.js"),He=require("@progress/kendo-react-intl"),Me=require("../common/AdaptiveMode.js"),We=require("@progress/kendo-react-layout");function Ue(f){const S=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const w in f)if(w!=="default"){const r=Object.getOwnPropertyDescriptor(f,w);Object.defineProperty(S,w,r.get?r:{enumerable:!0,get:()=>f[w]})}}return S.default=f,Object.freeze(S)}const t=Ue(ze),je={opacity:!0},Ge={palette:Z.DEFAULT_PRESET,tileSize:Z.DEFAULT_TILE_SIZE},$=f=>f!==void 0,fe=n.createPropsContext(),J=t.forwardRef((f,S)=>{var ie,ce;const w=!n.validatePackage(Le.packageMetadata,{component:"ColorPicker"}),r=n.usePropsContext(fe,f),_=He.useLocalization(),Q=n.useAdaptiveModeContext(),{size:p=E.size,rounded:N=E.rounded,fillMode:I=E.fillMode,gradientSettings:P=E.gradientSettings,paletteSettings:h=E.paletteSettings,flatColorPickerSettings:T,view:g=r.views?void 0:E.view,views:s=g?void 0:E.views,activeView:X,popupSettings:m,valid:ge,disabled:x,tabIndex:ve,icon:q,svgIcon:V,iconClassName:F,onChange:H,onFocus:M,onBlur:W,onActiveColorClick:U,className:ke,adaptive:me,adaptiveTitle:Y=_.toLanguageString(d.colorPickerAdaptiveTitle,d.messages[d.colorPickerAdaptiveTitle])}=r,u=t.useRef(null),R=t.useRef(null),B=t.useRef(null),k=t.useRef(null),y=t.useRef(void 0),Ce=t.useRef(null),[be,ee]=t.useState(!1),[Ee,we]=t.useState(r.defaultValue||void 0),[Pe,ye]=t.useState(!1),[O,Se]=t.useState(),j=$(r.value),C=$(r.open),i=j?r.value:Ee,b=C?r.open:Pe,te=t.useRef(i),ne=t.useCallback(()=>{u.current&&u.current.focus()},[]);t.useImperativeHandle(S,()=>({element:u.current,actionElement:Ce.current,value:i,focus:ne}),[i,ne]);const _e=!!(O&&Q&&O<=Q.medium&&me);t.useEffect(()=>{const e=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(Oe.bind(void 0));return document!=null&&document.body&&e&&e.observe(document.body),()=>{document!=null&&document.body&&e&&e.disconnect()}},[]);const l=t.useCallback((e,c)=>{C||(!e&&!c&&u&&u.current&&u.current.focus(),ye(e))},[C]),ae=t.useMemo(()=>new n.Navigation({root:u,selectors:[".k-colorpicker",".k-color-picker-popup"],tabIndex:0,keyboardEvents:{keydown:{Escape:(e,c,a)=>{l(!1)},Enter:(e,c,a)=>{!C&&e===u.current&&(a.preventDefault(),a.stopPropagation(),l(!0))},ArrowDown:(e,c,a)=>{a.altKey&&(a.preventDefault(),a.stopPropagation(),l(!0))},ArrowUp:(e,c,a)=>{a.altKey&&(a.preventDefault(),a.stopPropagation(),l(!1))},Tab:(e,c,a)=>{var A,se,ue;if(n.getActiveElement(document)!==u.current){const de=(A=B.current)==null?void 0:A.wrapperRef.current,z=(se=R.current)==null?void 0:se.wrapperRef.current,pe=(ue=k.current)==null?void 0:ue.element;g==="palette"&&de?n.keepFocusInContainer(a,de):g==="gradient"&&z?n.keepFocusInContainer(a,z):g==="combo"&&z?n.keepFocusInContainer(a,z.parentElement):s&&pe&&n.keepFocusInContainer(a,pe)}}}}}),[l,C]),he=t.useCallback(ae.triggerKeyboardEvent.bind(ae),[]),Te=t.useCallback(()=>{C||(R.current&&R.current.wrapperRef.current?n.focusFirstFocusableChild(R.current.wrapperRef.current):B.current?B.current.focus():k.current&&k.current.element&&n.focusFirstFocusableChild(k.current.element))},[C]),D=e=>te.current=e,re=t.useCallback(e=>{const c={value:te.current,nativeEvent:e.nativeEvent,syntheticEvent:e};v(c),l(!b,!0)},[b]),G=t.useCallback(()=>{l(!1,!0)},[l]),Re=t.useCallback(e=>{U&&U.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:i,target:{element:u.current,value:i}})},[U,i]),Ae=t.useCallback(e=>{y.current?(clearTimeout(y.current),y.current=void 0):ee(!0),M&&M.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})},[M]),Ie=t.useCallback(()=>{l(!1,!0),ee(!1),y.current=void 0},[]),Fe=t.useCallback(e=>{clearTimeout(y.current),y.current=window.setTimeout(Ie),W&&W.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})},[W]),v=t.useCallback((e,c)=>{var A;const a=c?e.rgbaValue||"":(A=e.value)!=null?A:"";j||we(a),H&&H.call(void 0,{value:a,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent,target:{element:u.current,value:a}}),l(!1)},[j,H]),oe=t.useCallback(e=>v(e,!0),[$,v]),K=t.useCallback(e=>t.createElement(t.Fragment,null,(g==="combo"||g==="gradient")&&t.createElement(xe.ColorGradient,{...P,_adaptive:e,ref:R,isInsidePopup:!0,size:e?"large":p,fillMode:I,value:i,onChange:v}),(g==="combo"||g==="palette")&&t.createElement(Z.ColorPalette,{...h,ref:B,size:e?"large":p,value:i,onChange:oe}),s&&s[0]==="gradient"&&s[1]==="palette"&&t.createElement(L.FlatColorPicker,{...T,_paletteSettings:h,_gradientSettings:{_adaptive:e,...P},ref:k,size:e?"large":p,views:["gradient","palette"],activeView:X,setOpen:l,showButtons:!e,value:i,onChange:v,setAdaptiveModeValue:D}),s&&s[0]==="palette"&&s[1]==="gradient"&&t.createElement(L.FlatColorPicker,{...T,_paletteSettings:h,_gradientSettings:{_adaptive:e,...P},ref:k,size:e?"large":p,views:["palette","gradient"],setOpen:l,showButtons:!e,value:i,onChange:v,setAdaptiveModeValue:D}),s&&s.includes("gradient")&&!s.includes("palette")&&t.createElement(L.FlatColorPicker,{...T,_gradientSettings:{_adaptive:e,...P},ref:k,size:e?"large":p,views:["gradient"],showButtons:!e,setOpen:l,value:i,onChange:v,setAdaptiveModeValue:D}),s&&s.includes("palette")&&!s.includes("gradient")&&t.createElement(L.FlatColorPicker,{...T,_paletteSettings:h,_gradientSettings:{_adaptive:e,...P},ref:k,size:e?"large":p,views:["palette"],showButtons:!e,setOpen:l,value:i,onChange:v,setAdaptiveModeValue:D}),w&&t.createElement(n.WatermarkOverlay,null)),[X,I,T,P,v,oe,h,l,p,i,g,s]),Be=t.useCallback(()=>{var c;const e={animation:!!((c=m==null?void 0:m.animate)==null||c),title:Y,expand:b,onClose:G,windowWidth:O,footer:{cancelText:_.toLanguageString(d.flatColorPickerCancelBtn,d.messages[d.flatColorPickerCancelBtn]),onCancel:G,applyText:_.toLanguageString(d.flatColorPickerApplyBtn,d.messages[d.flatColorPickerApplyBtn]),onApply:re}};return t.createElement(Me.AdaptiveMode,{...e},t.createElement(We.ActionSheetContent,null,K(!0)))},[m==null?void 0:m.animate,Y,b,G,O,_,re,K]),Oe=t.useCallback(e=>{for(const c of e)Se(c.target.clientWidth)},[]),le=n.useDir(u,r.dir),De=ge!==!1;return t.createElement("span",{id:r.id,role:"combobox","aria-label":r.ariaLabel,"aria-labelledby":r.ariaLabelledBy,"aria-describedby":r.ariaDescribedBy,"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":`k-colorpicker-popup-${(ie=r.id)!=null?ie:0}`,"aria-disabled":x?"true":void 0,className:n.classNames("k-colorpicker","k-picker","k-icon-picker",{[`k-picker-${n.kendoThemeMaps.sizeMap[p]||p}`]:p,[`k-picker-${I}`]:I,[`k-rounded-${n.kendoThemeMaps.roundedMap[N]||N}`]:N,"k-invalid":!De,"k-disabled":x,"k-focus":be,className:ke}),ref:u,tabIndex:n.getTabIndex(ve,x),title:r.title,onKeyDown:he,onFocus:Ae,onBlur:Fe,dir:le},t.createElement(Ne.Picker,{dir:le,open:b,onOpen:Te,popupAnchor:u.current||void 0,popupSettings:{id:`k-colorpicker-popup-${(ce=r.id)!=null?ce:0}`,...m},input:t.createElement("span",{onClick:Re,className:"k-input-inner"},t.createElement("span",{className:n.classNames("k-value-icon","k-color-preview",{"k-no-color":!i,"k-icon-color-preview":q||V||F})},F&&t.createElement("span",{className:n.classNames("k-color-preview-icon",F)}),!F&&(q||V)&&t.createElement(n.IconWrap,{name:q,icon:V}),t.createElement("span",{className:"k-color-preview-mask",style:{backgroundColor:i}}))),button:t.createElement(qe.Button,{tabIndex:-1,type:"button",onClick:()=>l(!b),className:"k-input-button",rounded:null,icon:"caret-alt-down",svgIcon:Ve.caretAltDownIcon,"aria-label":_.toLanguageString(d.colorPickerDropdownButtonAriaLabel,d.messages[d.colorPickerDropdownButtonAriaLabel])}),content:K(!1),_mobileMode:_e,_actionSheet:Be()}))});J.propTypes={value:o.string,defaultValue:o.string,disabled:o.bool,view:o.oneOf(["gradient","palette","combo"]),views:o.arrayOf(o.oneOf(["gradient","palette"])),dir:o.string,id:o.string,icon:o.string,svgIcon:n.svgIconPropType,ariaLabelledBy:o.string,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"]),rounded:o.oneOf([null,"small","medium","large","full"]),fillMode:o.oneOf([null,"solid","flat","outline"]),className:o.string,adaptive:o.bool,adaptiveTitle:o.string};const E={size:"medium",rounded:"medium",fillMode:"solid",view:"palette",views:["gradient","palette"],gradientSettings:je,paletteSettings:Ge};J.displayName="KendoColorPicker";exports.ColorPicker=J;exports.ColorPickerPropsContext=fe;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ze=require("react"),l=require("prop-types"),n=require("@progress/kendo-react-common"),Le=require("../package-metadata.js"),Ne=require("./Picker.js"),xe=require("./ColorGradient.js"),J=require("./ColorPalette.js"),L=require("./FlatColorPicker.js"),qe=require("@progress/kendo-react-buttons"),Ve=require("@progress/kendo-svg-icons"),d=require("../messages/index.js"),He=require("@progress/kendo-react-intl"),Me=require("../common/AdaptiveMode.js"),We=require("@progress/kendo-react-layout");function Ue(f){const S=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const w in f)if(w!=="default"){const r=Object.getOwnPropertyDescriptor(f,w);Object.defineProperty(S,w,r.get?r:{enumerable:!0,get:()=>f[w]})}}return S.default=f,Object.freeze(S)}const t=Ue(ze),je={opacity:!0},Ge={palette:J.DEFAULT_PRESET,tileSize:J.DEFAULT_TILE_SIZE},Z=f=>f!==void 0,ge=n.createPropsContext(),Q=t.forwardRef((f,S)=>{var ce,se;const w=!n.validatePackage(Le.packageMetadata,{component:"ColorPicker"}),r=n.usePropsContext(ge,f),_=He.useLocalization(),X=n.useAdaptiveModeContext(),{size:p=E.size,rounded:N=E.rounded,fillMode:I=E.fillMode,gradientSettings:P=E.gradientSettings,paletteSettings:h=E.paletteSettings,flatColorPickerSettings:T,view:g=r.views?void 0:E.view,views:s=g?void 0:E.views,activeView:Y,popupSettings:C,valid:ve,disabled:x,tabIndex:ke,icon:q,svgIcon:V,iconClassName:F,onChange:H,onFocus:M,onBlur:W,onActiveColorClick:U,className:me,adaptive:Ce,adaptiveTitle:ee=_.toLanguageString(d.colorPickerAdaptiveTitle,d.messages[d.colorPickerAdaptiveTitle])}=r,u=t.useRef(null),R=t.useRef(null),B=t.useRef(null),m=t.useRef(null),y=t.useRef(void 0),be=t.useRef(null),[Ee,te]=t.useState(!1),[we,Pe]=t.useState(r.defaultValue||void 0),[ye,Se]=t.useState(!1),[O,_e]=t.useState(),j=Z(r.value),b=Z(r.open),i=j?r.value:we,v=b?r.open:ye,ne=t.useRef(i),ae=t.useCallback(()=>{u.current&&u.current.focus()},[]);t.useImperativeHandle(S,()=>({element:u.current,actionElement:be.current,value:i,focus:ae}),[i,ae]);const G=!!(O&&X&&O<=X.medium&&Ce);t.useEffect(()=>{const e=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(Oe.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)=>{b||(!e&&!c&&u&&u.current&&u.current.focus(),Se(e))},[b]),re=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)=>{!b&&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 A,ue,de;if(n.getActiveElement(document)!==u.current){const pe=(A=B.current)==null?void 0:A.wrapperRef.current,z=(ue=R.current)==null?void 0:ue.wrapperRef.current,fe=(de=m.current)==null?void 0:de.element;g==="palette"&&pe?n.keepFocusInContainer(a,pe):g==="gradient"&&z?n.keepFocusInContainer(a,z):g==="combo"&&z?n.keepFocusInContainer(a,z.parentElement):s&&fe&&n.keepFocusInContainer(a,fe)}}}}}),[o,b]),he=t.useCallback(re.triggerKeyboardEvent.bind(re),[]),Te=t.useCallback(()=>{b||(R.current&&R.current.wrapperRef.current?n.focusFirstFocusableChild(R.current.wrapperRef.current):B.current?B.current.focus():m.current&&m.current.element&&n.focusFirstFocusableChild(m.current.element))},[b]),D=e=>ne.current=e,oe=t.useCallback(e=>{const c={value:ne.current,nativeEvent:e.nativeEvent,syntheticEvent:e};k(c),o(!v,!0)},[v]),K=t.useCallback(()=>{o(!1,!0)},[o]),Re=t.useCallback(e=>{U&&U.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:i,target:{element:u.current,value:i}})},[U,i]),Ae=t.useCallback(e=>{y.current?(clearTimeout(y.current),y.current=void 0):(te(!0),G&&!v&&o(!0)),M&&M.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})},[G,M,v,o]),Ie=t.useCallback(()=>{o(!1,!0),te(!1),y.current=void 0},[]),Fe=t.useCallback(e=>{clearTimeout(y.current),y.current=window.setTimeout(Ie),W&&W.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})},[W]),k=t.useCallback((e,c)=>{var A;const a=c?e.rgbaValue||"":(A=e.value)!=null?A:"";j||Pe(a),H&&H.call(void 0,{value:a,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent,target:{element:u.current,value:a}}),o(!1)},[j,H]),le=t.useCallback(e=>k(e,!0),[Z,k]),$=t.useCallback(e=>t.createElement(t.Fragment,null,(g==="combo"||g==="gradient")&&t.createElement(xe.ColorGradient,{...P,_adaptive:e,ref:R,isInsidePopup:!0,size:e?"large":p,fillMode:I,value:i,onChange:k}),(g==="combo"||g==="palette")&&t.createElement(J.ColorPalette,{...h,ref:B,size:e?"large":p,value:i,onChange:le}),s&&s[0]==="gradient"&&s[1]==="palette"&&t.createElement(L.FlatColorPicker,{...T,_paletteSettings:h,_gradientSettings:{_adaptive:e,...P},ref:m,size:e?"large":p,views:["gradient","palette"],activeView:Y,setOpen:o,showButtons:!e,value:i,onChange:k,setAdaptiveModeValue:D}),s&&s[0]==="palette"&&s[1]==="gradient"&&t.createElement(L.FlatColorPicker,{...T,_paletteSettings:h,_gradientSettings:{_adaptive:e,...P},ref:m,size:e?"large":p,views:["palette","gradient"],setOpen:o,showButtons:!e,value:i,onChange:k,setAdaptiveModeValue:D}),s&&s.includes("gradient")&&!s.includes("palette")&&t.createElement(L.FlatColorPicker,{...T,_gradientSettings:{_adaptive:e,...P},ref:m,size:e?"large":p,views:["gradient"],showButtons:!e,setOpen:o,value:i,onChange:k,setAdaptiveModeValue:D}),s&&s.includes("palette")&&!s.includes("gradient")&&t.createElement(L.FlatColorPicker,{...T,_paletteSettings:h,_gradientSettings:{_adaptive:e,...P},ref:m,size:e?"large":p,views:["palette"],showButtons:!e,setOpen:o,value:i,onChange:k,setAdaptiveModeValue:D}),w&&t.createElement(n.WatermarkOverlay,null)),[Y,I,T,P,k,le,h,o,p,i,g,s]),Be=t.useCallback(()=>{var c;const e={animation:!!((c=C==null?void 0:C.animate)==null||c),title:ee,expand:v,onClose:K,windowWidth:O,footer:{cancelText:_.toLanguageString(d.flatColorPickerCancelBtn,d.messages[d.flatColorPickerCancelBtn]),onCancel:K,applyText:_.toLanguageString(d.flatColorPickerApplyBtn,d.messages[d.flatColorPickerApplyBtn]),onApply:oe}};return t.createElement(Me.AdaptiveMode,{...e},t.createElement(We.ActionSheetContent,null,$(!0)))},[C==null?void 0:C.animate,ee,v,K,O,_,oe,$]),Oe=t.useCallback(e=>{for(const c of e)_e(c.target.clientWidth)},[]),ie=n.useDir(u,r.dir),De=ve!==!1;return t.createElement("span",{id:r.id,role:"combobox","aria-label":r.ariaLabel,"aria-labelledby":r.ariaLabelledBy,"aria-describedby":r.ariaDescribedBy,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":`k-colorpicker-popup-${(ce=r.id)!=null?ce:0}`,"aria-disabled":x?"true":void 0,className:n.classNames("k-colorpicker","k-picker","k-icon-picker",{[`k-picker-${n.kendoThemeMaps.sizeMap[p]||p}`]:p,[`k-picker-${I}`]:I,[`k-rounded-${n.kendoThemeMaps.roundedMap[N]||N}`]:N,"k-invalid":!De,"k-disabled":x,"k-focus":Ee,className:me}),ref:u,tabIndex:n.getTabIndex(ke,x),title:r.title,onKeyDown:he,onFocus:Ae,onBlur:Fe,dir:ie},t.createElement(Ne.Picker,{dir:ie,open:v,onOpen:Te,popupAnchor:u.current||void 0,popupSettings:{id:`k-colorpicker-popup-${(se=r.id)!=null?se:0}`,...C},input:t.createElement("span",{onClick:Re,className:"k-input-inner"},t.createElement("span",{className:n.classNames("k-value-icon","k-color-preview",{"k-no-color":!i,"k-icon-color-preview":q||V||F})},F&&t.createElement("span",{className:n.classNames("k-color-preview-icon",F)}),!F&&(q||V)&&t.createElement(n.IconWrap,{name:q,icon:V}),t.createElement("span",{className:"k-color-preview-mask",style:{backgroundColor:i}}))),button:t.createElement(qe.Button,{tabIndex:-1,type:"button",onClick:()=>o(!v),className:"k-input-button",rounded:null,icon:"caret-alt-down",svgIcon:Ve.caretAltDownIcon,"aria-label":_.toLanguageString(d.colorPickerDropdownButtonAriaLabel,d.messages[d.colorPickerDropdownButtonAriaLabel])}),content:$(!1),_mobileMode:G,_actionSheet:Be()}))});Q.propTypes={value:l.string,defaultValue:l.string,disabled:l.bool,view:l.oneOf(["gradient","palette","combo"]),views:l.arrayOf(l.oneOf(["gradient","palette"])),dir:l.string,id:l.string,icon:l.string,svgIcon:n.svgIconPropType,ariaLabelledBy:l.string,ariaDescribedBy:l.string,size:l.oneOf([null,"small","medium","large"]),rounded:l.oneOf([null,"small","medium","large","full"]),fillMode:l.oneOf([null,"solid","flat","outline"]),className:l.string,adaptive:l.bool,adaptiveTitle:l.string,adaptiveSubtitle:l.string};const E={size:"medium",rounded:"medium",fillMode:"solid",view:"palette",views:["gradient","palette"],gradientSettings:je,paletteSettings:Ge};Q.displayName="KendoColorPicker";exports.ColorPicker=Q;exports.ColorPickerPropsContext=ge;
@@ -6,8 +6,8 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as t from "react";
9
- import a from "prop-types";
10
- import { createPropsContext as He, validatePackage as We, usePropsContext as Ue, useAdaptiveModeContext as Ke, canUseDOM as $e, Navigation as Ge, getActiveElement as Me, keepFocusInContainer as z, focusFirstFocusableChild as ue, WatermarkOverlay as Ze, useDir as je, classNames as M, kendoThemeMaps as de, getTabIndex as qe, IconWrap as Je, svgIconPropType as Qe } from "@progress/kendo-react-common";
9
+ import r from "prop-types";
10
+ import { createPropsContext as He, validatePackage as We, usePropsContext as Ue, useAdaptiveModeContext as Ke, canUseDOM as $e, Navigation as Ge, getActiveElement as Me, keepFocusInContainer as z, focusFirstFocusableChild as de, WatermarkOverlay as Ze, useDir as je, classNames as Z, kendoThemeMaps as pe, getTabIndex as qe, IconWrap as Je, svgIconPropType as Qe } from "@progress/kendo-react-common";
11
11
  import { packageMetadata as Xe } from "../package-metadata.mjs";
12
12
  import { Picker as Ye } from "./Picker.mjs";
13
13
  import { ColorGradient as et } from "./ColorGradient.mjs";
@@ -15,7 +15,7 @@ import { ColorPalette as tt, DEFAULT_PRESET as nt, DEFAULT_TILE_SIZE as at } fro
15
15
  import { FlatColorPicker as B } from "./FlatColorPicker.mjs";
16
16
  import { Button as rt } from "@progress/kendo-react-buttons";
17
17
  import { caretAltDownIcon as ot } from "@progress/kendo-svg-icons";
18
- import { colorPickerAdaptiveTitle as pe, messages as D, flatColorPickerCancelBtn as fe, flatColorPickerApplyBtn as me, colorPickerDropdownButtonAriaLabel as ve } from "../messages/index.mjs";
18
+ import { colorPickerAdaptiveTitle as fe, messages as D, flatColorPickerCancelBtn as me, flatColorPickerApplyBtn as ve, colorPickerDropdownButtonAriaLabel as ge } from "../messages/index.mjs";
19
19
  import { useLocalization as lt } from "@progress/kendo-react-intl";
20
20
  import { AdaptiveMode as it } from "../common/AdaptiveMode.mjs";
21
21
  import { ActionSheetContent as ct } from "@progress/kendo-react-layout";
@@ -24,9 +24,9 @@ const st = {
24
24
  }, ut = {
25
25
  palette: nt,
26
26
  tileSize: at
27
- }, Z = (L) => L !== void 0, dt = He(), ge = t.forwardRef((L, ke) => {
28
- var re, oe;
29
- const Ce = !We(Xe, { component: "ColorPicker" }), o = Ue(dt, L), b = lt(), j = Ke(), {
27
+ }, j = (L) => L !== void 0, dt = He(), ke = t.forwardRef((L, Ce) => {
28
+ var oe, le;
29
+ const Ee = !We(Xe, { component: "ColorPicker" }), o = Ue(dt, L), b = lt(), q = Ke(), {
30
30
  size: u = k.size,
31
31
  rounded: x = k.rounded,
32
32
  fillMode: _ = k.fillMode,
@@ -35,11 +35,11 @@ const st = {
35
35
  flatColorPickerSettings: y,
36
36
  view: d = o.views ? void 0 : k.view,
37
37
  views: c = d ? void 0 : k.views,
38
- activeView: q,
39
- popupSettings: m,
40
- valid: Ee,
38
+ activeView: J,
39
+ popupSettings: v,
40
+ valid: be,
41
41
  disabled: N,
42
- tabIndex: be,
42
+ tabIndex: we,
43
43
  icon: O,
44
44
  svgIcon: F,
45
45
  iconClassName: P,
@@ -47,77 +47,77 @@ const st = {
47
47
  onFocus: H,
48
48
  onBlur: W,
49
49
  onActiveColorClick: U,
50
- className: we,
51
- adaptive: ye,
52
- adaptiveTitle: J = b.toLanguageString(pe, D[pe])
53
- } = o, s = t.useRef(null), S = t.useRef(null), T = t.useRef(null), f = t.useRef(null), E = t.useRef(void 0), Se = t.useRef(null), [he, Q] = t.useState(!1), [_e, Pe] = t.useState(o.defaultValue || void 0), [Te, Re] = t.useState(!1), [R, Ae] = t.useState(), K = Z(o.value), v = Z(o.open), l = K ? o.value : _e, g = v ? o.open : Te, X = t.useRef(l), Y = t.useCallback(() => {
50
+ className: ye,
51
+ adaptive: Se,
52
+ adaptiveTitle: Q = b.toLanguageString(fe, D[fe])
53
+ } = o, s = t.useRef(null), S = t.useRef(null), T = t.useRef(null), m = t.useRef(null), E = t.useRef(void 0), he = t.useRef(null), [_e, X] = t.useState(!1), [Pe, Te] = t.useState(o.defaultValue || void 0), [Re, Ae] = t.useState(!1), [R, Ie] = t.useState(), K = j(o.value), g = j(o.open), l = K ? o.value : Pe, p = g ? o.open : Re, Y = t.useRef(l), ee = t.useCallback(() => {
54
54
  s.current && s.current.focus();
55
55
  }, []);
56
56
  t.useImperativeHandle(
57
- ke,
57
+ Ce,
58
58
  () => ({
59
59
  // we agreed that each element will have focus method exposed
60
60
  element: s.current,
61
- actionElement: Se.current,
61
+ actionElement: he.current,
62
62
  value: l,
63
- focus: Y
63
+ focus: ee
64
64
  }),
65
- [l, Y]
65
+ [l, ee]
66
66
  );
67
- const Ie = !!(R && j && R <= j.medium && ye);
67
+ const $ = !!(R && q && R <= q.medium && Se);
68
68
  t.useEffect(() => {
69
69
  const e = $e && window.ResizeObserver && new window.ResizeObserver(Fe.bind(void 0));
70
70
  return document != null && document.body && e && e.observe(document.body), () => {
71
71
  document != null && document.body && e && e.disconnect();
72
72
  };
73
73
  }, []);
74
- const r = t.useCallback(
74
+ const a = t.useCallback(
75
75
  (e, i) => {
76
- v || (!e && !i && s && s.current && s.current.focus(), Re(e));
76
+ g || (!e && !i && s && s.current && s.current.focus(), Ae(e));
77
77
  },
78
- [v]
79
- ), ee = t.useMemo(() => new Ge({
78
+ [g]
79
+ ), te = t.useMemo(() => new Ge({
80
80
  root: s,
81
81
  selectors: [".k-colorpicker", ".k-color-picker-popup"],
82
82
  tabIndex: 0,
83
83
  keyboardEvents: {
84
84
  keydown: {
85
85
  Escape: (e, i, n) => {
86
- r(!1);
86
+ a(!1);
87
87
  },
88
88
  Enter: (e, i, n) => {
89
- !v && e === s.current && (n.preventDefault(), n.stopPropagation(), r(!0));
89
+ !g && e === s.current && (n.preventDefault(), n.stopPropagation(), a(!0));
90
90
  },
91
91
  ArrowDown: (e, i, n) => {
92
- n.altKey && (n.preventDefault(), n.stopPropagation(), r(!0));
92
+ n.altKey && (n.preventDefault(), n.stopPropagation(), a(!0));
93
93
  },
94
94
  ArrowUp: (e, i, n) => {
95
- n.altKey && (n.preventDefault(), n.stopPropagation(), r(!1));
95
+ n.altKey && (n.preventDefault(), n.stopPropagation(), a(!1));
96
96
  },
97
97
  Tab: (e, i, n) => {
98
- var h, le, ie;
98
+ var h, ie, ce;
99
99
  if (Me(document) !== s.current) {
100
- const ce = (h = T.current) == null ? void 0 : h.wrapperRef.current, I = (le = S.current) == null ? void 0 : le.wrapperRef.current, se = (ie = f.current) == null ? void 0 : ie.element;
101
- d === "palette" && ce ? z(n, ce) : d === "gradient" && I ? z(n, I) : d === "combo" && I ? z(n, I.parentElement) : c && se && z(n, se);
100
+ const se = (h = T.current) == null ? void 0 : h.wrapperRef.current, I = (ie = S.current) == null ? void 0 : ie.wrapperRef.current, ue = (ce = m.current) == null ? void 0 : ce.element;
101
+ d === "palette" && se ? z(n, se) : d === "gradient" && I ? z(n, I) : d === "combo" && I ? z(n, I.parentElement) : c && ue && z(n, ue);
102
102
  }
103
103
  }
104
104
  }
105
105
  }
106
- }), [r, v]), ze = t.useCallback(ee.triggerKeyboardEvent.bind(ee), []), Be = t.useCallback(() => {
107
- v || (S.current && S.current.wrapperRef.current ? ue(S.current.wrapperRef.current) : T.current ? T.current.focus() : f.current && f.current.element && ue(f.current.element));
108
- }, [v]), A = (e) => X.current = e, te = t.useCallback(
106
+ }), [a, g]), ze = t.useCallback(te.triggerKeyboardEvent.bind(te), []), Be = t.useCallback(() => {
107
+ g || (S.current && S.current.wrapperRef.current ? de(S.current.wrapperRef.current) : T.current ? T.current.focus() : m.current && m.current.element && de(m.current.element));
108
+ }, [g]), A = (e) => Y.current = e, ne = t.useCallback(
109
109
  (e) => {
110
110
  const i = {
111
- value: X.current,
111
+ value: Y.current,
112
112
  nativeEvent: e.nativeEvent,
113
113
  syntheticEvent: e
114
114
  };
115
- p(i), r(!g, !0);
115
+ f(i), a(!p, !0);
116
116
  },
117
- [g]
118
- ), $ = t.useCallback(() => {
119
- r(!1, !0);
120
- }, [r]), De = t.useCallback(
117
+ [p]
118
+ ), G = t.useCallback(() => {
119
+ a(!1, !0);
120
+ }, [a]), De = t.useCallback(
121
121
  (e) => {
122
122
  U && U.call(void 0, {
123
123
  syntheticEvent: e,
@@ -132,14 +132,14 @@ const st = {
132
132
  [U, l]
133
133
  ), Le = t.useCallback(
134
134
  (e) => {
135
- E.current ? (clearTimeout(E.current), E.current = void 0) : Q(!0), H && H.call(void 0, {
135
+ E.current ? (clearTimeout(E.current), E.current = void 0) : (X(!0), $ && !p && a(!0)), H && H.call(void 0, {
136
136
  nativeEvent: e.nativeEvent,
137
137
  syntheticEvent: e
138
138
  });
139
139
  },
140
- [H]
140
+ [$, H, p, a]
141
141
  ), xe = t.useCallback(() => {
142
- r(!1, !0), Q(!1), E.current = void 0;
142
+ a(!1, !0), X(!1), E.current = void 0;
143
143
  }, []), Ne = t.useCallback(
144
144
  (e) => {
145
145
  clearTimeout(E.current), E.current = window.setTimeout(xe), W && W.call(void 0, {
@@ -148,11 +148,11 @@ const st = {
148
148
  });
149
149
  },
150
150
  [W]
151
- ), p = t.useCallback(
151
+ ), f = t.useCallback(
152
152
  (e, i) => {
153
153
  var h;
154
154
  const n = i ? e.rgbaValue || "" : (h = e.value) != null ? h : "";
155
- K || Pe(n), V && V.call(void 0, {
155
+ K || Te(n), V && V.call(void 0, {
156
156
  value: n,
157
157
  nativeEvent: e.nativeEvent,
158
158
  syntheticEvent: e.syntheticEvent,
@@ -160,13 +160,13 @@ const st = {
160
160
  element: s.current,
161
161
  value: n
162
162
  }
163
- }), r(!1);
163
+ }), a(!1);
164
164
  },
165
165
  [K, V]
166
- ), ne = t.useCallback(
167
- (e) => p(e, !0),
168
- [Z, p]
169
- ), G = t.useCallback(
166
+ ), ae = t.useCallback(
167
+ (e) => f(e, !0),
168
+ [j, f]
169
+ ), M = t.useCallback(
170
170
  (e) => /* @__PURE__ */ t.createElement(t.Fragment, null, (d === "combo" || d === "gradient") && /* @__PURE__ */ t.createElement(
171
171
  et,
172
172
  {
@@ -177,7 +177,7 @@ const st = {
177
177
  size: e ? "large" : u,
178
178
  fillMode: _,
179
179
  value: l,
180
- onChange: p
180
+ onChange: f
181
181
  }
182
182
  ), (d === "combo" || d === "palette") && /* @__PURE__ */ t.createElement(
183
183
  tt,
@@ -186,7 +186,7 @@ const st = {
186
186
  ref: T,
187
187
  size: e ? "large" : u,
188
188
  value: l,
189
- onChange: ne
189
+ onChange: ae
190
190
  }
191
191
  ), c && c[0] === "gradient" && c[1] === "palette" && /* @__PURE__ */ t.createElement(
192
192
  B,
@@ -194,14 +194,14 @@ const st = {
194
194
  ...y,
195
195
  _paletteSettings: w,
196
196
  _gradientSettings: { _adaptive: e, ...C },
197
- ref: f,
197
+ ref: m,
198
198
  size: e ? "large" : u,
199
199
  views: ["gradient", "palette"],
200
- activeView: q,
201
- setOpen: r,
200
+ activeView: J,
201
+ setOpen: a,
202
202
  showButtons: !e,
203
203
  value: l,
204
- onChange: p,
204
+ onChange: f,
205
205
  setAdaptiveModeValue: A
206
206
  }
207
207
  ), c && c[0] === "palette" && c[1] === "gradient" && /* @__PURE__ */ t.createElement(
@@ -210,13 +210,13 @@ const st = {
210
210
  ...y,
211
211
  _paletteSettings: w,
212
212
  _gradientSettings: { _adaptive: e, ...C },
213
- ref: f,
213
+ ref: m,
214
214
  size: e ? "large" : u,
215
215
  views: ["palette", "gradient"],
216
- setOpen: r,
216
+ setOpen: a,
217
217
  showButtons: !e,
218
218
  value: l,
219
- onChange: p,
219
+ onChange: f,
220
220
  setAdaptiveModeValue: A
221
221
  }
222
222
  ), c && c.includes("gradient") && !c.includes("palette") && /* @__PURE__ */ t.createElement(
@@ -224,13 +224,13 @@ const st = {
224
224
  {
225
225
  ...y,
226
226
  _gradientSettings: { _adaptive: e, ...C },
227
- ref: f,
227
+ ref: m,
228
228
  size: e ? "large" : u,
229
229
  views: ["gradient"],
230
230
  showButtons: !e,
231
- setOpen: r,
231
+ setOpen: a,
232
232
  value: l,
233
- onChange: p,
233
+ onChange: f,
234
234
  setAdaptiveModeValue: A
235
235
  }
236
236
  ), c && c.includes("palette") && !c.includes("gradient") && /* @__PURE__ */ t.createElement(
@@ -239,25 +239,25 @@ const st = {
239
239
  ...y,
240
240
  _paletteSettings: w,
241
241
  _gradientSettings: { _adaptive: e, ...C },
242
- ref: f,
242
+ ref: m,
243
243
  size: e ? "large" : u,
244
244
  views: ["palette"],
245
245
  showButtons: !e,
246
- setOpen: r,
246
+ setOpen: a,
247
247
  value: l,
248
- onChange: p,
248
+ onChange: f,
249
249
  setAdaptiveModeValue: A
250
250
  }
251
- ), Ce && /* @__PURE__ */ t.createElement(Ze, null)),
251
+ ), Ee && /* @__PURE__ */ t.createElement(Ze, null)),
252
252
  [
253
- q,
253
+ J,
254
254
  _,
255
255
  y,
256
256
  C,
257
- p,
258
- ne,
257
+ f,
258
+ ae,
259
259
  w,
260
- r,
260
+ a,
261
261
  u,
262
262
  l,
263
263
  d,
@@ -266,32 +266,32 @@ const st = {
266
266
  ), Oe = t.useCallback(() => {
267
267
  var i;
268
268
  const e = {
269
- animation: !!((i = m == null ? void 0 : m.animate) == null || i),
270
- title: J,
271
- expand: g,
272
- onClose: $,
269
+ animation: !!((i = v == null ? void 0 : v.animate) == null || i),
270
+ title: Q,
271
+ expand: p,
272
+ onClose: G,
273
273
  windowWidth: R,
274
274
  footer: {
275
- cancelText: b.toLanguageString(fe, D[fe]),
276
- onCancel: $,
277
- applyText: b.toLanguageString(me, D[me]),
278
- onApply: te
275
+ cancelText: b.toLanguageString(me, D[me]),
276
+ onCancel: G,
277
+ applyText: b.toLanguageString(ve, D[ve]),
278
+ onApply: ne
279
279
  }
280
280
  };
281
- return /* @__PURE__ */ t.createElement(it, { ...e }, /* @__PURE__ */ t.createElement(ct, null, G(!0)));
281
+ return /* @__PURE__ */ t.createElement(it, { ...e }, /* @__PURE__ */ t.createElement(ct, null, M(!0)));
282
282
  }, [
283
- m == null ? void 0 : m.animate,
284
- J,
285
- g,
286
- $,
283
+ v == null ? void 0 : v.animate,
284
+ Q,
285
+ p,
286
+ G,
287
287
  R,
288
288
  b,
289
- te,
290
- G
289
+ ne,
290
+ M
291
291
  ]), Fe = t.useCallback((e) => {
292
292
  for (const i of e)
293
- Ae(i.target.clientWidth);
294
- }, []), ae = je(s, o.dir), Ve = Ee !== !1;
293
+ Ie(i.target.clientWidth);
294
+ }, []), re = je(s, o.dir), Ve = be !== !1;
295
295
  return /* @__PURE__ */ t.createElement(
296
296
  "span",
297
297
  {
@@ -301,43 +301,43 @@ const st = {
301
301
  "aria-labelledby": o.ariaLabelledBy,
302
302
  "aria-describedby": o.ariaDescribedBy,
303
303
  "aria-haspopup": "dialog",
304
- "aria-expanded": g,
305
- "aria-controls": `k-colorpicker-popup-${(re = o.id) != null ? re : 0}`,
304
+ "aria-expanded": p,
305
+ "aria-controls": `k-colorpicker-popup-${(oe = o.id) != null ? oe : 0}`,
306
306
  "aria-disabled": N ? "true" : void 0,
307
- className: M("k-colorpicker", "k-picker", "k-icon-picker", {
308
- [`k-picker-${de.sizeMap[u] || u}`]: u,
307
+ className: Z("k-colorpicker", "k-picker", "k-icon-picker", {
308
+ [`k-picker-${pe.sizeMap[u] || u}`]: u,
309
309
  [`k-picker-${_}`]: _,
310
- [`k-rounded-${de.roundedMap[x] || x}`]: x,
310
+ [`k-rounded-${pe.roundedMap[x] || x}`]: x,
311
311
  "k-invalid": !Ve,
312
312
  "k-disabled": N,
313
- "k-focus": he,
314
- className: we
313
+ "k-focus": _e,
314
+ className: ye
315
315
  }),
316
316
  ref: s,
317
- tabIndex: qe(be, N),
317
+ tabIndex: qe(we, N),
318
318
  title: o.title,
319
319
  onKeyDown: ze,
320
320
  onFocus: Le,
321
321
  onBlur: Ne,
322
- dir: ae
322
+ dir: re
323
323
  },
324
324
  /* @__PURE__ */ t.createElement(
325
325
  Ye,
326
326
  {
327
- dir: ae,
328
- open: g,
327
+ dir: re,
328
+ open: p,
329
329
  onOpen: Be,
330
330
  popupAnchor: s.current || void 0,
331
- popupSettings: { id: `k-colorpicker-popup-${(oe = o.id) != null ? oe : 0}`, ...m },
331
+ popupSettings: { id: `k-colorpicker-popup-${(le = o.id) != null ? le : 0}`, ...v },
332
332
  input: /* @__PURE__ */ t.createElement("span", { onClick: De, className: "k-input-inner" }, /* @__PURE__ */ t.createElement(
333
333
  "span",
334
334
  {
335
- className: M("k-value-icon", "k-color-preview", {
335
+ className: Z("k-value-icon", "k-color-preview", {
336
336
  "k-no-color": !l,
337
337
  "k-icon-color-preview": O || F || P
338
338
  })
339
339
  },
340
- P && /* @__PURE__ */ t.createElement("span", { className: M("k-color-preview-icon", P) }),
340
+ P && /* @__PURE__ */ t.createElement("span", { className: Z("k-color-preview-icon", P) }),
341
341
  !P && (O || F) && /* @__PURE__ */ t.createElement(Je, { name: O, icon: F }),
342
342
  /* @__PURE__ */ t.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor: l } })
343
343
  )),
@@ -346,42 +346,43 @@ const st = {
346
346
  {
347
347
  tabIndex: -1,
348
348
  type: "button",
349
- onClick: () => r(!g),
349
+ onClick: () => a(!p),
350
350
  className: "k-input-button",
351
351
  rounded: null,
352
352
  icon: "caret-alt-down",
353
353
  svgIcon: ot,
354
354
  "aria-label": b.toLanguageString(
355
- ve,
356
- D[ve]
355
+ ge,
356
+ D[ge]
357
357
  )
358
358
  }
359
359
  ),
360
- content: G(!1),
361
- _mobileMode: Ie,
360
+ content: M(!1),
361
+ _mobileMode: $,
362
362
  _actionSheet: Oe()
363
363
  }
364
364
  )
365
365
  );
366
366
  });
367
- ge.propTypes = {
368
- value: a.string,
369
- defaultValue: a.string,
370
- disabled: a.bool,
371
- view: a.oneOf(["gradient", "palette", "combo"]),
372
- views: a.arrayOf(a.oneOf(["gradient", "palette"])),
373
- dir: a.string,
374
- id: a.string,
375
- icon: a.string,
367
+ ke.propTypes = {
368
+ value: r.string,
369
+ defaultValue: r.string,
370
+ disabled: r.bool,
371
+ view: r.oneOf(["gradient", "palette", "combo"]),
372
+ views: r.arrayOf(r.oneOf(["gradient", "palette"])),
373
+ dir: r.string,
374
+ id: r.string,
375
+ icon: r.string,
376
376
  svgIcon: Qe,
377
- ariaLabelledBy: a.string,
378
- ariaDescribedBy: a.string,
379
- size: a.oneOf([null, "small", "medium", "large"]),
380
- rounded: a.oneOf([null, "small", "medium", "large", "full"]),
381
- fillMode: a.oneOf([null, "solid", "flat", "outline"]),
382
- className: a.string,
383
- adaptive: a.bool,
384
- adaptiveTitle: a.string
377
+ ariaLabelledBy: r.string,
378
+ ariaDescribedBy: r.string,
379
+ size: r.oneOf([null, "small", "medium", "large"]),
380
+ rounded: r.oneOf([null, "small", "medium", "large", "full"]),
381
+ fillMode: r.oneOf([null, "solid", "flat", "outline"]),
382
+ className: r.string,
383
+ adaptive: r.bool,
384
+ adaptiveTitle: r.string,
385
+ adaptiveSubtitle: r.string
385
386
  };
386
387
  const k = {
387
388
  size: "medium",
@@ -392,8 +393,8 @@ const k = {
392
393
  gradientSettings: st,
393
394
  paletteSettings: ut
394
395
  };
395
- ge.displayName = "KendoColorPicker";
396
+ ke.displayName = "KendoColorPicker";
396
397
  export {
397
- ge as ColorPicker,
398
+ ke as ColorPicker,
398
399
  dt as ColorPickerPropsContext
399
400
  };
@@ -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 v=require("react"),s=require("@progress/kendo-react-layout"),k=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),y=require("@progress/kendo-react-common");function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,c.get?c:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const o=h(v),x=e=>{const{windowWidth:t=0,children:a,navigatable:c,navigatableElements:d,expand:u,animation:p,title:m,subTitle:b,footer:n,onClose:r}=e,f=()=>o.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",icon:"x",svgIcon:k.xIcon,onClick:r}),l=y.useAdaptiveModeContext(),g={navigatable:c||!1,navigatableElements:d||[],expand:u,animation:p,suffixActions:f(),onClose:r,animationStyles:l&&t<=l.small?{top:0,width:"100%",height:"100%"}:void 0,title:m,subTitle:b,className:"k-adaptive-actionsheet",position:l&&t<=l.small?"fullscreen":void 0};return o.createElement(s.ActionSheet,{...g},a,o.createElement(s.ActionSheetFooter,{className:"k-actions k-actions-stretched"},o.createElement(i.Button,{size:"large",className:"k-coloreditor-cancel","aria-label":n.cancelText,onClick:n.onCancel},n.cancelText),o.createElement(i.Button,{themeColor:"primary",size:"large",className:"k-coloreditor-apply","aria-label":n.applyText,onClick:n.onApply},n.applyText)))};exports.AdaptiveMode=x;
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 t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const n=h(k),C=e=>{const{windowWidth:t=0,children:a,navigatable:l,navigatableElements:d,expand:u,animation:m,title:p,subTitle:b,footer:o,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&&t<=c.small?{top:0,width:"100%",height:"100%"}:void 0,title:p,subTitle:b,className:"k-adaptive-actionsheet",position:c&&t<=c.small?"fullscreen":void 0};return n.createElement(s.ActionSheet,{...g},a,n.createElement(s.ActionSheetFooter,{className:"k-actions k-actions-stretched"},n.createElement(i.Button,{size:"large",className:"k-coloreditor-cancel","aria-label":o.cancelText,onClick:o.onCancel},o.cancelText),n.createElement(i.Button,{themeColor:"primary",size:"large",className:"k-coloreditor-apply","aria-label":o.applyText,onClick:o.onApply},o.applyText)))};exports.AdaptiveMode=C;
@@ -6,15 +6,15 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as t from "react";
9
- import { ActionSheet as h, ActionSheetFooter as v } from "@progress/kendo-react-layout";
10
- import { xIcon as C } from "@progress/kendo-svg-icons";
9
+ import { ActionSheet as v, ActionSheetFooter as x } from "@progress/kendo-react-layout";
10
+ import { checkIcon as C } from "@progress/kendo-svg-icons";
11
11
  import { Button as o } from "@progress/kendo-react-buttons";
12
12
  import { useAdaptiveModeContext as g } from "@progress/kendo-react-common";
13
13
  const E = (i) => {
14
14
  const {
15
15
  windowWidth: l = 0,
16
- children: c,
17
- navigatable: r,
16
+ children: r,
17
+ navigatable: c,
18
18
  navigatableElements: s,
19
19
  expand: m,
20
20
  animation: p,
@@ -22,7 +22,7 @@ const E = (i) => {
22
22
  subTitle: f,
23
23
  footer: e,
24
24
  onClose: n
25
- } = i, x = () => /* @__PURE__ */ t.createElement(
25
+ } = i, h = () => /* @__PURE__ */ t.createElement(
26
26
  o,
27
27
  {
28
28
  tabIndex: 0,
@@ -30,16 +30,17 @@ const E = (i) => {
30
30
  "aria-disabled": "false",
31
31
  type: "button",
32
32
  fillMode: "flat",
33
- icon: "x",
33
+ size: "large",
34
+ themeColor: "primary",
34
35
  svgIcon: C,
35
36
  onClick: n
36
37
  }
37
38
  ), a = g(), b = {
38
- navigatable: r || !1,
39
+ navigatable: c || !1,
39
40
  navigatableElements: s || [],
40
41
  expand: m,
41
42
  animation: p,
42
- suffixActions: x(),
43
+ suffixActions: h(),
43
44
  onClose: n,
44
45
  animationStyles: a && l <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0,
45
46
  title: d,
@@ -47,7 +48,7 @@ const E = (i) => {
47
48
  className: "k-adaptive-actionsheet",
48
49
  position: a && l <= a.small ? "fullscreen" : void 0
49
50
  };
50
- return /* @__PURE__ */ t.createElement(h, { ...b }, c, /* @__PURE__ */ t.createElement(v, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
51
+ return /* @__PURE__ */ t.createElement(v, { ...b }, r, /* @__PURE__ */ t.createElement(x, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
51
52
  o,
52
53
  {
53
54
  size: "large",