@ulu/frontend 0.1.0-beta.53 → 0.1.0-beta.55
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/CHANGELOG.md +11 -0
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +2 -2
- package/docs-dev/assets/main.js +7747 -503
- package/docs-dev/assets/style.css +221 -166
- package/docs-dev/changelog/index.html +6248 -0
- package/docs-dev/demos/accordion/index.html +5392 -0
- package/docs-dev/demos/basic-hero/index.html +111 -0
- package/docs-dev/demos/breakpoints-manager/index.html +5246 -0
- package/docs-dev/demos/button/index.html +5214 -0
- package/docs-dev/demos/button-verbose/index.html +5238 -0
- package/docs-dev/demos/callout/index.html +5284 -0
- package/docs-dev/demos/captioned-figure/index.html +5266 -0
- package/docs-dev/demos/card/index.html +5262 -0
- package/docs-dev/demos/card-grid/index.html +5357 -0
- package/docs-dev/demos/counter-list/index.html +5224 -0
- package/docs-dev/demos/css-icons/index.html +5855 -0
- package/docs-dev/demos/data-grid/index.html +6109 -0
- package/docs-dev/demos/data-table/index.html +5413 -0
- package/docs-dev/demos/details-group/index.html +5267 -0
- package/docs-dev/demos/file-save/index.html +5255 -0
- package/docs-dev/demos/flipcard/index.html +5804 -0
- package/docs-dev/demos/form-theme/index.html +5422 -0
- package/docs-dev/demos/hero/index.html +309 -0
- package/docs-dev/demos/image-grid/index.html +165 -0
- package/docs-dev/demos/index.html +5193 -0
- package/docs-dev/demos/list-inline/index.html +5220 -0
- package/docs-dev/demos/list-lines/index.html +5210 -0
- package/docs-dev/demos/menu-stack/index.html +5349 -0
- package/docs-dev/demos/modals/index.html +5371 -0
- package/docs-dev/demos/nav-strip/index.html +5305 -0
- package/docs-dev/demos/overlay-section/index.html +5281 -0
- package/docs-dev/demos/popovers/index.html +5453 -0
- package/docs-dev/demos/print/index.html +5213 -0
- package/docs-dev/demos/pull-quote/index.html +5212 -0
- package/docs-dev/demos/rule/index.html +5274 -0
- package/docs-dev/demos/scroll-slider/index.html +170 -0
- package/docs-dev/demos/scrollpoints/index.html +5231 -0
- package/docs-dev/demos/slider/index.html +172 -0
- package/docs-dev/demos/spoke-spinner/index.html +5208 -0
- package/docs-dev/demos/sticky-list/index.html +5223 -0
- package/docs-dev/demos/tabs/index.html +5333 -0
- package/docs-dev/demos/tag/index.html +5213 -0
- package/docs-dev/demos/theme-toggle/index.html +5279 -0
- package/docs-dev/demos/tile-grid-overlay/index.html +390 -0
- package/docs-dev/demos/tiles/index.html +5462 -0
- package/docs-dev/demos/tooltip/index.html +5241 -0
- package/docs-dev/guide/building-stylesheet/index.html +5262 -0
- package/docs-dev/guide/developing-ulu-scss-module/index.html +5314 -0
- package/docs-dev/guide/index.html +5195 -0
- package/docs-dev/index.html +5242 -0
- package/docs-dev/javascript/events/index.html +5351 -0
- package/docs-dev/javascript/index.html +5208 -0
- package/docs-dev/javascript/settings/index.html +5400 -0
- package/docs-dev/javascript/ui-breakpoints/index.html +5651 -0
- package/docs-dev/javascript/ui-collapsible/index.html +5318 -0
- package/docs-dev/javascript/ui-details-group/index.html +5322 -0
- package/docs-dev/javascript/ui-dialog/index.html +5367 -0
- package/docs-dev/javascript/ui-flipcard/index.html +5258 -0
- package/docs-dev/javascript/ui-grid/index.html +5233 -0
- package/docs-dev/javascript/ui-modal-builder/index.html +5461 -0
- package/docs-dev/javascript/ui-overflow-scroller/index.html +5191 -0
- package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +5209 -0
- package/docs-dev/javascript/ui-page/index.html +5206 -0
- package/docs-dev/javascript/ui-popover/index.html +5241 -0
- package/docs-dev/javascript/ui-print/index.html +5250 -0
- package/docs-dev/javascript/ui-print-details/index.html +5221 -0
- package/docs-dev/javascript/ui-programmatic-modal/index.html +5191 -0
- package/docs-dev/javascript/ui-scroll-slider/index.html +5252 -0
- package/docs-dev/javascript/ui-scrollpoint/index.html +5431 -0
- package/docs-dev/sass/base/color/index.html +5224 -0
- package/docs-dev/sass/base/elements/index.html +5395 -0
- package/docs-dev/sass/base/index/index.html +5394 -0
- package/docs-dev/sass/base/index.html +5202 -0
- package/docs-dev/sass/base/keyframes/index.html +5226 -0
- package/docs-dev/sass/base/layout/index.html +5386 -0
- package/docs-dev/sass/base/normalize/index.html +5234 -0
- package/docs-dev/sass/base/print/index.html +5230 -0
- package/docs-dev/sass/base/root/index.html +5250 -0
- package/docs-dev/sass/base/typography/index.html +5250 -0
- package/docs-dev/sass/components/accordion/index.html +5552 -0
- package/docs-dev/sass/components/adaptive-spacing/index.html +5495 -0
- package/docs-dev/sass/components/badge/index.html +5443 -0
- package/docs-dev/sass/components/basic-hero/index.html +5385 -0
- package/docs-dev/sass/components/button/index.html +5379 -0
- package/docs-dev/sass/components/button-verbose/index.html +5566 -0
- package/docs-dev/sass/components/callout/index.html +5541 -0
- package/docs-dev/sass/components/captioned-figure/index.html +5484 -0
- package/docs-dev/sass/components/card/index.html +5799 -0
- package/docs-dev/sass/components/card-grid/index.html +5393 -0
- package/docs-dev/sass/components/counter-list/index.html +5458 -0
- package/docs-dev/sass/components/css-icon/index.html +5497 -0
- package/docs-dev/sass/components/data-grid/index.html +5632 -0
- package/docs-dev/sass/components/data-table/index.html +5568 -0
- package/docs-dev/sass/components/fill-context/index.html +5259 -0
- package/docs-dev/sass/components/flipcard/index.html +5560 -0
- package/docs-dev/sass/components/flipcard-grid/index.html +5380 -0
- package/docs-dev/sass/components/form-theme/index.html +6105 -0
- package/docs-dev/sass/components/hero/index.html +5429 -0
- package/docs-dev/sass/components/horizontal-rule/index.html +5378 -0
- package/docs-dev/sass/components/image-grid/index.html +5385 -0
- package/docs-dev/sass/components/index/index.html +5433 -0
- package/docs-dev/sass/components/index.html +5202 -0
- package/docs-dev/sass/components/links/index.html +5229 -0
- package/docs-dev/sass/components/list-inline/index.html +5399 -0
- package/docs-dev/sass/components/list-lines/index.html +5420 -0
- package/docs-dev/sass/components/list-ordered/index.html +5225 -0
- package/docs-dev/sass/components/list-unordered/index.html +5229 -0
- package/docs-dev/sass/components/menu-stack/index.html +5572 -0
- package/docs-dev/sass/components/modal/index.html +5613 -0
- package/docs-dev/sass/components/nav-strip/index.html +5479 -0
- package/docs-dev/sass/components/overlay-section/index.html +5423 -0
- package/docs-dev/sass/components/pager/index.html +5541 -0
- package/docs-dev/sass/components/placeholder-block/index.html +5463 -0
- package/docs-dev/sass/components/popover/index.html +5574 -0
- package/docs-dev/sass/components/pull-quote/index.html +5437 -0
- package/docs-dev/sass/components/ratio-box/index.html +5383 -0
- package/docs-dev/sass/components/rule/index.html +5385 -0
- package/docs-dev/sass/components/scroll-slider/index.html +5484 -0
- package/docs-dev/sass/components/skip-link/index.html +5369 -0
- package/docs-dev/sass/components/slider/index.html +5493 -0
- package/docs-dev/sass/components/spoke-spinner/index.html +5443 -0
- package/docs-dev/sass/components/sticky-list/index.html +5603 -0
- package/docs-dev/sass/components/tabs/index.html +5519 -0
- package/docs-dev/sass/components/tag/index.html +5544 -0
- package/docs-dev/sass/components/tile-button/index.html +5424 -0
- package/docs-dev/sass/components/tile-grid/index.html +5559 -0
- package/docs-dev/sass/components/tile-grid-overlay/index.html +5360 -0
- package/docs-dev/sass/components/vignette/index.html +5379 -0
- package/docs-dev/sass/components/wysiwyg/index.html +5389 -0
- package/docs-dev/sass/core/breakpoint/index.html +5996 -0
- package/docs-dev/sass/core/button/index.html +6116 -0
- package/docs-dev/sass/core/color/index.html +6099 -0
- package/docs-dev/sass/core/cssvar/index.html +5991 -0
- package/docs-dev/sass/core/element/index.html +6261 -0
- package/docs-dev/sass/core/index.html +5189 -0
- package/docs-dev/sass/core/layout/index.html +5968 -0
- package/docs-dev/sass/core/path/index.html +5358 -0
- package/docs-dev/sass/core/selector/index.html +5437 -0
- package/docs-dev/sass/core/typography/index.html +6363 -0
- package/docs-dev/sass/core/units/index.html +5402 -0
- package/docs-dev/sass/core/utils/index.html +7697 -0
- package/docs-dev/sass/helpers/color/index.html +5224 -0
- package/docs-dev/sass/helpers/display/index.html +5229 -0
- package/docs-dev/sass/helpers/index/index.html +5391 -0
- package/docs-dev/sass/helpers/index.html +5202 -0
- package/docs-dev/sass/helpers/typography/index.html +5252 -0
- package/docs-dev/sass/helpers/units/index.html +5398 -0
- package/docs-dev/sass/helpers/utilities/index.html +5229 -0
- package/docs-dev/sass/index.html +5253 -0
- package/js/ui/modal-builder.js +32 -3
- package/package.json +1 -1
- package/scss/components/_counter-list.scss +46 -46
- package/types/ui/index.d.ts +1 -1
- package/types/ui/modal-builder.d.ts +85 -0
- package/types/ui/modal-builder.d.ts.map +1 -1
- package/types/utils/index.d.ts +1 -1
- package/docs-dev/changelog/updates-and-changes/index.html +0 -5109
- package/docs-dev/demos/card-new/index.html +0 -5088
- package/docs-dev/demos/card-old/index.html +0 -5223
- package/docs-dev/demos/card.1/index.html +0 -5223
- package/docs-dev/demos/card.TRASH/index.html +0 -5541
- package/docs-dev/demos/list-inline.1/index.html +0 -4727
- package/docs-dev/guide/updates-and-changes/index.html +0 -5033
package/dist/ulu-frontend.min.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var sa=Object.defineProperty;var la=(n,e,t)=>e in n?sa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var z=(n,e,t)=>la(n,typeof e!="symbol"?e+"":e,t);const Ti={iconClassClose:"css-icon css-icon--close",iconClassDragX:"css-icon css-icon--drag-x",iconClassPrevious:"css-icon css-icon--angle-left",iconClassNext:"css-icon css-icon--angle-right",cssvarPrefix:""};let it={...Ti};function ua(){return{...Ti}}function Ai(n){Object.assign(it,n)}function ca(){return{...it}}function Mi(n){if(!it.hasOwnProperty(n)){console.warn(`Attempted to access non-existent setting: ${n}`);return}return it[n]}function fa(n,e){it[n]=e}function we(n,e){return{toString(){const t=Mi(n);return e?e(t):t}}}const da=Object.freeze(Object.defineProperty({__proto__:null,getDefaultSettings:ua,getSetting:Mi,getSettings:ca,updateSetting:fa,updateSettings:Ai,wrapSettingString:we},Symbol.toStringTag,{value:"Module"}));function Pi(n,e,t,r){var o;return function(){var a=this,s=arguments,l=function(){o=null,n.apply(a,s)};clearTimeout(o),o=setTimeout(l,e)}}function pa(){return typeof window<"u"&&typeof window.document<"u"}function ki(n){return new DOMParser().parseFromString(n,"text/html").body.firstElementChild}pa()&&(va(),ha());const mi={pageModified(n){n.dispatchEvent(new CustomEvent(Q("pageModified"),{bubbles:!0}))},pageResized(n){n.dispatchEvent(new CustomEvent(Q("pageResized"),{bubbles:!0}))},beforePrint(n){n.dispatchEvent(new CustomEvent(Q("beforePrint"),{bubbles:!0}))},afterPrint(n){n.dispatchEvent(new CustomEvent(Q("afterPrint"),{bubbles:!0}))}};function bt(n,e){mi[n]?mi[n](e):console.warn(`Unable to dispatch site event: ${n} in context:`,e)}function Q(n){return"ulu:"+n}function va(){window.addEventListener("resize",Pi(()=>bt("pageResized",document),250))}function ha(){window.addEventListener("beforeprint",()=>{bt("beforePrint",document)}),window.addEventListener("afterprint",()=>{bt("afterPrint",document)})}const ma=Object.freeze(Object.defineProperty({__proto__:null,dispatch:bt,getName:Q},Symbol.toStringTag,{value:"Module"})),Ii=/^[{\[][\s\S]*[}\]]$/;function Di(n){return n.replace(/^data-/,"").replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Li(n,e){const t=n.dataset[e];try{return JSON.parse(t)}catch(r){return console.error(`Error getting JSON from dataset (${e}) -- "${t}"
|
|
2
2
|
`,n,r),{}}}function Ri(n,e){const t=n.dataset[e];return t&&Ii.test(t.trim())?Li(n,e):t}function Fi(n,e){const t=n.getBoundingClientRect();return e.clientY<t.top||e.clientY>t.top+t.height||e.clientX<t.left||e.clientX>t.left+t.width}function $i(n,e={columnFirst:"position-column-first",columnLast:"position-column-last",rowFirst:"position-row-first",rowLast:"position-row-last"}){const t=[...n.children],r=[];let o;t.forEach(i=>{const a=i.getBoundingClientRect().y;o!==a&&r.push([]),r[r.length-1].push(i),o=a,i.classList.remove(...Object.values(e))}),r.forEach((i,a)=>{a===0&&i.forEach(s=>s.classList.add(e.rowFirst)),a==r.length-1&&i.forEach(s=>s.classList.add(e.rowLast)),i.forEach((s,l)=>{l===0&&s.classList.add(e.columnFirst),l==i.length-1&&s.classList.add(e.columnLast)})})}function Ni(n,e=document){return typeof n=="string"?e.querySelector(n):n instanceof Element?n:(console.warn("getElement: Invalid target type (expected String/Node)",n),null)}function Xr(n,e=document){return typeof n=="string"?[...e.querySelectorAll(n)]:n instanceof Element?[n]:Array.isArray(n)||n instanceof NodeList?[...n]:(console.warn("getElement: Invalid target type (expected String/Node/Array/Node List)",n),null)}function gt(n){return typeof n=="string"?n.split(" ").filter(e=>e!==""):Array.isArray(n)?n:n?(console.warn("resolveClassArray: Invalid class input type.",n),[]):[]}function qi(n){const t={...{scrollableChild:document.body,container:window,propertyElement:document.documentElement,propName:"--ulu-scrollbar-width"},...n},{scrollableChild:r,container:o,propertyElement:i,propName:a}=t,s=Jr(r,o);i.style.setProperty(a,`${s}px`)}function Jr(n=document.body,e=window){return e.innerWidth-n.clientWidth}const ba=Object.freeze(Object.defineProperty({__proto__:null,addScrollbarProperty:qi,dataAttributeToDatasetKey:Di,getDatasetJson:Li,getDatasetOptionalJson:Ri,getElement:Ni,getElements:Xr,getScrollbarWidth:Jr,regexJsonString:Ii,resolveClasses:gt,setPositionClasses:$i,wasClickOutside:Fi},Symbol.toStringTag,{value:"Module"}));function ga(){qi()}const xa=Object.freeze(Object.defineProperty({__proto__:null,init:ga},Symbol.toStringTag,{value:"Module"}));function Qt(n,e){var t=n.indexOf(e);t>-1&&n.splice(t,1)}function ya(n,e){return`--${n}-${e}`}const st={debug:!1,warningsAlways:!0,errorsAlways:!0,outputContext:!1},_a="console"in window;function Yr(n){return _a&&st.debug&&((n==null?void 0:n.debug)||n==null)}function Ea(n){var e;return typeof n=="object"&&((e=n==null?void 0:n.constructor)==null?void 0:e.name)}function Qr(n,e,t){const r=Ea(e)||"Logger";console[n](r,...t),st.outputContext&&console.log(`Context:
|
|
3
3
|
`,e)}function wa(n){Object.assign(st,n)}function me(n,...e){Yr(n)&&Qr("log",n,e)}function en(n,...e){(st.warningsAlways||Yr(n))&&Qr("warn",n,e)}function re(n,...e){(st.errorsAlways||Yr(n))&&Qr("error",n,e)}const Sa=Object.freeze(Object.defineProperty({__proto__:null,log:me,logError:re,logWarning:en,set:wa},Symbol.toStringTag,{value:"Module"})),Oa=n=>ya(n,"breakpoint");window.addEventListener(Q("pageResized"),()=>{xt.instances.forEach(n=>n.update())});const We=class We{constructor(e){Object.assign(this,We.defaults,e),this.active=null,this.previous=null,this.activeIndex=null,this.resizeDirection=null,this.previousIndex=null,this.breakpoints={},this.onChangeCallbacks=[],this.order.forEach(t=>this.breakpoints[t]=new Ca(t,this)),me(this,this),this.update(),We.instances.push(this)}onChange(e){this.onChangeCallbacks.push(e)}removeOnChange(e){Qt(this.onChangeCallbacks,e)}getBreakpointInPseudo(){return window.getComputedStyle(this.element,this.pseudoSelector).content.replace(/^"|"$/g,"")}getBreakpointInProperty(){return getComputedStyle(this.element).getPropertyValue(this.customProperty).trim()}getBreakpoint(){return this.valueFromPseudo?this.getBreakpointInPseudo():this.getBreakpointInProperty()}update(){const e=this.getBreakpoint();if(!e){re(this,"Unable to get current breakpoint, maybe order is incorrect? Breakpoint check skipped!");return}if(e===this.active)return;this.previous=this.active,this.previousIndex=this.activeIndex;const t=this.order.indexOf(e);this.active=e,this.activeIndex=t;const r=this.at(this.active),o=m=>this.at(m),i=this.order.slice(t).map(o),a=this.order.slice(0,t).map(o),s=this.order.slice(0,t+1).map(o),l=this.order.slice(t+1).map(o),u=this.order.slice().map(o);u.splice(t,1),me(this,"max:",i.map(m=>m.name).join()),me(this,"min:",s.map(m=>m.name).join()),i.forEach(m=>m._setDirection("max",!0)),s.forEach(m=>m._setDirection("min",!0)),r._setDirection("only",!0),a.forEach(m=>m._setDirection("max",!1)),l.forEach(m=>m._setDirection("min",!1)),u.forEach(m=>m._setDirection("only",!1)),this.previousIndex!==null&&(this.resizeDirection=this.previousIndex<t?"up":"down"),this.onChangeCallbacks.forEach(m=>m(this))}at(e){const t=this.breakpoints[e];return e||re(this,"Unable to find breakpoint for:",t),t}};z(We,"instances",[]),z(We,"defaults",{element:document==null?void 0:document.documentElement,valueFromPseudo:!1,customProperty:"--breakpoint",customProperty:we("cssvarPrefix",Oa),pseudoSelector:":before",order:["none","small","medium","large"],debug:!1});let xt=We;class Zt{constructor(e,t){this.direction=e,this.active=!1,this.on=[],this.off=[],this.breakpoint=t}change(e){this.active!==e&&(e?this._call(!0):this.active&&this._call(!1),this.active=e)}_call(e){(e?this.on:this.off).forEach(r=>r()),me(this.breakpoint._manager,`Handlers called (${e?"on":"off"}): ${this.direction}`)}getHandlers(e){return typeof e!="object"?{on:e}:e}add(e){const t=this.getHandlers(e);t.on&&this.on.push(t.on),t.off&&this.off.push(t.off),this.active&&t.on&&(t.on(),me(this.breakpoint._manager,`Handler called immediately: ${this.direction}`,t.on))}remove(e){const t=this.getHandlers(e);t.on&&Qt(this.on,t.on),t.off&&Qt(this.off,t.off)}}class Ca{constructor(e,t){this.directions={max:new Zt("max",this),min:new Zt("min",this),only:new Zt("only",this)},this._manager=t,this.name=e}_setDirection(e,t){this.directions[e].change(t)}max(e){this.directions.max.add(e)}min(e){this.directions.min.add(e)}only(e){this.directions.only.add(e)}remove(e,t){(t?[t]:["max","min","only"]).forEach(o=>o.remove(e))}log(...e){e.unshift(`Breakpoint (${this.name}):`),this._manager.log.apply(this._manager,e)}}const Ta=Object.freeze(Object.defineProperty({__proto__:null,BreakpointManager:xt},Symbol.toStringTag,{value:"Module"}));let Aa=0;function ei(){return`ulu-uid-${++Aa}`}function yt(n){n.id||(n.id=ei())}const Ma=Object.freeze(Object.defineProperty({__proto__:null,ensureId:yt,newId:ei},Symbol.toStringTag,{value:"Module"})),Dt=class Dt{constructor(e,t){const{trigger:r,content:o}=e;if(!r||!o){re(this,"missing required elements (trigger or content)");return}const i=Object.assign({},Dt.defaults,t);this.elements=e,this.options=i,this.isOpen=!1,this.handlers={},yt(r),yt(o),this.debugLog(this,this),i.selfManaged||this.attachHandlers(),this.setup()}attachHandlers(){const{trigger:e,content:t}=this.elements,{focusoutCloses:r}=this.options;this.clickHandler=o=>{this.onClick(o)},this.focusoutHandler=o=>{r&&document.addEventListener("focusin",()=>{t.contains(document.activeElement)||this.close(o)},{once:!0})},e.addEventListener("click",this.clickHandler),t.addEventListener("focusout",this.focusoutHandler)}removeHandlers(){const{trigger:e,content:t}=this.elements;e.removeEventListener("click",this.clickHandler),t.removeEventListener("focusout",this.focusoutHandler)}onClick(e){this.toggle(e)}destroy(){this.removeHandlers(),this.destroyTemporaryHandlers()}debugLog(...e){this.options.debug&&me(this,...e)}setup(){const{trigger:e,content:t}=this.elements,{startOpen:r}=this.options;e.setAttribute("role","button"),e.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",e.id),this.setState(r)}createEvent(e,t){return new CustomEvent(Q("collapsible:"+e),{detail:t})}setState(e,t){const r={collapsible:this,isOpen:e,event:t};this.debugLog(this,"Set state",r);const{trigger:o,content:i}=this.elements,{openClass:a}=this.options,s=l=>l.classList[e?"add":"remove"](a);o.setAttribute("aria-expanded",e?"true":"false"),s(o),s(i),this.isOpen=e,this.options.onChange(r),o.dispatchEvent(this.createEvent("change",r)),e?this.setupTemporaryHandlers():this.destroyTemporaryHandlers()}setupTemporaryHandlers(){const{content:e,trigger:t}=this.elements,{clickOutsideCloses:r,escapeCloses:o}=this.options,i=s=>{const{target:l}=s,u=t.contains(l),m=e.contains(l);r&&!u&&!m&&this.close(s)},a=s=>{o&&s.key==="Escape"&&this.close(s)};document.addEventListener("click",i),document.addEventListener("keydown",a),this.handlers.onDocumentClick=i,this.handlers.onDocumentKeydown=a}destroyTemporaryHandlers(){const{onDocumentClick:e,onDocumentKeydown:t}=this.handlers;e&&document.removeEventListener("click",e),e&&document.removeEventListener("keydown",t)}open(e){this.setState(!0,e)}close(e){this.setState(!1,e)}toggle(e){this.setState(!this.isOpen,e)}};z(Dt,"defaults",{clickOutsideCloses:!1,focusoutCloses:!1,escapeCloses:!1,selfManaged:!1,startOpen:!1,openClass:"is-active",debug:!0,onChange(e){}});let _t=Dt;const Pa=Object.freeze(Object.defineProperty({__proto__:null,Collapsible:_t},Symbol.toStringTag,{value:"Module"}));function $t(n){return e=>n.every(t=>Object.prototype.hasOwnProperty.call(e,t))}const he=class he{constructor(e){if(!he.hasRequiredOptions(e))throw new Error(`Missing a required options: ${he.requiredOptions.join(", ")}`);this.options=Object.assign({},he.defaults,e),this.logTitle=`ULU: ${this.options.type}:
|
|
4
|
-
`}init(e){var t;this.setupElements(e),(t=e.events)!=null&&t.length&&e.events.forEach(r=>{document.addEventListener(Q(r),()=>this.setupElements(e))})}setupElements(e){const{setup:t,key:r,withData:o,context:i}=e;this.queryAllInitial(r,o,i).forEach(s=>t(s,this))}getAttribute(e){const{baseAttribute:t}=this.options;return e?`${t}-${e}`:`${t}`}attributeSelector(e){return`[${this.getAttribute(e)}]`}attributeSelectorInitial(e){return`${this.attributeSelector(e)}:not([${this.getAttribute("init")}])`}queryAllInitial(e,t,r=document){return[...r.querySelectorAll(this.attributeSelectorInitial(e))].map(i=>({element:i,data:t?this.getData(i,e):null,initialize:()=>this.initializeElement(i)}))}initializeElement(e){e.setAttribute(this.getAttribute("init"),"")}getData(e,t){const r=Di(this.getAttribute(t));return Ri(e,r)}log(...e){console.log(this.logTitle,...e)}warn(...e){console.warn(this.logTitle,...e)}logError(...e){console.error(this.logTitle,...e)}};z(he,"defaults",{type:null,baseAttribute:null}),z(he,"requiredOptions",["type","baseAttribute"]),z(he,"hasRequiredOptions",$t(he.requiredOptions));let J=he;const Lt=class Lt{constructor(e,t,r){(!t||!e)&&re(this,"Missing required elements 'control' or 'container'"),this.options=Object.assign({},Lt.defaults,r),this.container=e,this.control=t,this.handlerMousedown=this.onMousedown.bind(this),this.control.addEventListener("mousedown",this.handlerMousedown)}destroy(){this.control.removeEventListener("mousedown",this.handlerMousedown)}onMousedown(e){const{overrideMaxWidth:t,fromLeft:r}=this.options,o=document.documentElement,i=document.defaultView,a=e.clientX,s=parseInt(i.getComputedStyle(this.container).width,10);t&&(this.container.style.maxWidth="none");const l=m=>{const f=r?-1:1;this.container.style.width=`${s+(m.clientX-a)*f}px`},u=()=>{o.removeEventListener("mousemove",l,!1)};o.addEventListener("mousemove",l,!1),o.addEventListener("mouseup",u,{capture:!0,once:!0})}};z(Lt,"defaults",{debug:!1,overrideMaxWidth:!1,fromLeft:!1});let Et=Lt;const ka=Object.freeze(Object.defineProperty({__proto__:null,Resizer:Et},Symbol.toStringTag,{value:"Module"})),Ia=[".youtube-embedded-video",'iframe[title*="YouTube video player"]','iframe[src*="youtube.com/embed"]'];function Hi(n=document){Wi(n).forEach(t=>{try{t.contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}',"*")}catch(r){console.error(r)}})}function Bi(n=document){Wi(n).forEach(t=>{const{src:r}=t;r&&(t.src=r.split("?")[0]+"?rel=0&enablejsapi=1")})}function Wi(n){return n.querySelectorAll(Ia.join(", "))}const Da=Object.freeze(Object.defineProperty({__proto__:null,pauseVideos:Hi,prepVideos:Bi},Symbol.toStringTag,{value:"Module"})),ti="data-ulu-dialog",Ge=new J({type:"dialog",baseAttribute:ti}),ji=Ge.getAttribute("close"),ni={nonModal:!1,documentEnd:!1,clickOutsideCloses:!0,pauseVideos:!0,preventScroll:!0,preventScrollShift:!0};let wt={...ni};function La(n){wt=Object.assign({},wt,n)}function Ra(){Ge.init({events:["pageModified"],withData:!0,setup({element:n,initialize:e,data:t}){zi(n,t),e()}}),Ge.init({key:"trigger",events:["pageModified"],withData:!0,setup({element:n,initialize:e,data:t}){Vi(n,t),e()}})}function Vi(n,e){n.addEventListener("click",t);function t(r){var s;r.target.closest("a")&&r.preventDefault();const i=document.getElementById(e);if(!i){console.error("Could not locate dialog (id)",e);return}if(((s=i==null?void 0:i.tagName)==null?void 0:s.toLowerCase())!=="dialog"){console.error("Attempted to trigger non <dialog> element. Did you mean to use modal builder?");return}const a=Ki(i);i[a.nonModal?"show":"showModal"]()}}function zi(n,e){const t=Object.assign({},wt,e),r=document.body;if(n.addEventListener("click",o),t.documentEnd&&r.appendChild(n),t.pauseVideos&&Fa(n),!t.nonModal&&t.preventScroll){let i=r.style.overflow,a=r.style.paddingRight;n.addEventListener("toggle",s=>{const l=s.newState==="open";l&&(i=r.style.overflow,a=r.style.paddingRight),t.preventScrollShift&&(r.style.paddingRight=l?`${Jr()}px`:a),r.style.overflow=l?"hidden":i})}function o(i){const{target:a}=i,s=a.closest(Ge.attributeSelector("close"));(t.clickOutsideCloses&&a===n&&Fi(n,i)||s)&&(t.pauseVideos&&$a(n),n.close())}}function Ki(n){return Object.assign({},wt,Ge.getData(n))}function Fa(n){Bi(n)}function $a(n){Hi(n),n.querySelectorAll("video").forEach(t=>t.pause())}const Na=Object.freeze(Object.defineProperty({__proto__:null,baseAttribute:ti,closeAttribute:ji,defaults:ni,getDialogOptions:Ki,init:Ra,initializer:Ge,setDefaults:La,setupDialog:zi,setupTrigger:Vi},Symbol.toStringTag,{value:"Module"})),ke=new J({type:"modal-builder",baseAttribute:"data-ulu-modal-builder"}),Gi={title:null,titleIcon:null,nonModal:!1,documentEnd:!0,allowResize:!1,position:"center",bodyFills:!1,noBackdrop:!1,size:"default",print:!1,noMinHeight:!1,class:"",baseClass:"modal",classCloseIcon:we("iconClassClose"),classResizerIcon:we("iconClassDragX"),debug:!1,templateCloseIcon(n){const{baseClass:e,classCloseIcon:t}=n;return`<span class="${e}__close-icon ${t}" aria-hidden="true"></span>`},templateResizerIcon(n){const{baseClass:e,classResizerIcon:t}=n;return`<span class="${e}__resizer-icon ${t}" aria-hidden="true"></span>`},template(n,e){const{baseClass:t}=e,r=[t,`${t}--${e.position}`,`${t}--${e.size}`,`${t}--${e.allowResize?"resize":"no-resize"}`,...e.title?[]:[`${t}--no-header`],...e.bodyFills?[`${t}--body-fills`]:[],...e.noBackdrop?[`${t}--no-backdrop`]:[],...e.noMinHeight?[`${t}--no-min-height`]:[],...e.class?[e.class]:[]];return`
|
|
4
|
+
`}init(e){var t;this.setupElements(e),(t=e.events)!=null&&t.length&&e.events.forEach(r=>{document.addEventListener(Q(r),()=>this.setupElements(e))})}setupElements(e){const{setup:t,key:r,withData:o,context:i}=e;this.queryAllInitial(r,o,i).forEach(s=>t(s,this))}getAttribute(e){const{baseAttribute:t}=this.options;return e?`${t}-${e}`:`${t}`}attributeSelector(e){return`[${this.getAttribute(e)}]`}attributeSelectorInitial(e){return`${this.attributeSelector(e)}:not([${this.getAttribute("init")}])`}queryAllInitial(e,t,r=document){return[...r.querySelectorAll(this.attributeSelectorInitial(e))].map(i=>({element:i,data:t?this.getData(i,e):null,initialize:()=>this.initializeElement(i)}))}initializeElement(e){e.setAttribute(this.getAttribute("init"),"")}getData(e,t){const r=Di(this.getAttribute(t));return Ri(e,r)}log(...e){console.log(this.logTitle,...e)}warn(...e){console.warn(this.logTitle,...e)}logError(...e){console.error(this.logTitle,...e)}};z(he,"defaults",{type:null,baseAttribute:null}),z(he,"requiredOptions",["type","baseAttribute"]),z(he,"hasRequiredOptions",$t(he.requiredOptions));let J=he;const Lt=class Lt{constructor(e,t,r){(!t||!e)&&re(this,"Missing required elements 'control' or 'container'"),this.options=Object.assign({},Lt.defaults,r),this.container=e,this.control=t,this.handlerMousedown=this.onMousedown.bind(this),this.control.addEventListener("mousedown",this.handlerMousedown)}destroy(){this.control.removeEventListener("mousedown",this.handlerMousedown)}onMousedown(e){const{overrideMaxWidth:t,fromLeft:r}=this.options,o=document.documentElement,i=document.defaultView,a=e.clientX,s=parseInt(i.getComputedStyle(this.container).width,10);t&&(this.container.style.maxWidth="none");const l=m=>{const f=r?-1:1;this.container.style.width=`${s+(m.clientX-a)*f}px`},u=()=>{o.removeEventListener("mousemove",l,!1)};o.addEventListener("mousemove",l,!1),o.addEventListener("mouseup",u,{capture:!0,once:!0})}};z(Lt,"defaults",{debug:!1,overrideMaxWidth:!1,fromLeft:!1});let Et=Lt;const ka=Object.freeze(Object.defineProperty({__proto__:null,Resizer:Et},Symbol.toStringTag,{value:"Module"})),Ia=[".youtube-embedded-video",'iframe[title*="YouTube video player"]','iframe[src*="youtube.com/embed"]'];function Hi(n=document){Wi(n).forEach(t=>{try{t.contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}',"*")}catch(r){console.error(r)}})}function Bi(n=document){Wi(n).forEach(t=>{const{src:r}=t;r&&(t.src=r.split("?")[0]+"?rel=0&enablejsapi=1")})}function Wi(n){return n.querySelectorAll(Ia.join(", "))}const Da=Object.freeze(Object.defineProperty({__proto__:null,pauseVideos:Hi,prepVideos:Bi},Symbol.toStringTag,{value:"Module"})),ti="data-ulu-dialog",Ge=new J({type:"dialog",baseAttribute:ti}),ji=Ge.getAttribute("close"),ni={nonModal:!1,documentEnd:!1,clickOutsideCloses:!0,pauseVideos:!0,preventScroll:!0,preventScrollShift:!0};let wt={...ni};function La(n){wt=Object.assign({},wt,n)}function Ra(){Ge.init({events:["pageModified"],withData:!0,setup({element:n,initialize:e,data:t}){zi(n,t),e()}}),Ge.init({key:"trigger",events:["pageModified"],withData:!0,setup({element:n,initialize:e,data:t}){Vi(n,t),e()}})}function Vi(n,e){n.addEventListener("click",t);function t(r){var s;r.target.closest("a")&&r.preventDefault();const i=document.getElementById(e);if(!i){console.error("Could not locate dialog (id)",e);return}if(((s=i==null?void 0:i.tagName)==null?void 0:s.toLowerCase())!=="dialog"){console.error("Attempted to trigger non <dialog> element. Did you mean to use modal builder?");return}const a=Ki(i);i[a.nonModal?"show":"showModal"]()}}function zi(n,e){const t=Object.assign({},wt,e),r=document.body;if(n.addEventListener("click",o),t.documentEnd&&r.appendChild(n),t.pauseVideos&&Fa(n),!t.nonModal&&t.preventScroll){let i=r.style.overflow,a=r.style.paddingRight;n.addEventListener("toggle",s=>{const l=s.newState==="open";l&&(i=r.style.overflow,a=r.style.paddingRight),t.preventScrollShift&&(r.style.paddingRight=l?`${Jr()}px`:a),r.style.overflow=l?"hidden":i})}function o(i){const{target:a}=i,s=a.closest(Ge.attributeSelector("close"));(t.clickOutsideCloses&&a===n&&Fi(n,i)||s)&&(t.pauseVideos&&$a(n),n.close())}}function Ki(n){return Object.assign({},wt,Ge.getData(n))}function Fa(n){Bi(n)}function $a(n){Hi(n),n.querySelectorAll("video").forEach(t=>t.pause())}const Na=Object.freeze(Object.defineProperty({__proto__:null,baseAttribute:ti,closeAttribute:ji,defaults:ni,getDialogOptions:Ki,init:Ra,initializer:Ge,setDefaults:La,setupDialog:zi,setupTrigger:Vi},Symbol.toStringTag,{value:"Module"})),ke=new J({type:"modal-builder",baseAttribute:"data-ulu-modal-builder"}),Gi={title:null,titleIcon:null,titleClass:"",nonModal:!1,documentEnd:!0,allowResize:!1,position:"center",bodyFills:!1,noBackdrop:!1,size:"default",print:!1,noMinHeight:!1,class:"",baseClass:"modal",classCloseIcon:we("iconClassClose"),classResizerIcon:we("iconClassDragX"),debug:!1,templateCloseIcon(n){const{baseClass:e,classCloseIcon:t}=n;return`<span class="${e}__close-icon ${t}" aria-hidden="true"></span>`},templateResizerIcon(n){const{baseClass:e,classResizerIcon:t}=n;return`<span class="${e}__resizer-icon ${t}" aria-hidden="true"></span>`},template(n,e){const{baseClass:t}=e,r=[t,`${t}--${e.position}`,`${t}--${e.size}`,`${t}--${e.allowResize?"resize":"no-resize"}`,...e.title?[]:[`${t}--no-header`],...e.bodyFills?[`${t}--body-fills`]:[],...e.noBackdrop?[`${t}--no-backdrop`]:[],...e.noMinHeight?[`${t}--no-min-height`]:[],...e.class?[e.class]:[]];return`
|
|
5
5
|
<dialog id="${n}" class="${r.join(" ")}">
|
|
6
6
|
${e.title?`
|
|
7
7
|
<header class="${t}__header">
|
|
8
|
-
<h2 class="${t}__title">
|
|
8
|
+
<h2 class="${t}__title ${e.titleClass}">
|
|
9
9
|
${e.titleIcon?`<span class="${t}__title-icon ${e.titleIcon}" aria-hidden="true"></span>`:""}
|
|
10
10
|
<span class="${t}__title-text">${e.title}</span>
|
|
11
11
|
</h2>
|