@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
4 lines • 1.28 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import{o,p as t,w as e,g as n,F as i,G as l}from"./common-Dd0zJQbD.js";const c=(t,o,e)=>{l(e)?t[o]=e:n(e,1)&&(t[o]={icon:e})},f=t=>{let o={};return n(t,1)?o={left:{icon:t}}:"object"==typeof t&&null!==t&&(c(o,"top",t.top),c(o,"right",t.right),c(o,"bottom",t.bottom),c(o,"left",t.left)),o},s=t=>{var o,e,n;if(null===(o=t.nextState)||void 0===o?void 0:o.has("_icons")){const o=null===(e=t.nextState)||void 0===e?void 0:e.get("_icons");null===(n=t.nextState)||void 0===n||n.set("_icons",f(o))}},d=t=>"object"==typeof t&&null!==t&&(void 0===t.style||i(t.style))&&(void 0===t.label||n(t.label))&&n(t.icon,1),u=(l,c,i={})=>{o(c,()=>{var o;try{c=t(c)}catch(o){}e(l,"_icons",t=>{const o="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||o||n(t,1)||"object"==typeof t&&null!==t&&(n(t.left,0)||d(t.left)||n(t.right,0)||d(t.right)||n(t.top,0)||d(t.top)||n(t.bottom,0)||d(t.bottom))},new Set(["KoliBriIcon"]),c,Object.assign(Object.assign({},i),{defaultValue:{},hooks:{afterPatch:null===(o=i.hooks)||void 0===o?void 0:o.afterPatch,beforePatch:(t,o,e,n)=>{var l,c;"function"==typeof(null===(l=i.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(c=i.hooks)||void 0===c||c.beforePatch(t,o,e,n)),s(e)}}}))})};export{u as v};