@public-ui/sample-react 3.0.0-alpha.0 → 4.0.0-alpha.0
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/dist/1487.js +1 -1
- package/dist/1552.js +1 -1
- package/dist/{6560.js → 1596.js} +2 -2
- package/dist/1636.js +1 -1
- package/dist/1792.js +1 -1
- package/dist/2017.js +1 -1
- package/dist/2207.js +1 -1
- package/dist/2322.js +1 -1
- package/dist/2538.js +1 -1
- package/dist/2567.js +1 -1
- package/dist/263.js +1 -1
- package/dist/2719.js +1 -1
- package/dist/3064.js +1 -1
- package/dist/3077.js +1 -1
- package/dist/3238.js +1 -1
- package/dist/3395.js +1 -1
- package/dist/35.js +1 -1
- package/dist/3521.js +1 -1
- package/dist/356.js +1 -1
- package/dist/3714.js +1 -1
- package/dist/3735.js +1 -1
- package/dist/3766.js +1 -1
- package/dist/380.js +2 -0
- package/dist/{8057.js → 3906.js} +2 -2
- package/dist/3994.js +1 -1
- package/dist/4025.js +1 -1
- package/dist/4118.js +1 -1
- package/dist/4182.js +1 -1
- package/dist/4188.js +1 -1
- package/dist/4332.js +1 -1
- package/dist/4402.js +1 -1
- package/dist/4818.js +1 -1
- package/dist/4892.js +1 -1
- package/dist/4933.js +1 -1
- package/dist/4943.js +1 -1
- package/dist/5034.js +1 -1
- package/dist/5056.js +1 -1
- package/dist/5296.js +1 -1
- package/dist/5356.js +1 -1
- package/dist/5551.js +1 -1
- package/dist/5835.js +1 -1
- package/dist/5840.js +1 -1
- package/dist/5889.js +1 -1
- package/dist/5912.js +1 -1
- package/dist/6082.js +1 -1
- package/dist/6099.js +1 -1
- package/dist/6181.js +1 -1
- package/dist/619.js +1 -1
- package/dist/6671.js +1 -1
- package/dist/6775.js +1 -1
- package/dist/7274.js +1 -1
- package/dist/7795.js +1 -1
- package/dist/7802.js +1 -1
- package/dist/7860.js +1 -1
- package/dist/8092.js +1 -1
- package/dist/8111.js +1 -1
- package/dist/8146.js +1 -1
- package/dist/8427.js +1 -1
- package/dist/8495.js +1 -1
- package/dist/8672.js +1 -1
- package/dist/8737.js +1 -1
- package/dist/8786.js +1 -1
- package/dist/8796.js +1 -1
- package/dist/8977.js +1 -1
- package/dist/9333.js +1 -1
- package/dist/9389.js +1 -1
- package/dist/9561.js +1 -1
- package/dist/9599.js +1 -1
- package/dist/9612.js +1 -1
- package/dist/9890.js +1 -1
- package/dist/main.js +1 -1
- package/package.json +4 -4
- package/dist/9454.js +0 -2
- /package/dist/{6560.js.LICENSE.txt → 1596.js.LICENSE.txt} +0 -0
- /package/dist/{8057.js.LICENSE.txt → 380.js.LICENSE.txt} +0 -0
- /package/dist/{9454.js.LICENSE.txt → 3906.js.LICENSE.txt} +0 -0
package/dist/380.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 380.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[380],{9196:(t,e,o)=>{o.d(e,{I:()=>i});var n=o(1114);const i=({badgeText:t,label:e})=>{const o=t;let[i,...s]=e.split(o);return 0===s.length&&(t=o.toUpperCase(),[i,...s]=e.split(o)),0===s.length&&(t=o.toLowerCase(),[i,...s]=e.split(o)),(0,n.h)(n.F,null,i,s.length?(0,n.h)(n.F,null,(0,n.h)("u",null,t),s.join(o)):null)}},9830:(t,e,o)=>{o.d(e,{a:()=>l,b:()=>r,c:()=>a,v:()=>i});var n=o(4058);const i=(t,e)=>{(0,n.i)(t,"_accessKey",e)},s={hooks:{afterPatch:t=>{-1!==t&&0!==t&&(0,n.a)("Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},a=(t,e)=>{(0,n.k)(t,"_tabIndex",e,s)},r=(t,e)=>{(0,n.i)(t,"_shortKey",e)},l=(t,e)=>{if(t&&e)throw new Error("AccessKey and ShortKey are used. Only one is allowed.")}},1853:(t,e,o)=>{o.d(e,{a:()=>i,v:()=>a});var n=o(4058);const i=(t,e,o)=>{(0,n.w)(t,e,(t=>"string"==typeof t&&s.includes(t)),new Set(s),o,{defaultValue:"top"})},s=["left","right","top","bottom"],a=(t,e)=>{i(t,"_align",e)}},4511:(t,e,o)=>{o.d(e,{A:()=>s});var n=o(6448),i=o(4058);class s{constructor(t,e,o){var s,a,r,l;if(this.experimentalMode=(0,n.a)(),this.setFormAssociatedValue=t=>{var e;const o=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==o&&""!==o||(0,i.j)(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const n=this.tryToStringifyValue(t);this.syncValue(t,n,this.formAssociated),this.syncValue(t,n,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(o),this.type=e,this.experimentalMode&&("KOL-BUTTON"===(l=null===(s=this.host)||void 0===s?void 0:s.tagName)||"KOL-COMBOBOX"===l||"KOL-INPUT-CHECKBOX"===l||"KOL-INPUT-COLOR"===l||"KOL-INPUT-DATE"===l||"KOL-INPUT-EMAIL"===l||"KOL-INPUT-FILE"===l||"KOL-INPUT-NUMBER"===l||"KOL-INPUT-PASSWORD"===l||"KOL-INPUT-RADIO"===l||"KOL-INPUT-RANGE"===l||"KOL-INPUT-TEXT"===l||"KOL-SELECT"===l||"KOL-SINGLE-SELECT"===l||"KOL-TEXTAREA"===l)&&t._name){switch(null===(a=this.host)||void 0===a||a.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,o){if(this.experimentalMode)try{if("boolean"!=typeof(o="object"==typeof o&&null!==o?JSON.stringify(o):o)&&"number"!=typeof o&&"string"!=typeof o)throw new Error("Invalid value type: "+typeof o);null==e||e.setAttribute(t,`${o}`)}catch(o){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return(0,i.l)(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,o){if(o)switch(this.type){case"file":o.files=t;break;case"select":o.querySelectorAll("option").forEach((t=>{o.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),o.appendChild(t)}}));break;case"radio":"string"==typeof e&&(o.setAttribute("value",e),o.setAttribute("checked",""),o.value=e);break;default:"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value="")}}validateName(t){((t,e,o)=>{(0,i.i)(t,"_name",e,o)})(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,i.j)("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}},4932:(t,e,o)=>{o.d(e,{I:()=>u,g:()=>h});var n=o(6855),i=o(4511),s=o(4058),a=o(9830),r=o(28),l=o(1806),c=o(1085);const h=t=>{var e,o;const n=Boolean("error"===(null===(e=t._msg)||void 0===e?void 0:e._type)&&t._msg._description&&(null===(o=t._msg._description)||void 0===o?void 0:o.length)>0)&&!0===t._touched,i="string"==typeof t._hint&&t._hint.length>0,s=[];return!0===n&&s.push(`${t._id}-error`),!0===i&&s.push(`${t._id}-hint`),{hasError:n,hasHint:i,ariaDescribedBy:s}};class d extends i.A{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){(0,s.b)(this.component,"_alert",t)}validateTouched(t){((t,e)=>{(0,s.b)(t,"_touched",e)})(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class u extends d{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this)},this.component=t}validateAccessKey(t){(0,a.v)(this.component,t),(0,a.a)(t,this.component._shortKey)}validateAdjustHeight(t){((t,e)=>{(0,s.b)(t,"_adjustHeight",e)})(this.component,t)}validateDisabled(t){(0,s.b)(this.component,"_disabled",t),!0===t&&(0,s.c)()}validateTooltipAlign(t){(0,r.v)(this.component,t)}validateError(t){const e={_description:t||"",_type:"error"};this.validateMsg(e)}validateHideError(t){((t,e,o)=>{(0,s.b)(t,"_hideError",e,o)})(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&(0,s.a)("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){(0,l.v)(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&(0,s.a)("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){(0,s.i)(this.component,"_hint",t)}validateId(t){(0,s.i)(this.component,"_id",t,{minLength:1}),""!==t&&void 0!==t||(0,s.j)("A unique ID on the input fields is not strictly required, but it might be relevant for E2E tests.")}validateLabel(t){(0,c.a)(this.component,t,{required:!0})}validateMsg(t){((t,e)=>{(0,s.o)(e,(()=>{try{e=(0,s.p)(e)}catch(t){}(0,s.w)(t,"_msg",(t=>"object"==typeof t),new Set(["Object"]),e)}))})(this.component,t)}validateOn(t){"object"==typeof t&&(0,s.s)(this.component,"_on",t)}validateShortKey(t){(0,a.b)(this.component,t),(0,a.a)(this.component._accessKey,t)}validateSmartButton(t){(0,s.o)(t,(()=>{try{t=(0,s.p)(t)}catch(t){}(0,s.s)(this.component,"_smartButton",t)}))}validateTabIndex(t){(0,a.c)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateMsg(this.component._msg),this.validateDisabled(this.component._disabled),this.validateHideError(this.component._hideError),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateShortKey(this.component._shortKey),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex),(0,a.a)(this.component._accessKey,this.component._shortKey)}onBlur(t){var e;this.component._touched=!0,(0,n.s)(t),(0,n.t)("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t,e){var o;e=null!=e?e:t.target.value,(0,n.t)("change",this.host,e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e),this.valueChangeListeners.forEach((t=>t(e)))}onInput(t,e=!0,o){var i;o=null!=o?o:t.target.value,(0,n.s)(t),(0,n.t)("input",this.host,o),e&&this.setFormAssociatedValue(o),"function"==typeof(null===(i=this.component._on)||void 0===i?void 0:i.onInput)&&this.component._on.onInput(t,o)}onClick(t){var e;(0,n.s)(t),(0,n.t)("click",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;(0,n.s)(t),(0,n.t)("focus",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}},6762:(t,e,o)=>{o.d(e,{i:()=>r,n:()=>c,r:()=>l});var n=o(1114),i=o(1523),s=o(6448);const a=()=>{let t=(0,s.d)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,s.d)(),"KoliBri",{value:t,writable:!1})),t},r=()=>{(()=>{const t=(0,s.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,s.s)(e.includes("dev-mode=true")),(0,s.b)(e.includes("experimental-mode=true")),(0,s.c)(e.includes("color-contrast-analysis=true")))}})(),s.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${n.E.kolibriVersion}\n\t`,{forceLog:!0})},l=()=>{!0!==a().adviceShown&&(Object.defineProperty(a(),"adviceShown",{get:function(){return!0}}),s.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let c=()=>Math.floor(16777215*Math.random()).toString(16);"test"===i.p&&(c=()=>"nonce")},6855:(t,e,o)=>{function n(t){t.stopImmediatePropagation(),t.stopPropagation()}function i(t,e,o){e&&function(t,e,o){const n=t.dispatchEvent(function(t,e){return new CustomEvent(`kol-${t}`,{bubbles:!0,cancelable:!0,composed:!0,detail:e})}(e,o))}(e,t,o)}function s(t){t.preventDefault(),n(t)}o.d(e,{p:()=>s,s:()=>n,t:()=>i})},1806:(t,e,o)=>{o.d(e,{v:()=>i});var n=o(4058);const i=(t,e,o={})=>{(0,n.b)(t,"_hideLabel",e,o)}},1085:(t,e,o)=>{o.d(e,{a:()=>d,b:()=>r,c:()=>l,h:()=>i,v:()=>h});var n=o(4058);const i=[0,1,2,3,4,5,6],s=/[a-zA-Z0-9äöüÄÖÜß]/g,a=/^\d+$/;function r(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(s))||void 0===e?void 0:e.length)||0}(t)>=e}function l(t){return a.test(t)}const c=new Set(["string"]),h=(t,e,o={})=>{(0,n.w)(t,"_label",(t=>"string"==typeof t),c,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,o,i,s)=>{var a,c;"function"==typeof(null===(a=t.hooks)||void 0===a?void 0:a.afterPatch)&&(null===(c=t.hooks)||void 0===c||c.afterPatch(e,o,i,s)),"string"==typeof e&&!1===r(e,3)&&!1===l(e)&&(0,n.a)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(o))},d=h},1523:(t,e,o)=>{o.d(e,{b:()=>a,h:()=>i,p:()=>n,s:()=>s});let n="development";try{n="production"}catch(t){n="production"}const i=(t,e,o)=>{if(t&&e&&"string"==typeof o){const n=t.querySelector(`[slot="${o}"]`);n&&e.appendChild(n)}},s=t=>""===t,a=(t,e)=>t||e||""},28:(t,e,o)=>{o.d(e,{v:()=>i});var n=o(1853);const i=(t,e)=>{(0,n.a)(t,"_tooltipAlign",e)}}}]);
|
package/dist/{8057.js → 3906.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[
|
|
1
|
+
/*! For license information please see 3906.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[3906],{6762:(e,t,i)=>{i.d(t,{i:()=>s,n:()=>c,r:()=>a});var o=i(1114),n=i(1523),r=i(6448);const l=()=>{let e=(0,r.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,r.d)(),"KoliBri",{value:e,writable:!1})),e},s=()=>{(()=>{const e=(0,r.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&((0,r.s)(t.includes("dev-mode=true")),(0,r.b)(t.includes("experimental-mode=true")),(0,r.c)(t.includes("color-contrast-analysis=true")))}})(),r.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${o.E.kolibriVersion}\n\t`,{forceLog:!0})},a=()=>{!0!==l().adviceShown&&(Object.defineProperty(l(),"adviceShown",{get:function(){return!0}}),r.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let c=()=>Math.floor(16777215*Math.random()).toString(16);"test"===n.p&&(c=()=>"nonce")},3906:(e,t,i)=>{i.r(t),i.d(t,{initialize:()=>a});var o=i(6762),n=i(6448),r=i(4058);function l(e,t){try{Object.defineProperty((()=>{let e=(0,n.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,n.d)(),"KoliBri",{value:e,writable:!1})),e})(),e,{get:function(){return t}})}catch(t){n.L.debug(`KoliBri property ${e} is already bind.`)}}const s=(e,t)=>n.L.debug(`${e} ${t?"":"not "}activated`),a=()=>{if((0,o.i)(),(0,n.e)()){(0,o.r)(),l("a11yColorContrast",r.z),l("querySelector",r.v),l("querySelectorAll",r.A),l("querySelectorColors",r.B),l("utils",(function(){return r.C})),l("parseJson",r.p),l("stringifyJson",r.D);const e=(0,n.g)().body,t=(0,n.g)().createElement("svg");if(t.setAttribute("aria-label","KoliBri-DevTools"),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("role","toolbar"),t.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),t.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',(0,n.g)().body.appendChild(t),s("Development mode",(0,n.e)()),s("Experimental mode",(0,n.a)()),s("Color contrast analysis",(0,n.f)()),(0,n.f)()){const t=setTimeout((()=>{clearTimeout(t),setInterval((()=>{r.C.queryHtmlElementColors((0,n.g)().createElement("div"),(0,r.z)(e),!1,!1)}),1e4)}),2500)}}}},1523:(e,t,i)=>{i.d(t,{b:()=>l,h:()=>n,p:()=>o,s:()=>r});let o="development";try{o="production"}catch(e){o="production"}const n=(e,t,i)=>{if(e&&t&&"string"==typeof i){const o=e.querySelector(`[slot="${i}"]`);o&&t.appendChild(o)}},r=e=>""===e,l=(e,t)=>e||t||""}}]);
|
package/dist/3994.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 3994.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[3994],{2486:(n,e,t)=>{t.d(e,{K:()=>h});var o=t(3133),i=t(1405),r=t(4600),a=t(1100),l=t(7883),s=t(7579),c=t(6448);const d=({ariaLabel:n,icon:e})=>(0,i.h)(l.d,{class:"heading-icon",_label:n,_icons:e}),p=({type:n,label:e})=>{switch(n){case"error":return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-error"),icon:"codicon codicon-error",label:e});case"info":return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-info"),icon:"codicon codicon-info",label:e});case"warning":return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-warning"),icon:"codicon codicon-warning",label:e});case"success":return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-success"),icon:"codicon codicon-pass",label:e});default:return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-message"),icon:"codicon codicon-comment",label:e})}},h=(n,e)=>{const{class:t={},type:d="default",variant:h="msg",label:u,hasCloser:f,alert:b,onAlertTimeout:m,onCloserClick:y,level:v}=n,g=(0,o._)(n,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);if(b){try{c.L.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(n){c.L.debug("Navigator does not support vibration.")}setTimeout((()=>{null==m||m()}),1e4)}const k=Object.assign({class:(0,r.c)("kol-alert-wc","alert",d,h,{hasCloser:!!f},t),role:b?"alert":void 0},g);return(0,i.h)("div",Object.assign({},k),(0,i.h)("div",{class:"heading"},(0,i.h)(p,{label:u,type:d}),(0,i.h)("div",{class:"heading-content"},u?(0,i.h)(s.K,{level:v},u):null,"msg"===h&&(0,i.h)("div",{class:"content"},e)),f&&(0,i.h)(l.a,{class:"close",_ariaDescription:(null==u?void 0:u.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:(0,a.t)("kol-close-alert"),_on:{onClick:y},_tooltipAlign:"left"})),"card"===h&&(0,i.h)("div",{class:"content"},e))}},7579:(n,e,t)=>{t.d(e,{K:()=>d});var o=t(3133),i=t(1405),r=t(4600);const a=1;function l(n){return function(n){return n>=a&&n<=6}(n)?`h${n}`:"strong"}const s=(n,e)=>{var{class:t,level:s=a,variant:c}=n,d=(0,o._)(n,["class","level","variant"]);const p=l(s),h=c||p;return(0,i.h)(p,Object.assign({class:(0,r.c)("headline",`headline-${h}`,t)},d),e)},c=(n,e)=>{var{class:t,level:s=a}=n,c=(0,o._)(n,["class","level"]);const d=function(n){return 1===n?"span":l(n)}(s+1);return(0,i.h)(d,Object.assign({class:(0,r.c)("secondary-headline",t)},c),e)},d=(n,e)=>{var{secondaryHeadline:t,level:l=a,class:d,HeadingGroupProps:p={},SecondaryHeadlineProps:h={}}=n,u=(0,o._)(n,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const f="kol-heading-wc",b=Object.assign({level:l},u);if(!t)return(0,i.h)(s,Object.assign({class:(0,r.c)(f,d)},b),e);const{class:m}=p,y=(0,o._)(p,["class"]),v=Object.assign({class:(0,r.c)(f,m)},y);return(0,i.h)("hgroup",Object.assign({},v),(0,i.h)(s,Object.assign({class:d},b),e),(0,i.h)(c,Object.assign({level:l},h),t))}},4600:(n,e,t)=>{function o(n){var e,t,i="";if("string"==typeof n||"number"==typeof n)i+=n;else if("object"==typeof n)if(Array.isArray(n)){var r=n.length;for(e=0;e<r;e++)n[e]&&(t=o(n[e]))&&(i&&(i+=" "),i+=t)}else for(t in n)n[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var n,e,t=0,i="",r=arguments.length;t<r;t++)(n=arguments[t])&&(e=o(n))&&(i&&(i+=" "),i+=e);return i}t.d(e,{c:()=>i})},1100:(n,e,t)=>{t.d(e,{t:()=>r});var o=t(8457),i=t(1523);let r=(n,e)=>{var t;return(null!==(t=(0,o.g)())&&void 0!==t?t:(0,o.i)("de")).translate(n,e)};"test"===i.p&&(r=n=>n)},3994:(n,e,t)=>{t.r(e),t.d(e,{kol_form:()=>s});var o=t(1405),i=t(1100),r=t(7883),a=t(2486),l=t(4058);const s=class{constructor(n){(0,o.r)(this,n),this.onSubmit=n=>{var e,t;n.preventDefault(),n.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onSubmit)&&(null===(t=this.state._on)||void 0===t||t.onSubmit(n))},this.onReset=n=>{var e,t;n.preventDefault(),n.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onReset)&&(null===(t=this.state._on)||void 0===t||t.onReset(n))},this.handleLinkClick=n=>{var e;const t=null===(e=n.target)||void 0===e?void 0:e.href;if(t){const n=new URL(t),e=document.querySelector(n.hash);e&&"function"==typeof e.focus&&(e.scrollIntoView({behavior:"smooth"}),e.focus())}},this._on=void 0,this._requiredText=!0,this._errorList=void 0,this.state={}}renderErrorList(n){return(0,o.h)(a.K,{type:"error",variant:"card",label:(0,i.t)("kol-error-list-message")},(0,o.h)("nav",{"aria-label":(0,i.t)("kol-error-list")},(0,o.h)("ul",null,null==n?void 0:n.map(((n,e)=>(0,o.h)("li",{key:e},(0,o.h)(r.g,{_href:n.selector,_label:n.message,_on:{onClick:this.handleLinkClick},ref:n=>{0===e&&(this.errorListElement=n)}})))))))}renderFormElement(){return(0,o.h)("form",{method:"post",onSubmit:this.onSubmit,onReset:this.onReset,autoComplete:"off",noValidate:!0},!0===this.state._requiredText?(0,o.h)("p",null,(0,o.h)("div",{class:"mandatory-fields-hint"},(0,i.t)("kol-form-description"))):"string"==typeof this.state._requiredText&&this.state._requiredText.length>0?(0,o.h)("p",null,(0,o.h)("div",{class:"mandatory-fields-hint"},this.state._requiredText)):null,(0,o.h)("slot",null))}render(){const n=Array.isArray(this._errorList)&&this._errorList.length>0;return(0,o.h)(o.H,{key:"287a0d74e3d7d647ce3016cdab697fe4fe7e89fd",class:"kol-form"},n&&this.renderErrorList(this._errorList),this.renderFormElement())}focusErrorList(){return n=this,e=function*(){var n;return this._errorList&&this._errorList.length>0&&(null===(n=this.errorListElement)||void 0===n||n.focus()),Promise.resolve()},new Promise(((t,o)=>{var i=n=>{try{a(e.next(n))}catch(n){o(n)}},r=n=>{try{a(e.throw(n))}catch(n){o(n)}},a=n=>n.done?t(n.value):Promise.resolve(n.value).then(i,r);a((e=e.apply(n,null)).next())}));var n,e}validateOn(n){"object"==typeof n&&null!==n&&(this.state=Object.assign(Object.assign({},this.state),{_on:n}))}validateRequiredText(n){"boolean"==typeof n?(0,l.b)(this,"_requiredText",n):(0,l.i)(this,"_requiredText",n)}validateErrorList(n){((n,e)=>{(0,l.w)(n,"errorList",(n=>"object"==typeof n),new Set(["Object"]),e)})(this,n)}componentWillLoad(){this.validateOn(this._on),this.validateRequiredText(this._requiredText),this.validateErrorList(this._errorList)}static get watchers(){return{_on:["validateOn"],_requiredText:["validateRequiredText"],_errorList:["validateErrorList"]}}};s.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n .input {\n background-color: white;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :is(a, button) {\n align-items: baseline;\n display: inline-flex;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n :is(a, button) .kol-span-wc .span-label {\n text-decoration-line: underline;\n }\n a:is(:focus, :hover):not([aria-disabled]) .kol-span-wc .span-label,\n button:is(:focus, :hover):not([disabled]) .kol-span-wc .span-label {\n text-decoration-thickness: 0.2em;\n }\n .skip {\n left: calc(-99999rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n z-index: 9999999;\n line-height: 1;\n }\n .skip:focus {\n background-color: #fff;\n left: unset;\n padding: 1em;\n position: unset;\n }\n .kol-icon.external-link-icon {\n display: inline-flex;\n margin-left: calc(8rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}"}},1523:(n,e,t)=>{t.d(e,{b:()=>a,h:()=>i,p:()=>o,s:()=>r});let o="development";try{o="production"}catch(n){o="production"}const i=(n,e,t)=>{if(n&&e&&"string"==typeof t){const o=n.querySelector(`[slot="${t}"]`);o&&e.appendChild(o)}},r=n=>""===n,a=(n,e)=>n||e||""},3133:(n,e,t)=>{function o(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(n);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(n,o[i])&&(t[o[i]]=n[o[i]])}return t}t.d(e,{_:()=>o}),"function"==typeof SuppressedError&&SuppressedError}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[3994],{4913:(n,e,t)=>{t.d(e,{K:()=>h});var o=t(3133),i=t(1114),r=t(4600),a=t(1100),l=t(7883),s=t(9028),c=t(6448);const d=({ariaLabel:n,icon:e})=>(0,i.h)(l.d,{class:"heading-icon",_label:n,_icons:e}),p=({type:n,label:e})=>{switch(n){case"error":return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-error"),icon:"codicon codicon-error",label:e});case"info":return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-info"),icon:"codicon codicon-info",label:e});case"warning":return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-warning"),icon:"codicon codicon-warning",label:e});case"success":return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-success"),icon:"codicon codicon-pass",label:e});default:return(0,i.h)(d,{ariaLabel:(0,a.t)("kol-message"),icon:"codicon codicon-comment",label:e})}},h=(n,e)=>{const{class:t={},type:d="default",variant:h="msg",label:u,hasCloser:f,alert:b,onAlertTimeout:m,onCloserClick:y,level:v}=n,g=(0,o._)(n,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);if(b){try{c.L.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(n){c.L.debug("Navigator does not support vibration.")}setTimeout((()=>{null==m||m()}),1e4)}const k=Object.assign({class:(0,r.c)("kol-alert-wc","alert",d,h,{hasCloser:!!f},t),role:b?"alert":void 0},g);return(0,i.h)("div",Object.assign({},k),(0,i.h)("div",{class:"heading"},(0,i.h)(p,{label:u,type:d}),(0,i.h)("div",{class:"heading-content"},u?(0,i.h)(s.K,{level:v},u):null,"msg"===h&&(0,i.h)("div",{class:"content"},e)),f&&(0,i.h)(l.a,{class:"close",_ariaDescription:(null==u?void 0:u.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:(0,a.t)("kol-close-alert"),_on:{onClick:y},_tooltipAlign:"left"})),"card"===h&&(0,i.h)("div",{class:"content"},e))}},9028:(n,e,t)=>{t.d(e,{K:()=>d});var o=t(3133),i=t(1114),r=t(4600);const a=1;function l(n){return function(n){return n>=a&&n<=6}(n)?`h${n}`:"strong"}const s=(n,e)=>{var{class:t,level:s=a,variant:c}=n,d=(0,o._)(n,["class","level","variant"]);const p=l(s),h=c||p;return(0,i.h)(p,Object.assign({class:(0,r.c)("headline",`headline-${h}`,t)},d),e)},c=(n,e)=>{var{class:t,level:s=a}=n,c=(0,o._)(n,["class","level"]);const d=function(n){return 1===n?"span":l(n)}(s+1);return(0,i.h)(d,Object.assign({class:(0,r.c)("secondary-headline",t)},c),e)},d=(n,e)=>{var{secondaryHeadline:t,level:l=a,class:d,HeadingGroupProps:p={},SecondaryHeadlineProps:h={}}=n,u=(0,o._)(n,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const f="kol-heading-wc",b=Object.assign({level:l},u);if(!t)return(0,i.h)(s,Object.assign({class:(0,r.c)(f,d)},b),e);const{class:m}=p,y=(0,o._)(p,["class"]),v=Object.assign({class:(0,r.c)(f,m)},y);return(0,i.h)("hgroup",Object.assign({},v),(0,i.h)(s,Object.assign({class:d},b),e),(0,i.h)(c,Object.assign({level:l},h),t))}},4600:(n,e,t)=>{function o(n){var e,t,i="";if("string"==typeof n||"number"==typeof n)i+=n;else if("object"==typeof n)if(Array.isArray(n)){var r=n.length;for(e=0;e<r;e++)n[e]&&(t=o(n[e]))&&(i&&(i+=" "),i+=t)}else for(t in n)n[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var n,e,t=0,i="",r=arguments.length;t<r;t++)(n=arguments[t])&&(e=o(n))&&(i&&(i+=" "),i+=e);return i}t.d(e,{c:()=>i})},1100:(n,e,t)=>{t.d(e,{t:()=>r});var o=t(8457),i=t(1523);let r=(n,e)=>{var t;return(null!==(t=(0,o.g)())&&void 0!==t?t:(0,o.i)("de")).translate(n,e)};"test"===i.p&&(r=n=>n)},3994:(n,e,t)=>{t.r(e),t.d(e,{kol_form:()=>s});var o=t(1114),i=t(1100),r=t(7883),a=t(4913),l=t(4058);const s=class{constructor(n){(0,o.r)(this,n),this.onSubmit=n=>{var e,t;n.preventDefault(),n.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onSubmit)&&(null===(t=this.state._on)||void 0===t||t.onSubmit(n))},this.onReset=n=>{var e,t;n.preventDefault(),n.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onReset)&&(null===(t=this.state._on)||void 0===t||t.onReset(n))},this.handleLinkClick=n=>{var e;const t=null===(e=n.target)||void 0===e?void 0:e.href;if(t){const n=new URL(t),e=document.querySelector(n.hash);e&&"function"==typeof e.focus&&(e.scrollIntoView({behavior:"smooth"}),e.focus())}},this._on=void 0,this._requiredText=!0,this._errorList=void 0,this.state={}}renderErrorList(n){return(0,o.h)(a.K,{type:"error",variant:"card",label:(0,i.t)("kol-error-list-message")},(0,o.h)("nav",{"aria-label":(0,i.t)("kol-error-list")},(0,o.h)("ul",null,null==n?void 0:n.map(((n,e)=>(0,o.h)("li",{key:e},(0,o.h)(r.g,{_href:n.selector,_label:n.message,_on:{onClick:this.handleLinkClick},ref:n=>{0===e&&(this.errorListElement=n)}})))))))}renderFormElement(){return(0,o.h)("form",{method:"post",onSubmit:this.onSubmit,onReset:this.onReset,autoComplete:"off",noValidate:!0},!0===this.state._requiredText?(0,o.h)("p",null,(0,o.h)("div",{class:"mandatory-fields-hint"},(0,i.t)("kol-form-description"))):"string"==typeof this.state._requiredText&&this.state._requiredText.length>0?(0,o.h)("p",null,(0,o.h)("div",{class:"mandatory-fields-hint"},this.state._requiredText)):null,(0,o.h)("slot",null))}render(){const n=Array.isArray(this._errorList)&&this._errorList.length>0;return(0,o.h)(o.H,{key:"287a0d74e3d7d647ce3016cdab697fe4fe7e89fd",class:"kol-form"},n&&this.renderErrorList(this._errorList),this.renderFormElement())}focusErrorList(){return n=this,e=function*(){var n;return this._errorList&&this._errorList.length>0&&(null===(n=this.errorListElement)||void 0===n||n.focus()),Promise.resolve()},new Promise(((t,o)=>{var i=n=>{try{a(e.next(n))}catch(n){o(n)}},r=n=>{try{a(e.throw(n))}catch(n){o(n)}},a=n=>n.done?t(n.value):Promise.resolve(n.value).then(i,r);a((e=e.apply(n,null)).next())}));var n,e}validateOn(n){"object"==typeof n&&null!==n&&(this.state=Object.assign(Object.assign({},this.state),{_on:n}))}validateRequiredText(n){"boolean"==typeof n?(0,l.b)(this,"_requiredText",n):(0,l.i)(this,"_requiredText",n)}validateErrorList(n){((n,e)=>{(0,l.w)(n,"errorList",(n=>"object"==typeof n),new Set(["Object"]),e)})(this,n)}componentWillLoad(){this.validateOn(this._on),this.validateRequiredText(this._requiredText),this.validateErrorList(this._errorList)}static get watchers(){return{_on:["validateOn"],_requiredText:["validateRequiredText"],_errorList:["validateErrorList"]}}};s.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n .input {\n background-color: white;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :is(a, button) {\n align-items: baseline;\n display: inline-flex;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n :is(a, button) .kol-span-wc .span-label {\n text-decoration-line: underline;\n }\n a:is(:focus, :hover):not([aria-disabled]) .kol-span-wc .span-label,\n button:is(:focus, :hover):not([disabled]) .kol-span-wc .span-label {\n text-decoration-thickness: 0.2em;\n }\n .skip {\n left: calc(-99999rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n z-index: 9999999;\n line-height: 1;\n }\n .skip:focus {\n background-color: #fff;\n left: unset;\n padding: 1em;\n position: unset;\n }\n .kol-icon.external-link-icon {\n display: inline-flex;\n margin-left: calc(8rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}"}},1523:(n,e,t)=>{t.d(e,{b:()=>a,h:()=>i,p:()=>o,s:()=>r});let o="development";try{o="production"}catch(n){o="production"}const i=(n,e,t)=>{if(n&&e&&"string"==typeof t){const o=n.querySelector(`[slot="${t}"]`);o&&e.appendChild(o)}},r=n=>""===n,a=(n,e)=>n||e||""},3133:(n,e,t)=>{function o(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(n);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(n,o[i])&&(t[o[i]]=n[o[i]])}return t}t.d(e,{_:()=>o}),"function"==typeof SuppressedError&&SuppressedError}}]);
|
package/dist/4025.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4025.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4025],{1853:(n,e,t)=>{t.d(e,{a:()=>o,v:()=>l});var i=t(4058);const o=(n,e,t)=>{(0,i.w)(n,e,(n=>"string"==typeof n&&a.includes(n)),new Set(a),t,{defaultValue:"top"})},a=["left","right","top","bottom"],l=(n,e)=>{o(n,"_align",e)}},4025:(n,e,t)=>{t.r(e),t.d(e,{kol_drawer:()=>d});var i=t(
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4025],{1853:(n,e,t)=>{t.d(e,{a:()=>o,v:()=>l});var i=t(4058);const o=(n,e,t)=>{(0,i.w)(n,e,(n=>"string"==typeof n&&a.includes(n)),new Set(a),t,{defaultValue:"top"})},a=["left","right","top","bottom"],l=(n,e)=>{o(n,"_align",e)}},4025:(n,e,t)=>{t.r(e),t.d(e,{kol_drawer:()=>d});var i=t(1114),o=t(1853),a=t(4058),l=t(1085),s=t(7744),r=(n,e,t)=>new Promise(((i,o)=>{var a=n=>{try{s(t.next(n))}catch(n){o(n)}},l=n=>{try{s(t.throw(n))}catch(n){o(n)}},s=n=>n.done?i(n.value):Promise.resolve(n.value).then(a,l);s((t=t.apply(n,e)).next())}));const d=class{constructor(n){(0,i.r)(this,n),this.getWrapperRef=n=>this.dialogWrapperElement=n,this.getRef=n=>this.dialogElement=n,this._open=void 0,this._align=void 0,this._label=void 0,this._modal=void 0,this._on=void 0,this.state={_label:"",_open:!1,_align:"left"}}open(){return r(this,null,(function*(){var n,e;this.state=Object.assign(Object.assign({},this.state),{_open:!0}),this.state._modal?null===(n=this.dialogElement)||void 0===n||n.showModal():null===(e=this.dialogElement)||void 0===e||e.show()}))}close(){return r(this,null,(function*(){this.state=Object.assign(Object.assign({},this.state),{_open:!1});const n=this.dialogWrapperElement;n&&"none"===window.getComputedStyle(n).animationName&&this.handleCloseDialog()}))}renderDialogContent(){const n=this.state._align;return(0,i.h)("div",{ref:this.getWrapperRef,class:`drawer__wrapper drawer__wrapper--${n} ${this.state._open?"drawer__wrapper--open":"is-closing"}`,"aria-label":this.state._label},(0,i.h)("div",{class:"drawer__content"},(0,i.h)("slot",null)))}render(){const n=this.state._modal;return(0,i.h)(i.H,{key:"0d09864696d1d178fbf93db7e5198147610afd1f",class:"kol-drawer drawer "+(n?"drawer--modal":""),ref:n=>this.hostElement=n},(0,i.h)("dialog",{key:"ed6d121734ab4f5a6ec5b8d7c8090509c7a94d80",class:"drawer__dialog",ref:this.getRef},this.renderDialogContent()))}validateLabel(n){(0,l.v)(this,n,{required:!0})}validateAlign(n){(0,o.v)(this,n)}validateModal(n){((n,e)=>{(0,a.b)(n,"_modal",e)})(this,n)}validateOpen(n){return r(this,null,(function*(){"boolean"==typeof n&&((0,s.v)(this,n),n?yield this.open():yield this.close())}))}validateOn(n){if("object"==typeof n&&null!==n){const e={};"function"==typeof n.onClose&&(e.onClose=n.onClose),(0,a.s)(this,"_on",e)}}handleCloseDialog(){var n,e,t;null===(n=this.dialogElement)||void 0===n||n.close(),null===(t=null===(e=this._on)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e)}handleClose(){}handleAnimationEnd(n){n.animationName.includes("slideOut")&&this.handleCloseDialog()}componentDidLoad(){var n,e;null===(n=this.dialogElement)||void 0===n||n.addEventListener("animationend",this.handleAnimationEnd.bind(this)),null===(e=this.dialogElement)||void 0===e||e.addEventListener("close",this.handleClose.bind(this))}disconnectedCallback(){var n,e;null===(n=this.dialogElement)||void 0===n||n.removeEventListener("animationend",this.handleAnimationEnd.bind(this)),null===(e=this.dialogElement)||void 0===e||e.removeEventListener("close",this.handleClose.bind(this))}componentWillLoad(){return r(this,null,(function*(){this.validateLabel(this._label),yield this.validateOpen(this._open),this.validateAlign(this._align),this.validateModal(this._modal),this.validateOn(this._on)}))}static get watchers(){return{_label:["validateLabel"],_align:["validateAlign"],_modal:["validateModal"],_open:["validateOpen"],_on:["validateOn"]}}};d.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .drawer__dialog {\n padding: 0;\n border: none;\n }\n .drawer__wrapper {\n position: fixed;\n width: auto;\n overflow: auto;\n background-color: white;\n }\n .drawer__wrapper--left {\n top: 0;\n left: 0;\n height: 100vh;\n max-height: 100%;\n }\n .drawer__wrapper--right {\n top: 0;\n right: 0;\n height: 100vh;\n max-height: 100%;\n }\n .drawer__wrapper--top {\n left: 0;\n top: 0;\n width: 100vw;\n max-width: 100%;\n }\n .drawer__wrapper--bottom {\n left: 0;\n bottom: 0;\n width: 100vw;\n max-width: 100%;\n }\n .drawer__content {\n position: relative;\n padding: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}"}},1085:(n,e,t)=>{t.d(e,{a:()=>c,b:()=>s,c:()=>r,h:()=>o,v:()=>h});var i=t(4058);const o=[0,1,2,3,4,5,6],a=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function s(n,e=1){return function(n){var e;return"string"==typeof n&&(null===(e=n.match(a))||void 0===e?void 0:e.length)||0}(n)>=e}function r(n){return l.test(n)}const d=new Set(["string"]),h=(n,e,t={})=>{(0,i.w)(n,"_label",(n=>"string"==typeof n),d,e,function(n){var e;return Object.assign(Object.assign({},n),{hooks:{afterPatch:(e,t,o,a)=>{var l,d;"function"==typeof(null===(l=n.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(d=n.hooks)||void 0===d||d.afterPatch(e,t,o,a)),"string"==typeof e&&!1===s(e,3)&&!1===r(e)&&(0,i.a)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=n.hooks)||void 0===e?void 0:e.beforePatch}})}(t))},c=h},7744:(n,e,t)=>{t.d(e,{v:()=>o});var i=t(4058);const o=(n,e,t)=>{(0,i.b)(n,"_open",e,t)}}}]);
|
package/dist/4118.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4118.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4118],{3260:(e,t,o)=>{o.d(t,{S:()=>l,a:()=>i,b:()=>n,i:()=>a});const n=e=>"object"==typeof e&&null!==e,a=(e,t=0)=>"string"==typeof e&&e.length>=t,i=e=>{if("object"!=typeof e||null===e)return a(e,1);for(const t in e)if(!1===a(t,1))return!1;return!0},l=new Event("StateChange")},2385:(e,t,o)=>{o.d(t,{i:()=>s,n:()=>c,r:()=>r});var n=o(1405),a=o(1523),i=o(6448);const l=()=>{let e=(0,i.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,i.d)(),"KoliBri",{value:e,writable:!1})),e},s=()=>{(()=>{const e=(0,i.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&((0,i.s)(t.includes("dev-mode=true")),(0,i.b)(t.includes("experimental-mode=true")),(0,i.c)(t.includes("color-contrast-analysis=true")))}})(),i.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${n.E.kolibriVersion}\n\t`,{forceLog:!0})},r=()=>{!0!==l().adviceShown&&(Object.defineProperty(l(),"adviceShown",{get:function(){return!0}}),i.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let c=()=>Math.floor(16777215*Math.random()).toString(16);"test"===a.p&&(c=()=>"nonce")},6855:(e,t,o)=>{function n(e){e.stopImmediatePropagation(),e.stopPropagation()}function a(e,t,o){t&&function(e,t,o){const n=e.dispatchEvent(function(e,t){return new CustomEvent(`kol-${e}`,{bubbles:!0,cancelable:!0,composed:!0,detail:t})}(t,o))}(t,e,o)}function i(e){e.preventDefault(),n(e)}o.d(t,{p:()=>i,s:()=>n,t:()=>a})},1988:(e,t,o)=>{o.d(t,{E:()=>h,a:()=>r,b:()=>c,c:()=>l,d:()=>i,v:()=>s});var n=o(4058),a=o(3260);const i=(e,t)=>{(0,n.w)(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),t)},l=(e,t)=>{(0,n.w)(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),t)},s=(e,t,o)=>{(0,n.t)(t,(()=>{(0,n.o)(t,(()=>{void 0===t&&(t=[]);try{t=(0,n.p)(t)}catch(e){}Array.isArray(t)&&t.every((e=>"object"==typeof e&&null!==e))&&(0,n.s)(e,"_data",t,o)}))}))},r=(e,t,o)=>{(0,n.t)(t,(()=>{(0,n.o)(t,(()=>{void 0===t&&(t=[]);try{t=(0,n.p)(t)}catch(e){}Array.isArray(t)&&t.every((e=>"object"==typeof e&&null!==e))&&(0,n.s)(e,"_dataFoot",t,o)}))}))},c=(e,t)=>{var o;(o="string"==typeof t?(()=>{try{return(0,n.p)(t)}catch(e){return}})():t)&&(0,a.b)(o)&&"function"==typeof o.label&&(!o.selectedKeys||Array.isArray(o.selectedKeys))&&(0,n.s)(e,"_selection",t)};var h,d;(d=h||(h={})).onBlur="onBlur",d.onChange="onChange",d.onClick="onClick",d.onDblClick="onDblClick",d.onFocus="onFocus",d.onInput="onInput",d.onKeyDown="onKeyDown",d.onKeyPress="onKeyPress",d.onKeyUp="onKeyUp",d.onMouseDown="onMouseDown",d.onMouseMove="onMouseMove",d.onMouseOut="onMouseOut",d.onMouseOver="onMouseOver",d.onMouseUp="onMouseUp",d.onReset="onReset",d.onSelect="onSelect",d.onSort="onSort",d.onSelectionChange="onSelectionChange",d.onSubmit="onSubmit",d.onToggle="onToggle",d.onClose="onClose"},1100:(e,t,o)=>{o.d(t,{t:()=>i});var n=o(8457),a=o(1523);let i=(e,t)=>{var o;return(null!==(o=(0,n.g)())&&void 0!==o?o:(0,n.i)("de")).translate(e,t)};"test"===a.p&&(i=e=>e)},4118:(e,t,o)=>{o.r(t),o.d(t,{kol_table_stateless_wc:()=>d});var n=o(1405),a=o(7883),i=o(1100),l=o(6855),s=o(2385),r=o(4058),c=o(1988),h=o(1085);const d=class{constructor(e){(0,n.r)(this,e),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.renderTableRow=(e,t,o)=>{var a,i;let l=String(t);return this.horizontal&&(null===(a=e[0])||void 0===a?void 0:a.data)&&(l=null!==(i=this.getDataKey(e[0].data))&&void 0!==i?i:l),(0,n.h)("tr",{key:`row-${l}`},this.renderSelectionCell(e,t),e.map(((e,n)=>this.renderTableCell(e,t,n,o))))},this.renderTableCell=(e,t,o,a)=>{let i=`${t}-${o}-${e.label}`;if(e.data){const n=this.getDataKey(e.data);i=n?`${n}-${this.horizontal?o:t}`:i}return!1===e.asTd?this.renderHeadingCell(e,t,o,a):(0,n.h)("td",{key:`cell-${i}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:"")},this.state={_data:[],_label:"",_headerCells:{horizontal:[],vertical:[]}},this.tableDivElementHasScrollbar=!1,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}validateData(e){(0,c.v)(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){(0,c.a)(this,e)}validateHeaderCells(e){((e,t)=>{(0,r.t)(t,(()=>{(0,r.o)(t,(()=>{try{t=(0,r.p)(t)}catch(e){}(0,r.w)(e,"_headerCells",(e=>"object"==typeof e&&null!==e),new Set(["TableHeaderCellsPropType"]),t)}))}))})(this,e)}validateLabel(e){(0,h.v)(this,e,{required:!0})}validateMinWidth(e){(0,r.i)(this,"_minWidth",e,{defaultValue:void 0})}validateOn(e){(0,c.d)(this,e)}validateSelection(e){(0,c.b)(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const o=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let n=this.checkboxRefs.indexOf(o);n>-1&&(e.preventDefault(),"ArrowDown"===e.key?(n=(n+1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()):"ArrowUp"===e.key&&(e.preventDefault(),n=(n+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach((e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,(0,s.n)())})),this.dataToKeyMap.forEach(((t,o)=>{e.includes(o)||this.dataToKeyMap.delete(o)}))}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout((()=>{if("function"==typeof e.render){const o=e.render(t,e,e.data,this.state._data);"string"==typeof o&&(t.textContent=o)}}))))}getNumberOfCols(e,t){let o=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var o;return t+=null!==(o=e.colSpan)&&void 0!==o?o:1})),o<t&&(o=t)})),0===o&&(o=t.length),o}getNumberOfRows(e,t){var o;let n=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var o;return t+=null!==(o=e.rowSpan)&&void 0!==o?o:1})),n<t&&(n=t)})),0===n?n=t.length:n-=(null===(o=this.state._dataFoot)||void 0===o?void 0:o.length)||0,n}filterHeaderKeys(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeader(e){var t,o;let n=this.filterHeaderKeys(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===n.length&&(n=this.filterHeaderKeys(null!==(o=e.vertical)&&void 0!==o?o:[]),n.length>0&&(this.horizontal=!1)),n}createDataField(e,t,o){var n;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const a=this.getPrimaryHeader(t),l=this.getNumberOfCols(t.horizontal,e);let s=this.getNumberOfRows(t.vertical,e),r=0;o&&(r=s,s+=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0);const c=[],h=[],d=[];t.vertical.forEach(((e,t)=>{h[t]=0,d[t]=[]}));for(let n=r;n<s;n++){const i=[];t.vertical.forEach(((e,t)=>{let o=0;if(d[t].forEach((e=>o+=e)),o<=n){const a=e[n-o+h[t]];if("object"==typeof a){i.push(Object.assign(Object.assign({},a),{asTd:!1,data:{}}));let e=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(e=a.rowSpan),d[t].push(e),"number"==typeof a.colSpan&&a.colSpan>1)for(let o=1;o<a.colSpan;o++)d[t+o].push(e);h[t]++}}}));for(let t=0;t<l;t++)if(!0===this.horizontal){const l=o&&this.state._dataFoot?this.state._dataFoot[n-r]:e[n];"object"==typeof a[t]&&null!==a[t]&&"string"==typeof a[t].key&&"object"==typeof l&&null!==l&&i.push(Object.assign(Object.assign({},a[t]),{colSpan:void 0,data:l,label:l[a[t].key],rowSpan:void 0}))}else"object"==typeof a[n]&&null!==a[n]&&"string"==typeof a[n].key&&"object"==typeof e[t]&&null!==e[t]&&i.push(Object.assign(Object.assign({},a[n]),{colSpan:void 0,data:e[t],label:e[t][a[n].key],rowSpan:void 0}));c.push(i)}if(0===e.length){let e=0,o=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach((t=>{e+=t.colSpan||1})),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach((e=>{o+=e.rowSpan||1})));const n={colSpan:e,label:(0,i.t)("kol-no-entries"),render:void 0,rowSpan:Math.max(o,1)};0===c.length?c.push([n]):c[0].push(n)}return c}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection)}renderSelectionCell(e,t){var o,i,s;const r=this.state._selection;if(!r)return"";const h=null!==(o=r.keyPropertyName)&&void 0!==o?o:"id",d=null===(i=e[0])||void 0===i?void 0:i.data;if(!d)return"";const u=d[h],p=r.multiple||void 0===r.multiple,b=null===(s=null==r?void 0:r.selectedKeys)||void 0===s?void 0:s.includes(u),v=r.label(d),f={name:"selection",checked:b,id:u,"aria-label":v};return(0,n.h)("td",{key:`tbody-${t}-selection`,class:"selection-cell"},(0,n.h)("div",{class:"input "+(b?"checked":"")},p?(0,n.h)("label",{class:"checkbox-container"},(0,n.h)(a.d,{class:"icon",_icons:"codicon "+(b?"codicon-check":""),_label:""}),(0,n.h)("input",Object.assign({ref:e=>e&&this.checkboxRefs.push(e)},f,{type:"checkbox",onInput:e=>{var t,o,n;const a=b?null===(o=null==r?void 0:r.selectedKeys)||void 0===o?void 0:o.filter((e=>e!==u)):[...null!==(t=null==r?void 0:r.selectedKeys)&&void 0!==t?t:[],u];(0,l.t)("selection-change",this.host,a),"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[c.E.onSelectionChange])&&this.state._on[c.E.onSelectionChange](e,null!=a?a:[])}}))):(0,n.h)("label",{class:"radio-container"},(0,n.h)("input",Object.assign({},f,{type:"radio",onInput:e=>{var t;(0,l.t)("selection-change",this.host,u),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[c.E.onSelectionChange])&&this.state._on[c.E.onSelectionChange](e,u)}}))),(0,n.h)(a.u,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${u}-label`,_label:v})))}renderHeadingSelectionCell(){var e,t;const o=this.state._selection;if(!o||!o.multiple&&void 0!==o.multiple)return(0,n.h)("th",{key:"thead-0"});const s=null!==(e=o.keyPropertyName)&&void 0!==e?e:"id",r=null===(t=o.selectedKeys)||void 0===t?void 0:t.length,h=r===this.state._data.length,d=0!==r&&!h;let u="kol-table-selection-indeterminate";h&&!d&&(u="kol-table-selection-none"),0===r&&(u="kol-table-selection-all");const p=(0,i.t)(u);return(0,n.h)("th",{key:"thead-0-selection",class:"selection-cell selection-control"},(0,n.h)("div",{class:"input "+(d?"indeterminate":h?"checked":"")},(0,n.h)("label",{class:"checkbox-container"},(0,n.h)(a.d,{class:"icon",_icons:"codicon "+(d?"codicon-remove":h?"codicon-check":""),_label:""}),(0,n.h)("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:h&&!d,"aria-label":p,type:"checkbox",onInput:e=>{var t;const o=h?[]:this.state._data.map((e=>null==e?void 0:e[s]));(0,l.t)("selection-change",this.host,o),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[c.E.onSelectionChange])&&this.state._on[c.E.onSelectionChange](e,o)}})),(0,n.h)(a.u,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${u}-label`,_label:p})))}renderHeadingCell(e,t,o,i){let l,s="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":s="codicon codicon-chevron-up",l="ascending";break;case"DESC":s="codicon codicon-chevron-down",l="descending"}const r=i?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return(0,n.h)("th",{key:`${t}-${o}-${e.label}`,class:e.textAlign?`align-${e.textAlign}`:void 0,scope:r,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:e.width},"aria-sort":l,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?(0,n.h)(a.a,{class:"table-sort-button",exportparts:"icon",_icons:{right:s},_label:e.label,_on:{onClick:t=>{var o;"function"==typeof(null===(o=this.state._on)||void 0===o?void 0:o.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,t){var o;const a=null===(o=null==t?void 0:t[0])||void 0===o?void 0:o.reduce(((e,t)=>e+(t.colSpan||1)),0);return(0,n.h)("tr",{class:`${e}-spacer`,"aria-hidden":"true"},(0,n.h)("td",{colSpan:a}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return(0,n.h)("tfoot",null,[this.renderSpacer("foot",e),e.map(((e,t)=>this.renderTableRow(e,t,!0)))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);return this.checkboxRefs=[],(0,n.h)(n.H,{key:"6f41723609fd16851183723f520e1666a868c555",class:"kol-table-stateless-wc"},(0,n.h)("div",{key:"1f33c8399f614f5439270c1d4685a85d58737799",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},(0,n.h)("table",{key:"a2951c1fccdb56a7c4d2f083352cd31740773c0f",style:{minWidth:this.state._minWidth}},(0,n.h)("div",{key:"6412112eee29e4a383b86de354f1060f014d7553",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),(0,n.h)("caption",{key:"108a3406f3290e73cf68121c19deefa317b4ffd2",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&(0,n.h)("thead",{key:"63bf023ea1b1a30b6f64f43dca50bbe96d6b4c81"},[this.state._headerCells.horizontal.map(((e,t)=>(0,n.h)("tr",{key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),e.map(((e,o)=>!0===e.asTd?(0,n.h)("td",{key:`thead-${t}-${o}-${e.label}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:""):this.renderHeadingCell(e,t,o,!1)))))),this.renderSpacer("head",this.state._headerCells.horizontal)]),(0,n.h)("tbody",{key:"b25f4e3524413d9d9766146c9a14a6ada67d95fb"},e.map(((e,t)=>this.renderTableRow(e,t,!0)))),this.renderFoot())))}get host(){return(0,n.g)(this)}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}}}},1085:(e,t,o)=>{o.d(t,{a:()=>d,b:()=>s,c:()=>r,h:()=>a,v:()=>h});var n=o(4058);const a=[0,1,2,3,4,5,6],i=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function s(e,t=1){return function(e){var t;return"string"==typeof e&&(null===(t=e.match(i))||void 0===t?void 0:t.length)||0}(e)>=t}function r(e){return l.test(e)}const c=new Set(["string"]),h=(e,t,o={})=>{(0,n.w)(e,"_label",(e=>"string"==typeof e),c,t,function(e){var t;return Object.assign(Object.assign({},e),{hooks:{afterPatch:(t,o,a,i)=>{var l,c;"function"==typeof(null===(l=e.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(c=e.hooks)||void 0===c||c.afterPatch(t,o,a,i)),"string"==typeof t&&!1===s(t,3)&&!1===r(t)&&(0,n.a)(`The heading or label ("${t}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof t&&t.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(t=e.hooks)||void 0===t?void 0:t.beforePatch}})}(o))},d=h},1523:(e,t,o)=>{o.d(t,{b:()=>l,h:()=>a,p:()=>n,s:()=>i});let n="development";try{n="production"}catch(e){n="production"}const a=(e,t,o)=>{if(e&&t&&"string"==typeof o){const n=e.querySelector(`[slot="${o}"]`);n&&t.appendChild(n)}},i=e=>""===e,l=(e,t)=>e||t||""}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4118],{3260:(e,t,o)=>{o.d(t,{S:()=>l,a:()=>i,b:()=>n,i:()=>a});const n=e=>"object"==typeof e&&null!==e,a=(e,t=0)=>"string"==typeof e&&e.length>=t,i=e=>{if("object"!=typeof e||null===e)return a(e,1);for(const t in e)if(!1===a(t,1))return!1;return!0},l=new Event("StateChange")},6762:(e,t,o)=>{o.d(t,{i:()=>s,n:()=>c,r:()=>r});var n=o(1114),a=o(1523),i=o(6448);const l=()=>{let e=(0,i.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,i.d)(),"KoliBri",{value:e,writable:!1})),e},s=()=>{(()=>{const e=(0,i.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&((0,i.s)(t.includes("dev-mode=true")),(0,i.b)(t.includes("experimental-mode=true")),(0,i.c)(t.includes("color-contrast-analysis=true")))}})(),i.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${n.E.kolibriVersion}\n\t`,{forceLog:!0})},r=()=>{!0!==l().adviceShown&&(Object.defineProperty(l(),"adviceShown",{get:function(){return!0}}),i.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let c=()=>Math.floor(16777215*Math.random()).toString(16);"test"===a.p&&(c=()=>"nonce")},6855:(e,t,o)=>{function n(e){e.stopImmediatePropagation(),e.stopPropagation()}function a(e,t,o){t&&function(e,t,o){const n=e.dispatchEvent(function(e,t){return new CustomEvent(`kol-${e}`,{bubbles:!0,cancelable:!0,composed:!0,detail:t})}(t,o))}(t,e,o)}function i(e){e.preventDefault(),n(e)}o.d(t,{p:()=>i,s:()=>n,t:()=>a})},1988:(e,t,o)=>{o.d(t,{E:()=>h,a:()=>r,b:()=>c,c:()=>l,d:()=>i,v:()=>s});var n=o(4058),a=o(3260);const i=(e,t)=>{(0,n.w)(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),t)},l=(e,t)=>{(0,n.w)(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),t)},s=(e,t,o)=>{(0,n.t)(t,(()=>{(0,n.o)(t,(()=>{void 0===t&&(t=[]);try{t=(0,n.p)(t)}catch(e){}Array.isArray(t)&&t.every((e=>"object"==typeof e&&null!==e))&&(0,n.s)(e,"_data",t,o)}))}))},r=(e,t,o)=>{(0,n.t)(t,(()=>{(0,n.o)(t,(()=>{void 0===t&&(t=[]);try{t=(0,n.p)(t)}catch(e){}Array.isArray(t)&&t.every((e=>"object"==typeof e&&null!==e))&&(0,n.s)(e,"_dataFoot",t,o)}))}))},c=(e,t)=>{var o;(o="string"==typeof t?(()=>{try{return(0,n.p)(t)}catch(e){return}})():t)&&(0,a.b)(o)&&"function"==typeof o.label&&(!o.selectedKeys||Array.isArray(o.selectedKeys))&&(0,n.s)(e,"_selection",t)};var h,d;(d=h||(h={})).onBlur="onBlur",d.onChange="onChange",d.onClick="onClick",d.onDblClick="onDblClick",d.onFocus="onFocus",d.onInput="onInput",d.onKeyDown="onKeyDown",d.onKeyPress="onKeyPress",d.onKeyUp="onKeyUp",d.onMouseDown="onMouseDown",d.onMouseMove="onMouseMove",d.onMouseOut="onMouseOut",d.onMouseOver="onMouseOver",d.onMouseUp="onMouseUp",d.onReset="onReset",d.onSelect="onSelect",d.onSort="onSort",d.onSelectionChange="onSelectionChange",d.onSubmit="onSubmit",d.onToggle="onToggle",d.onClose="onClose"},1100:(e,t,o)=>{o.d(t,{t:()=>i});var n=o(8457),a=o(1523);let i=(e,t)=>{var o;return(null!==(o=(0,n.g)())&&void 0!==o?o:(0,n.i)("de")).translate(e,t)};"test"===a.p&&(i=e=>e)},4118:(e,t,o)=>{o.r(t),o.d(t,{kol_table_stateless_wc:()=>d});var n=o(1114),a=o(7883),i=o(1100),l=o(6855),s=o(6762),r=o(4058),c=o(1988),h=o(1085);const d=class{constructor(e){(0,n.r)(this,e),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.renderTableRow=(e,t,o)=>{var a,i;let l=String(t);return this.horizontal&&(null===(a=e[0])||void 0===a?void 0:a.data)&&(l=null!==(i=this.getDataKey(e[0].data))&&void 0!==i?i:l),(0,n.h)("tr",{key:`row-${l}`},this.renderSelectionCell(e,t),e.map(((e,n)=>this.renderTableCell(e,t,n,o))))},this.renderTableCell=(e,t,o,a)=>{let i=`${t}-${o}-${e.label}`;if(e.data){const n=this.getDataKey(e.data);i=n?`${n}-${this.horizontal?o:t}`:i}return!1===e.asTd?this.renderHeadingCell(e,t,o,a):(0,n.h)("td",{key:`cell-${i}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:"")},this.state={_data:[],_label:"",_headerCells:{horizontal:[],vertical:[]}},this.tableDivElementHasScrollbar=!1,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}validateData(e){(0,c.v)(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){(0,c.a)(this,e)}validateHeaderCells(e){((e,t)=>{(0,r.t)(t,(()=>{(0,r.o)(t,(()=>{try{t=(0,r.p)(t)}catch(e){}(0,r.w)(e,"_headerCells",(e=>"object"==typeof e&&null!==e),new Set(["TableHeaderCellsPropType"]),t)}))}))})(this,e)}validateLabel(e){(0,h.v)(this,e,{required:!0})}validateMinWidth(e){(0,r.i)(this,"_minWidth",e,{defaultValue:void 0})}validateOn(e){(0,c.d)(this,e)}validateSelection(e){(0,c.b)(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const o=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let n=this.checkboxRefs.indexOf(o);n>-1&&(e.preventDefault(),"ArrowDown"===e.key?(n=(n+1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()):"ArrowUp"===e.key&&(e.preventDefault(),n=(n+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach((e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,(0,s.n)())})),this.dataToKeyMap.forEach(((t,o)=>{e.includes(o)||this.dataToKeyMap.delete(o)}))}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout((()=>{if("function"==typeof e.render){const o=e.render(t,e,e.data,this.state._data);"string"==typeof o&&(t.textContent=o)}}))))}getNumberOfCols(e,t){let o=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var o;return t+=null!==(o=e.colSpan)&&void 0!==o?o:1})),o<t&&(o=t)})),0===o&&(o=t.length),o}getNumberOfRows(e,t){var o;let n=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var o;return t+=null!==(o=e.rowSpan)&&void 0!==o?o:1})),n<t&&(n=t)})),0===n?n=t.length:n-=(null===(o=this.state._dataFoot)||void 0===o?void 0:o.length)||0,n}filterHeaderKeys(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeader(e){var t,o;let n=this.filterHeaderKeys(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===n.length&&(n=this.filterHeaderKeys(null!==(o=e.vertical)&&void 0!==o?o:[]),n.length>0&&(this.horizontal=!1)),n}createDataField(e,t,o){var n;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const a=this.getPrimaryHeader(t),l=this.getNumberOfCols(t.horizontal,e);let s=this.getNumberOfRows(t.vertical,e),r=0;o&&(r=s,s+=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0);const c=[],h=[],d=[];t.vertical.forEach(((e,t)=>{h[t]=0,d[t]=[]}));for(let n=r;n<s;n++){const i=[];t.vertical.forEach(((e,t)=>{let o=0;if(d[t].forEach((e=>o+=e)),o<=n){const a=e[n-o+h[t]];if("object"==typeof a){i.push(Object.assign(Object.assign({},a),{asTd:!1,data:{}}));let e=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(e=a.rowSpan),d[t].push(e),"number"==typeof a.colSpan&&a.colSpan>1)for(let o=1;o<a.colSpan;o++)d[t+o].push(e);h[t]++}}}));for(let t=0;t<l;t++)if(!0===this.horizontal){const l=o&&this.state._dataFoot?this.state._dataFoot[n-r]:e[n];"object"==typeof a[t]&&null!==a[t]&&"string"==typeof a[t].key&&"object"==typeof l&&null!==l&&i.push(Object.assign(Object.assign({},a[t]),{colSpan:void 0,data:l,label:l[a[t].key],rowSpan:void 0}))}else"object"==typeof a[n]&&null!==a[n]&&"string"==typeof a[n].key&&"object"==typeof e[t]&&null!==e[t]&&i.push(Object.assign(Object.assign({},a[n]),{colSpan:void 0,data:e[t],label:e[t][a[n].key],rowSpan:void 0}));c.push(i)}if(0===e.length){let e=0,o=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach((t=>{e+=t.colSpan||1})),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach((e=>{o+=e.rowSpan||1})));const n={colSpan:e,label:(0,i.t)("kol-no-entries"),render:void 0,rowSpan:Math.max(o,1)};0===c.length?c.push([n]):c[0].push(n)}return c}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection)}renderSelectionCell(e,t){var o,i,s;const r=this.state._selection;if(!r)return"";const h=null!==(o=r.keyPropertyName)&&void 0!==o?o:"id",d=null===(i=e[0])||void 0===i?void 0:i.data;if(!d)return"";const u=d[h],p=r.multiple||void 0===r.multiple,b=null===(s=null==r?void 0:r.selectedKeys)||void 0===s?void 0:s.includes(u),v=r.label(d),f={name:"selection",checked:b,id:u,"aria-label":v};return(0,n.h)("td",{key:`tbody-${t}-selection`,class:"selection-cell"},(0,n.h)("div",{class:"input "+(b?"checked":"")},p?(0,n.h)("label",{class:"checkbox-container"},(0,n.h)(a.d,{class:"icon",_icons:"codicon "+(b?"codicon-check":""),_label:""}),(0,n.h)("input",Object.assign({ref:e=>e&&this.checkboxRefs.push(e)},f,{type:"checkbox",onInput:e=>{var t,o,n;const a=b?null===(o=null==r?void 0:r.selectedKeys)||void 0===o?void 0:o.filter((e=>e!==u)):[...null!==(t=null==r?void 0:r.selectedKeys)&&void 0!==t?t:[],u];(0,l.t)("selection-change",this.host,a),"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[c.E.onSelectionChange])&&this.state._on[c.E.onSelectionChange](e,null!=a?a:[])}}))):(0,n.h)("label",{class:"radio-container"},(0,n.h)("input",Object.assign({},f,{type:"radio",onInput:e=>{var t;(0,l.t)("selection-change",this.host,u),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[c.E.onSelectionChange])&&this.state._on[c.E.onSelectionChange](e,u)}}))),(0,n.h)(a.u,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${u}-label`,_label:v})))}renderHeadingSelectionCell(){var e,t;const o=this.state._selection;if(!o||!o.multiple&&void 0!==o.multiple)return(0,n.h)("th",{key:"thead-0"});const s=null!==(e=o.keyPropertyName)&&void 0!==e?e:"id",r=null===(t=o.selectedKeys)||void 0===t?void 0:t.length,h=r===this.state._data.length,d=0!==r&&!h;let u="kol-table-selection-indeterminate";h&&!d&&(u="kol-table-selection-none"),0===r&&(u="kol-table-selection-all");const p=(0,i.t)(u);return(0,n.h)("th",{key:"thead-0-selection",class:"selection-cell selection-control"},(0,n.h)("div",{class:"input "+(d?"indeterminate":h?"checked":"")},(0,n.h)("label",{class:"checkbox-container"},(0,n.h)(a.d,{class:"icon",_icons:"codicon "+(d?"codicon-remove":h?"codicon-check":""),_label:""}),(0,n.h)("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:h&&!d,"aria-label":p,type:"checkbox",onInput:e=>{var t;const o=h?[]:this.state._data.map((e=>null==e?void 0:e[s]));(0,l.t)("selection-change",this.host,o),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[c.E.onSelectionChange])&&this.state._on[c.E.onSelectionChange](e,o)}})),(0,n.h)(a.u,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${u}-label`,_label:p})))}renderHeadingCell(e,t,o,i){let l,s="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":s="codicon codicon-chevron-up",l="ascending";break;case"DESC":s="codicon codicon-chevron-down",l="descending"}const r=i?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return(0,n.h)("th",{key:`${t}-${o}-${e.label}`,class:e.textAlign?`align-${e.textAlign}`:void 0,scope:r,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:e.width},"aria-sort":l,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?(0,n.h)(a.a,{class:"table-sort-button",exportparts:"icon",_icons:{right:s},_label:e.label,_on:{onClick:t=>{var o;"function"==typeof(null===(o=this.state._on)||void 0===o?void 0:o.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,t){var o;const a=null===(o=null==t?void 0:t[0])||void 0===o?void 0:o.reduce(((e,t)=>e+(t.colSpan||1)),0);return(0,n.h)("tr",{class:`${e}-spacer`,"aria-hidden":"true"},(0,n.h)("td",{colSpan:a}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return(0,n.h)("tfoot",null,[this.renderSpacer("foot",e),e.map(((e,t)=>this.renderTableRow(e,t,!0)))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);return this.checkboxRefs=[],(0,n.h)(n.H,{key:"6f41723609fd16851183723f520e1666a868c555",class:"kol-table-stateless-wc"},(0,n.h)("div",{key:"1f33c8399f614f5439270c1d4685a85d58737799",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},(0,n.h)("table",{key:"a2951c1fccdb56a7c4d2f083352cd31740773c0f",style:{minWidth:this.state._minWidth}},(0,n.h)("div",{key:"6412112eee29e4a383b86de354f1060f014d7553",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),(0,n.h)("caption",{key:"108a3406f3290e73cf68121c19deefa317b4ffd2",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&(0,n.h)("thead",{key:"63bf023ea1b1a30b6f64f43dca50bbe96d6b4c81"},[this.state._headerCells.horizontal.map(((e,t)=>(0,n.h)("tr",{key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),e.map(((e,o)=>!0===e.asTd?(0,n.h)("td",{key:`thead-${t}-${o}-${e.label}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:""):this.renderHeadingCell(e,t,o,!1)))))),this.renderSpacer("head",this.state._headerCells.horizontal)]),(0,n.h)("tbody",{key:"b25f4e3524413d9d9766146c9a14a6ada67d95fb"},e.map(((e,t)=>this.renderTableRow(e,t,!0)))),this.renderFoot())))}get host(){return(0,n.g)(this)}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}}}},1085:(e,t,o)=>{o.d(t,{a:()=>d,b:()=>s,c:()=>r,h:()=>a,v:()=>h});var n=o(4058);const a=[0,1,2,3,4,5,6],i=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function s(e,t=1){return function(e){var t;return"string"==typeof e&&(null===(t=e.match(i))||void 0===t?void 0:t.length)||0}(e)>=t}function r(e){return l.test(e)}const c=new Set(["string"]),h=(e,t,o={})=>{(0,n.w)(e,"_label",(e=>"string"==typeof e),c,t,function(e){var t;return Object.assign(Object.assign({},e),{hooks:{afterPatch:(t,o,a,i)=>{var l,c;"function"==typeof(null===(l=e.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(c=e.hooks)||void 0===c||c.afterPatch(t,o,a,i)),"string"==typeof t&&!1===s(t,3)&&!1===r(t)&&(0,n.a)(`The heading or label ("${t}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof t&&t.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(t=e.hooks)||void 0===t?void 0:t.beforePatch}})}(o))},d=h},1523:(e,t,o)=>{o.d(t,{b:()=>l,h:()=>a,p:()=>n,s:()=>i});let n="development";try{n="production"}catch(e){n="production"}const a=(e,t,o)=>{if(e&&t&&"string"==typeof o){const n=e.querySelector(`[slot="${o}"]`);n&&t.appendChild(n)}},i=e=>""===e,l=(e,t)=>e||t||""}}]);
|
package/dist/4182.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4182.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4182],{
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4182],{4913:(e,t,i)=>{i.d(t,{K:()=>_});var s=i(3133),o=i(1114),a=i(4600),l=i(1100),n=i(7883),r=i(9028),c=i(6448);const d=({ariaLabel:e,icon:t})=>(0,o.h)(n.d,{class:"heading-icon",_label:e,_icons:t}),h=({type:e,label:t})=>{switch(e){case"error":return(0,o.h)(d,{ariaLabel:(0,l.t)("kol-error"),icon:"codicon codicon-error",label:t});case"info":return(0,o.h)(d,{ariaLabel:(0,l.t)("kol-info"),icon:"codicon codicon-info",label:t});case"warning":return(0,o.h)(d,{ariaLabel:(0,l.t)("kol-warning"),icon:"codicon codicon-warning",label:t});case"success":return(0,o.h)(d,{ariaLabel:(0,l.t)("kol-success"),icon:"codicon codicon-pass",label:t});default:return(0,o.h)(d,{ariaLabel:(0,l.t)("kol-message"),icon:"codicon codicon-comment",label:t})}},_=(e,t)=>{const{class:i={},type:d="default",variant:_="msg",label:u,hasCloser:b,alert:f,onAlertTimeout:p,onCloserClick:v,level:g}=e,y=(0,s._)(e,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);if(f){try{c.L.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(e){c.L.debug("Navigator does not support vibration.")}setTimeout((()=>{null==p||p()}),1e4)}const m=Object.assign({class:(0,a.c)("kol-alert-wc","alert",d,_,{hasCloser:!!b},i),role:f?"alert":void 0},y);return(0,o.h)("div",Object.assign({},m),(0,o.h)("div",{class:"heading"},(0,o.h)(h,{label:u,type:d}),(0,o.h)("div",{class:"heading-content"},u?(0,o.h)(r.K,{level:g},u):null,"msg"===_&&(0,o.h)("div",{class:"content"},t)),b&&(0,o.h)(n.a,{class:"close",_ariaDescription:(null==u?void 0:u.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:(0,l.t)("kol-close-alert"),_on:{onClick:v},_tooltipAlign:"left"})),"card"===_&&(0,o.h)("div",{class:"content"},t))}},9048:(e,t,i)=>{i.d(t,{K:()=>l});var s=i(4600),o=i(1114),a=i(4913);const l=({_alert:e,_msg:t,_hideError:i,_id:l})=>(0,o.h)(a.K,Object.assign({"aria-hidden":"true",id:`${l}-error`,alert:e,type:"error",class:(0,s.c)({error:!0,"visually-hidden":!0===i})},t),(null==t?void 0:t._description)||void 0)},9028:(e,t,i)=>{i.d(t,{K:()=>d});var s=i(3133),o=i(1114),a=i(4600);const l=1;function n(e){return function(e){return e>=l&&e<=6}(e)?`h${e}`:"strong"}const r=(e,t)=>{var{class:i,level:r=l,variant:c}=e,d=(0,s._)(e,["class","level","variant"]);const h=n(r),_=c||h;return(0,o.h)(h,Object.assign({class:(0,a.c)("headline",`headline-${_}`,i)},d),t)},c=(e,t)=>{var{class:i,level:r=l}=e,c=(0,s._)(e,["class","level"]);const d=function(e){return 1===e?"span":n(e)}(r+1);return(0,o.h)(d,Object.assign({class:(0,a.c)("secondary-headline",i)},c),t)},d=(e,t)=>{var{secondaryHeadline:i,level:n=l,class:d,HeadingGroupProps:h={},SecondaryHeadlineProps:_={}}=e,u=(0,s._)(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const b="kol-heading-wc",f=Object.assign({level:n},u);if(!i)return(0,o.h)(r,Object.assign({class:(0,a.c)(b,d)},f),t);const{class:p}=h,v=(0,s._)(h,["class"]),g=Object.assign({class:(0,a.c)(b,p)},v);return(0,o.h)("hgroup",Object.assign({},g),(0,o.h)(r,Object.assign({class:d},f),t),(0,o.h)(c,Object.assign({level:n},_),i))}},4600:(e,t,i)=>{function s(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(i=s(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function o(){for(var e,t,i=0,o="",a=arguments.length;i<a;i++)(e=arguments[i])&&(t=s(e))&&(o&&(o+=" "),o+=t);return o}i.d(t,{c:()=>o})},1100:(e,t,i)=>{i.d(t,{t:()=>a});var s=i(8457),o=i(1523);let a=(e,t)=>{var i;return(null!==(i=(0,s.g)())&&void 0!==i?i:(0,s.i)("de")).translate(e,t)};"test"===o.p&&(a=e=>e)},4182:(e,t,i)=>{i.r(t),i.d(t,{kol_input:()=>c});var s=i(1114),o=i(4600),a=i(1100),l=i(7883),n=i(1523),r=i(9048);const c=class{constructor(e){(0,s.r)(this,e),this.slotName="input",this.catchInputSlot=e=>{(0,n.h)(this.host,e,this.slotName)},this._accessKey=void 0,this._alert=!0,this._currentLength=void 0,this._disabled=!1,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._shortKey=void 0,this._slotName=void 0,this._suggestions=void 0,this._smartButton=void 0,this._tooltipAlign="top",this._touched=!1}componentWillRender(){this.slotName=this._slotName?this._slotName:"input"}getIconStyles(e){return e&&"object"==typeof e&&e.style?e.style:{}}render(){var e,t,i,c,d,h,_,u,b,f,p,v;const g=Boolean("error"===(null===(e=this._msg)||void 0===e?void 0:e._type)&&this._msg._description&&(null===(t=this._msg._description)||void 0===t?void 0:t.length)>0),y=!this._readOnly&&g&&!0===this._touched,m=Boolean(y||"error"!==(null===(i=this._msg)||void 0===i?void 0:i._type)&&(null===(c=this._msg)||void 0===c?void 0:c._description)),k=(0,n.s)(this._label),O="string"==typeof this._hint&&this._hint.length>0,j=!k&&this._hideLabel;return(0,s.h)(s.H,{key:"b8df7f60763afdbfdf35b0026a092c49a3b1866b",class:(0,o.c)("kol-input",this.getModifierClassNameByMsgType(),{disabled:!0===this._disabled,error:!0===y,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-error":!0===this._hideError})},(0,s.h)("label",{key:"29a105409c1aa053d015150788729b94745518bd",class:"input-label",id:j?void 0:`${this._id}-label`,hidden:j,htmlFor:this._id},(0,s.h)("span",{key:"6808011d7fdc8605a78c0c02381f11fdb18f34f5",class:"input-label-span"},(0,s.h)("slot",{key:"9cb9136bbe0e9adf68d3b75f68496f71bfb81020",name:"label"}))),O&&(0,s.h)("span",{key:"d701237628ecde9eeef3ddda238858bcd5ecbe5c",class:"hint",id:`${this._id}-hint`},this._hint),(0,s.h)("div",{key:"2ddffe093cfe68ba213fc84416751401557a4745",class:{input:!0,"icon-left":"object"==typeof(null===(d=this._icons)||void 0===d?void 0:d.left),"icon-right":"object"==typeof(null===(h=this._icons)||void 0===h?void 0:h.right)}},(null===(_=this._icons)||void 0===_?void 0:_.left)&&(0,s.h)(l.d,{key:"d5ee1e5d7ffde6adc6518301bd7515902d8c4015",_label:"",_icons:(null===(u=this._icons)||void 0===u?void 0:u.left).icon,style:this.getIconStyles(null===(b=this._icons)||void 0===b?void 0:b.left)}),(0,s.h)("div",{key:"55b2164813cefbafbf9951fd44f7f9d720116414",ref:this.catchInputSlot,id:this.slotName,class:"input-slot"}),"object"==typeof this._smartButton&&null!==this._smartButton&&(0,s.h)(l.a,{key:"3f03623c2f5ddc28a3a17d21738182253f8bd471",_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icons:this._smartButton._icons,_hideLabel:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant}),(null===(f=this._icons)||void 0===f?void 0:f.right)&&(0,s.h)(l.d,{key:"d38fb504da0f5a37e5808ede0d16b0f368db6f25",_label:"",_icons:(null===(p=this._icons)||void 0===p?void 0:p.right).icon,style:this.getIconStyles(null===(v=this._icons)||void 0===v?void 0:v.right)})),j&&(0,s.h)(l.u,{key:"fd6697c91cf0c33934be094ee8e10913f5244955","aria-hidden":"true",class:"input-tooltip",_badgeText:this._accessKey||this._shortKey,_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),m&&(0,s.h)(r.K,{key:"babedf64505945c9d8c9a3e3f41f464346c795e1",_alert:this._alert,_hideError:this._hideError,_msg:this._msg,_id:this._id}),Array.isArray(this._suggestions)&&this._suggestions.length>0&&(0,s.h)("datalist",{key:"18aa171c5139a11b793e4cdd3379a9b98c91670f",id:`${this._id}-list`},this._suggestions.map((e=>(0,s.h)("option",{value:e})))),this._hasCounter&&(0,s.h)("span",{key:"193f9b434011825c0695ac11dbc135bd5614e692",class:"counter","aria-atomic":"true","aria-live":"polite","data-testid":"input-counter"},this._currentLength,this._maxLength&&(0,s.h)(s.F,null,(0,s.h)("span",{key:"43426e33b6e7a204b2f7614cf51f890adbb6d51b","aria-label":(0,a.t)("kol-of"),role:"img"},"/"),this._maxLength)," ",(0,s.h)("span",{key:"e7856e63c99d0ece89fd8f8005f4dd2843a59f31"},(0,a.t)("kol-characters"))))}getModifierClassNameByMsgType(){var e,t;if(null===(e=this._msg)||void 0===e?void 0:e._type)return{default:"msg-type-default",info:"msg-type-info",success:"msg-type-success",warning:"msg-type-warning",error:"msg-type-error"}[null===(t=this._msg)||void 0===t?void 0:t._type]}get host(){return(0,s.g)(this)}}},1523:(e,t,i)=>{i.d(t,{b:()=>l,h:()=>o,p:()=>s,s:()=>a});let s="development";try{s="production"}catch(e){s="production"}const o=(e,t,i)=>{if(e&&t&&"string"==typeof i){const s=e.querySelector(`[slot="${i}"]`);s&&t.appendChild(s)}},a=e=>""===e,l=(e,t)=>e||t||""},3133:(e,t,i)=>{function s(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(i[s[o]]=e[s[o]])}return i}i.d(t,{_:()=>s}),"function"==typeof SuppressedError&&SuppressedError}}]);
|
package/dist/4188.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4188.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4188],{1853:(t,e,n)=>{n.d(e,{a:()=>a,v:()=>s});var i=n(4058);const a=(t,e,n)=>{(0,i.w)(t,e,(t=>"string"==typeof t&&o.includes(t)),new Set(o),n,{defaultValue:"top"})},o=["left","right","top","bottom"],s=(t,e)=>{a(t,"_align",e)}},3260:(t,e,n)=>{n.d(e,{S:()=>s,a:()=>o,b:()=>i,i:()=>a});const i=t=>"object"==typeof t&&null!==t,a=(t,e=0)=>"string"==typeof t&&t.length>=e,o=t=>{if("object"!=typeof t||null===t)return a(t,1);for(const e in t)if(!1===a(e,1))return!1;return!0},s=new Event("StateChange")},9923:(t,e,n)=>{n.d(e,{v:()=>a});var i=n(4058);const a=(t,e)=>{(0,i.i)(t,"_customClass",e,{defaultValue:void 0})}},2385:(t,e,n)=>{n.d(e,{i:()=>l,n:()=>h,r:()=>r});var i=n(1405),a=n(1523),o=n(6448);const s=()=>{let t=(0,o.d)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,o.d)(),"KoliBri",{value:t,writable:!1})),t},l=()=>{(()=>{const t=(0,o.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,o.s)(e.includes("dev-mode=true")),(0,o.b)(e.includes("experimental-mode=true")),(0,o.c)(e.includes("color-contrast-analysis=true")))}})(),o.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${i.E.kolibriVersion}\n\t`,{forceLog:!0})},r=()=>{!0!==s().adviceShown&&(Object.defineProperty(s(),"adviceShown",{get:function(){return!0}}),o.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let h=()=>Math.floor(16777215*Math.random()).toString(16);"test"===a.p&&(h=()=>"nonce")},1100:(t,e,n)=>{n.d(e,{t:()=>o});var i=n(8457),a=n(1523);let o=(t,e)=>{var n;return(null!==(n=(0,i.g)())&&void 0!==n?n:(0,i.i)("de")).translate(t,e)};"test"===a.p&&(o=t=>t)},4188:(t,e,n)=>{n.r(e),n.d(e,{kol_pagination:()=>v});var i=n(1405),a=n(1100),o=n(2385),s=n(1880),l=n(7883),r=n(3260),h=n(9923),c=n(4058),d=n(1085),p=n(28);const u={left:"codicon codicon-debug-reverse-continue"},g={left:"codicon codicon-chevron-left"},b={right:"codicon codicon-chevron-right"},_={right:"codicon codicon-debug-continue"},f=function(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}(),m=new Intl.NumberFormat(f,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),v=class{constructor(t){(0,i.r)(this,t),this.nonce=(0,o.n)(),this.calcCount=(t,e=1)=>Math.ceil(t/e),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this.onClick=(t,e)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,e),this.onChangePage(t,e)},this.onChangePage=(t,e)=>{const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,e)}))},this.onChangePageSize=(t,e)=>{if("number"==typeof(e=parseInt(e[0]))&&e>0&&this._pageSize!==e){this._pageSize=e;const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize)}))}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,e)=>{let n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;const i=e.has("_pageSizeOptions")?e.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(i)&&i.length>0){const t=i.find((t=>t.value===n));n=void 0===t?i[0].value:t.value,e.set("_pageSize",n)}const a=e.has("_page")?e.get("_page"):this.state._page,o=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,a,e.get("_pageSize"),o)},this.syncPage=(t,e,n,i)=>{if(i>0){const a=this.calcCount(i,n);a>0&&(e>a?(t.set("_page",a),this.onChangePage(r.S,a)):e<1&&(t.set("_page",1),this.onChangePage(r.S,1)))}},this.beforePageSizeOptions=(t,e)=>{const n=[];if(Array.isArray(t))for(const e of t)"number"==typeof e&&n.push({label:(0,a.t)("kol-page-per-site",{placeholders:{entries:`${e}`}}),value:e});e.set("_pageSizeOptions",n),this.beforePageSize(n,e)},this._boundaryCount=1,this._customClass=void 0,this._label=void 0,this._hasButtons=!0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._max=void 0,this.state={_boundaryCount:1,_label:(0,a.t)("kol-pagination"),_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0}}render(){var t;let e=!1;const n=this.getCount(),s=Array.from(Array(n).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>n-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(e=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===e?(e=!1,(0,i.h)("li",{key:(0,o.n)()},(0,i.h)("span",{class:"separator","aria-hidden":"true"}))):null));return(0,i.h)(i.H,{class:"kol-pagination"},(0,i.h)("nav",{"aria-label":this.state._label},(0,i.h)("ul",{class:"navigation-list"},this.state._hasButtons.first&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:u,_hideLabel:!0,_label:(0,a.t)("kol-page-first"),_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:g,_hideLabel:!0,_label:(0,a.t)("kol-page-back"),_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),s,this.state._hasButtons.next&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"next",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:b,_hideLabel:!0,_label:(0,a.t)("kol-page-next"),_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"last",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:_,_hideLabel:!0,_label:(0,a.t)("kol-page-last"),_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&(0,i.h)(l.l,{_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:(0,a.t)("kol-entries-per-site"),_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]}))}getUnselectedPageButton(t){return(0,i.h)("li",{key:(0,o.n)()},(0,i.h)(l.a,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:e=>{this.onClick(e,t)}}},(0,i.h)("span",{slot:"expert"},(0,i.h)("span",{class:"visually-hidden"},(0,a.t)("kol-page"))," ",m.format(t))))}getSelectedPageButton(t){return(0,i.h)("li",{key:(0,o.n)()},(0,i.h)(l.a,{class:"selected",_customClass:this.state._customClass,_disabled:!0,_label:""},(0,i.h)("span",{slot:"expert"},(0,i.h)("span",{class:"visually-hidden"},(0,a.t)("kol-page"))," ",m.format(t))))}validateBoundaryCount(t){(0,c.k)(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){(0,h.v)(this,t)}validateLabel(t,e,n=!1){n||(0,s.r)(this.state._label),(0,d.v)(this,t),(0,s.a)(this.state._label)}validateHasButtons(t){(0,c.w)(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,e)=>{if("boolean"==typeof t)e.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=(0,c.p)(t)}catch(t){e.delete("_hasButtons")}"object"==typeof t&&null!==t&&e.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){(0,c.k)(this,"_page",t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize,i=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,t,n,i)}}})}validatePageSize(t){(0,c.k)(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){(0,c.g)(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){(0,c.k)(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){((t,e,n)=>{(0,c.k)(t,"_max",e,n)})(this,t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_page")?e.get("_page"):this.state._page,i=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;this.syncPage(e,n,i,t)}}})}validateTooltipAlign(t){(0,p.v)(this,t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateLabel(this._label,void 0,!0),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateMax(this._max),this.validatePage(this._page)}disconnectedCallback(){(0,s.r)(this.state._label)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_label:["validateLabel"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_max:["validateMax"],_tooltipAlign:["validateTooltipAlign"]}}};v.style={default:"@charset \"UTF-8\";\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n align-items: center;\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n grid-template-columns: 1fr auto;\n }\n .navigation-list {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: 0.5em;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .separator:before {\n content: \"•••\";\n }\n}"}},1085:(t,e,n)=>{n.d(e,{a:()=>d,b:()=>l,c:()=>r,h:()=>a,v:()=>c});var i=n(4058);const a=[0,1,2,3,4,5,6],o=/[a-zA-Z0-9äöüÄÖÜß]/g,s=/^\d+$/;function l(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(o))||void 0===e?void 0:e.length)||0}(t)>=e}function r(t){return s.test(t)}const h=new Set(["string"]),c=(t,e,n={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),h,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,n,a,o)=>{var s,h;"function"==typeof(null===(s=t.hooks)||void 0===s?void 0:s.afterPatch)&&(null===(h=t.hooks)||void 0===h||h.afterPatch(e,n,a,o)),"string"==typeof e&&!1===l(e,3)&&!1===r(e)&&(0,i.a)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(n))},d=c},1523:(t,e,n)=>{n.d(e,{b:()=>s,h:()=>a,p:()=>i,s:()=>o});let i="development";try{i="production"}catch(t){i="production"}const a=(t,e,n)=>{if(t&&e&&"string"==typeof n){const i=t.querySelector(`[slot="${n}"]`);i&&e.appendChild(i)}},o=t=>""===t,s=(t,e)=>t||e||""},28:(t,e,n)=>{n.d(e,{v:()=>a});var i=n(1853);const a=(t,e)=>{(0,i.a)(t,"_tooltipAlign",e)}},1880:(t,e,n)=>{n.d(e,{a:()=>o,r:()=>s});var i=n(6448);const a=new Set;function o(t){a.has(t)?i.L.error(`There already is a nav element with the label "${t}"`,{forceLog:!0}):a.add(t)}function s(t){a.delete(t)}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4188],{1853:(t,e,n)=>{n.d(e,{a:()=>a,v:()=>s});var i=n(4058);const a=(t,e,n)=>{(0,i.w)(t,e,(t=>"string"==typeof t&&o.includes(t)),new Set(o),n,{defaultValue:"top"})},o=["left","right","top","bottom"],s=(t,e)=>{a(t,"_align",e)}},3260:(t,e,n)=>{n.d(e,{S:()=>s,a:()=>o,b:()=>i,i:()=>a});const i=t=>"object"==typeof t&&null!==t,a=(t,e=0)=>"string"==typeof t&&t.length>=e,o=t=>{if("object"!=typeof t||null===t)return a(t,1);for(const e in t)if(!1===a(e,1))return!1;return!0},s=new Event("StateChange")},9923:(t,e,n)=>{n.d(e,{v:()=>a});var i=n(4058);const a=(t,e)=>{(0,i.i)(t,"_customClass",e,{defaultValue:void 0})}},6762:(t,e,n)=>{n.d(e,{i:()=>l,n:()=>h,r:()=>r});var i=n(1114),a=n(1523),o=n(6448);const s=()=>{let t=(0,o.d)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,o.d)(),"KoliBri",{value:t,writable:!1})),t},l=()=>{(()=>{const t=(0,o.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,o.s)(e.includes("dev-mode=true")),(0,o.b)(e.includes("experimental-mode=true")),(0,o.c)(e.includes("color-contrast-analysis=true")))}})(),o.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${i.E.kolibriVersion}\n\t`,{forceLog:!0})},r=()=>{!0!==s().adviceShown&&(Object.defineProperty(s(),"adviceShown",{get:function(){return!0}}),o.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let h=()=>Math.floor(16777215*Math.random()).toString(16);"test"===a.p&&(h=()=>"nonce")},1100:(t,e,n)=>{n.d(e,{t:()=>o});var i=n(8457),a=n(1523);let o=(t,e)=>{var n;return(null!==(n=(0,i.g)())&&void 0!==n?n:(0,i.i)("de")).translate(t,e)};"test"===a.p&&(o=t=>t)},4188:(t,e,n)=>{n.r(e),n.d(e,{kol_pagination:()=>v});var i=n(1114),a=n(1100),o=n(6762),s=n(1880),l=n(7883),r=n(3260),h=n(9923),c=n(4058),d=n(1085),p=n(28);const u={left:"codicon codicon-debug-reverse-continue"},g={left:"codicon codicon-chevron-left"},b={right:"codicon codicon-chevron-right"},_={right:"codicon codicon-debug-continue"},f=function(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}(),m=new Intl.NumberFormat(f,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),v=class{constructor(t){(0,i.r)(this,t),this.nonce=(0,o.n)(),this.calcCount=(t,e=1)=>Math.ceil(t/e),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this.onClick=(t,e)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,e),this.onChangePage(t,e)},this.onChangePage=(t,e)=>{const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,e)}))},this.onChangePageSize=(t,e)=>{if("number"==typeof(e=parseInt(e[0]))&&e>0&&this._pageSize!==e){this._pageSize=e;const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize)}))}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,e)=>{let n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;const i=e.has("_pageSizeOptions")?e.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(i)&&i.length>0){const t=i.find((t=>t.value===n));n=void 0===t?i[0].value:t.value,e.set("_pageSize",n)}const a=e.has("_page")?e.get("_page"):this.state._page,o=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,a,e.get("_pageSize"),o)},this.syncPage=(t,e,n,i)=>{if(i>0){const a=this.calcCount(i,n);a>0&&(e>a?(t.set("_page",a),this.onChangePage(r.S,a)):e<1&&(t.set("_page",1),this.onChangePage(r.S,1)))}},this.beforePageSizeOptions=(t,e)=>{const n=[];if(Array.isArray(t))for(const e of t)"number"==typeof e&&n.push({label:(0,a.t)("kol-page-per-site",{placeholders:{entries:`${e}`}}),value:e});e.set("_pageSizeOptions",n),this.beforePageSize(n,e)},this._boundaryCount=1,this._customClass=void 0,this._label=void 0,this._hasButtons=!0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._max=void 0,this.state={_boundaryCount:1,_label:(0,a.t)("kol-pagination"),_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0}}render(){var t;let e=!1;const n=this.getCount(),s=Array.from(Array(n).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>n-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(e=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===e?(e=!1,(0,i.h)("li",{key:(0,o.n)()},(0,i.h)("span",{class:"separator","aria-hidden":"true"}))):null));return(0,i.h)(i.H,{class:"kol-pagination"},(0,i.h)("nav",{"aria-label":this.state._label},(0,i.h)("ul",{class:"navigation-list"},this.state._hasButtons.first&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:u,_hideLabel:!0,_label:(0,a.t)("kol-page-first"),_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:g,_hideLabel:!0,_label:(0,a.t)("kol-page-back"),_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),s,this.state._hasButtons.next&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"next",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:b,_hideLabel:!0,_label:(0,a.t)("kol-page-next"),_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"last",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:_,_hideLabel:!0,_label:(0,a.t)("kol-page-last"),_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&(0,i.h)(l.l,{_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:(0,a.t)("kol-entries-per-site"),_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]}))}getUnselectedPageButton(t){return(0,i.h)("li",{key:(0,o.n)()},(0,i.h)(l.a,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:e=>{this.onClick(e,t)}}},(0,i.h)("span",{slot:"expert"},(0,i.h)("span",{class:"visually-hidden"},(0,a.t)("kol-page"))," ",m.format(t))))}getSelectedPageButton(t){return(0,i.h)("li",{key:(0,o.n)()},(0,i.h)(l.a,{class:"selected",_customClass:this.state._customClass,_disabled:!0,_label:""},(0,i.h)("span",{slot:"expert"},(0,i.h)("span",{class:"visually-hidden"},(0,a.t)("kol-page"))," ",m.format(t))))}validateBoundaryCount(t){(0,c.k)(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){(0,h.v)(this,t)}validateLabel(t,e,n=!1){n||(0,s.r)(this.state._label),(0,d.v)(this,t),(0,s.a)(this.state._label)}validateHasButtons(t){(0,c.w)(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,e)=>{if("boolean"==typeof t)e.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=(0,c.p)(t)}catch(t){e.delete("_hasButtons")}"object"==typeof t&&null!==t&&e.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){(0,c.k)(this,"_page",t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize,i=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,t,n,i)}}})}validatePageSize(t){(0,c.k)(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){(0,c.g)(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){(0,c.k)(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){((t,e,n)=>{(0,c.k)(t,"_max",e,n)})(this,t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_page")?e.get("_page"):this.state._page,i=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;this.syncPage(e,n,i,t)}}})}validateTooltipAlign(t){(0,p.v)(this,t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateLabel(this._label,void 0,!0),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateMax(this._max),this.validatePage(this._page)}disconnectedCallback(){(0,s.r)(this.state._label)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_label:["validateLabel"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_max:["validateMax"],_tooltipAlign:["validateTooltipAlign"]}}};v.style={default:"@charset \"UTF-8\";\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n align-items: center;\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n grid-template-columns: 1fr auto;\n }\n .navigation-list {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: 0.5em;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .separator:before {\n content: \"•••\";\n }\n}"}},1085:(t,e,n)=>{n.d(e,{a:()=>d,b:()=>l,c:()=>r,h:()=>a,v:()=>c});var i=n(4058);const a=[0,1,2,3,4,5,6],o=/[a-zA-Z0-9äöüÄÖÜß]/g,s=/^\d+$/;function l(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(o))||void 0===e?void 0:e.length)||0}(t)>=e}function r(t){return s.test(t)}const h=new Set(["string"]),c=(t,e,n={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),h,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,n,a,o)=>{var s,h;"function"==typeof(null===(s=t.hooks)||void 0===s?void 0:s.afterPatch)&&(null===(h=t.hooks)||void 0===h||h.afterPatch(e,n,a,o)),"string"==typeof e&&!1===l(e,3)&&!1===r(e)&&(0,i.a)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(n))},d=c},1523:(t,e,n)=>{n.d(e,{b:()=>s,h:()=>a,p:()=>i,s:()=>o});let i="development";try{i="production"}catch(t){i="production"}const a=(t,e,n)=>{if(t&&e&&"string"==typeof n){const i=t.querySelector(`[slot="${n}"]`);i&&e.appendChild(i)}},o=t=>""===t,s=(t,e)=>t||e||""},28:(t,e,n)=>{n.d(e,{v:()=>a});var i=n(1853);const a=(t,e)=>{(0,i.a)(t,"_tooltipAlign",e)}},1880:(t,e,n)=>{n.d(e,{a:()=>o,r:()=>s});var i=n(6448);const a=new Set;function o(t){a.has(t)?i.L.error(`There already is a nav element with the label "${t}"`,{forceLog:!0}):a.add(t)}function s(t){a.delete(t)}}}]);
|
package/dist/4332.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4332.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4332],{4332:(n,e,t)=>{t.r(e),t.d(e,{kol_link:()=>l});var i=t(
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4332],{4332:(n,e,t)=>{t.r(e),t.d(e,{kol_link:()=>l});var i=t(1114),o=t(7883),a=(n,e,t)=>new Promise(((i,o)=>{var a=n=>{try{s(t.next(n))}catch(n){o(n)}},l=n=>{try{s(t.throw(n))}catch(n){o(n)}},s=n=>n.done?i(n.value):Promise.resolve(n.value).then(a,l);s((t=t.apply(n,e)).next())}));const l=class{constructor(n){(0,i.r)(this,n),this.catchRef=n=>{this.linkWcRef=n},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._shortKey=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right"}focus(){return a(this,null,(function*(){yield this.kolFocus()}))}kolFocus(){return a(this,null,(function*(){var n;yield null===(n=this.linkWcRef)||void 0===n?void 0:n.kolFocus()}))}render(){return(0,i.h)(i.H,{key:"f52757a985c5d4a202002d432d08b8c2466f9312",class:"kol-link"},(0,i.h)(o.g,{key:"6c2a52cb20c40447ae87cfe311051f0a80b92b39",ref:this.catchRef,_accessKey:this._accessKey,_ariaCurrentValue:this._ariaCurrentValue,_ariaDescription:this._ariaDescription,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icons:this._icons,_label:this._label,_on:this._on,_role:this._role,_shortKey:this._shortKey,_tabIndex:this._tabIndex,_target:this._target,_tooltipAlign:this._tooltipAlign},(0,i.h)("slot",{key:"09fa3ec7b391f0e8c6614c968ec7730db25c707f",name:"expert",slot:"expert"})))}static get delegatesFocus(){return!0}};l.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :is(a, button) {\n align-items: baseline;\n display: inline-flex;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n :is(a, button) .kol-span-wc .span-label {\n text-decoration-line: underline;\n }\n a:is(:focus, :hover):not([aria-disabled]) .kol-span-wc .span-label,\n button:is(:focus, :hover):not([disabled]) .kol-span-wc .span-label {\n text-decoration-thickness: 0.2em;\n }\n .skip {\n left: calc(-99999rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n z-index: 9999999;\n line-height: 1;\n }\n .skip:focus {\n background-color: #fff;\n left: unset;\n padding: 1em;\n position: unset;\n }\n .kol-icon.external-link-icon {\n display: inline-flex;\n margin-left: calc(8rem / var(--kolibri-root-font-size, 16));\n }\n}"}}}]);
|