@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 3.88 kB
JavaScript
var p=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var S=(o,e)=>{for(var t in e)p(o,t,{get:e[t],enumerable:!0})},$=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of T(e))!C.call(o,n)&&n!==t&&p(o,n,{get:()=>e[n],enumerable:!(i=R(e,n))||i.enumerable});return o};var w=o=>$(p({},"__esModule",{value:!0}),o);var j={};S(j,{POPOVER_CLASSNAME:()=>x,Popover:()=>l,default:()=>V});module.exports=w(j);var a=(...o)=>o.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?a(...e):typeof e=="object"?Object.keys(e).map((t,i)=>e[i]||e[t]&&t||null).filter(t=>t!==null).join(" "):e).filter(e=>!!e).join(" ");var N={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var m={};function A(o){return m[o]=(m[o]||0)+1,`k-${o}-${m[o]}`}var u="popup",M=u;var h=require("react/jsx-runtime"),k="k-animation-container",I=[],D={},f={positionMode:"absolute",shown:!0},d=o=>{let{positionMode:e=f.positionMode,shown:t=f.shown,animationStyle:i,offset:n,...c}=o;return(0,h.jsx)("div",{...c,style:{...n,...o.style},className:a(o.className,k,{"k-animation-container-shown":t,"k-animation-container-fixed":e==="fixed"}),children:(0,h.jsx)("div",{className:"k-child-animation-container",style:i,children:o.children})})};d.states=I;d.options=D;d.className=k;d.defaultOptions=f;d.moduleName=u;d.folderName=M;var b="popup",y=b;var v=require("react/jsx-runtime"),P="k-popup",K=[],H={},E={positionMode:"absolute"},s=o=>{let{offset:e,positionMode:t=E.positionMode,animationStyle:i,containerClassName:n,containerRole:c,containerAriaLabel:_,...L}=o;return(0,v.jsx)(d,{positionMode:t,offset:e,animationStyle:i,className:n,role:c,"aria-label":_,children:(0,v.jsx)("div",{...L,className:a(o.className,P),children:o.children})})};s.states=K;s.options=H;s.className=P;s.defaultOptions=E;s.moduleName=b;s.folderName=y;s.ariaSpec={selector:".k-popup",rules:[{selector:".k-animation-container",attribute:"role (when appended to body)",usage:'Container gets role="region" when appended to document body. Popup is a building block \u2014 ARIA semantics come from consuming components.'}]};var g="popover",O=g;var r=require("react/jsx-runtime"),x="k-popover",U=[],z={},F={},l=o=>{let{callout:e,title:t,body:i,id:n=A("popover"),...c}=o;return(0,r.jsxs)(s,{...c,className:a(o.className,x),role:"dialog",id:n,"aria-labelledby":t?`${n}-header`:void 0,"aria-describedby":i?`${n}-body`:void 0,children:[e&&(0,r.jsx)("div",{className:a("k-popover-callout",{[`k-callout-${N.calloutMap[e]||e}`]:e})}),(0,r.jsxs)("div",{className:"k-popover-inner",children:[t&&(0,r.jsx)("div",{className:"k-popover-header",id:`${n}-header`,children:t}),i&&(0,r.jsx)("div",{className:"k-popover-body",id:`${n}-body`,children:i}),(0,r.jsx)(r.Fragment,{children:o.children})]})]})};l.states=U;l.options=z;l.className=x;l.defaultOptions=F;l.moduleName=g;l.folderName=O;l.ariaSpec={selector:".k-popover",implicitRole:"dialog",rules:[{selector:".k-popover",attribute:"role=dialog",usage:"Announces the dialog role when the popover contains focusable elements. Use role=tooltip when it does not."},{selector:".k-popover",attribute:"id",usage:"The element needs an id to be associated with the aria-describedby attribute of the trigger element."},{selector:".k-popover",attribute:"aria-labelledby",usage:"Links the popover container with the popover header element when there is focusable content."},{selector:".k-popover",attribute:"aria-describedby",usage:"Links the popover container with the popover body element when there is focusable content."},{selector:".k-popover-header",attribute:"id",usage:"Links the popover header with the popover container via aria-labelledby."},{selector:".k-popover-body",attribute:"id",usage:"Links the popover body with the popover container via aria-describedby."}]};var V=l;