UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

4 lines 1.57 kB
/*! * KoliBri - The accessible HTML-Standard */ "use strict";const index=require("./index-03ef29aa.js"),componentNames=require("./component-names-82c4d68d.js"),i18n=require("./i18n-b9d16ebc.js"),clsx=require("./clsx-dd4d6dd1.js"),getRenderStates=o=>{var e;const s="error"===(null===(e=o._msg)||void 0===e?void 0:e._type)&&!0===o._touched,n="string"==typeof o._hint&&o._hint.length>0,t=[];return!0===s&&t.push(`${o._id}-error`),!0===n&&t.push(`${o._id}-hint`),{hasMsg:s,hasHint:n,ariaDescribedBy:t}},CustomSuggestionsToggleFc=({onClick:o,disabled:e})=>index.h("button",{tabindex:"-1",class:"kol-custom-suggestions-toggle",onClick:o,disabled:e},index.h(componentNames.KolIconTag,{_icons:"codicon codicon-triangle-down",_label:i18n.translate("kol-dropdown")})),CustomSuggestionsOptionFc=({index:o,ref:e,selected:s,onClick:n,onMouseOver:t,onFocus:i,onKeyDown:u,option:g})=>index.h("li",{id:`option-${o}`,key:`-${o}`,ref:e,"data-index":o,tabIndex:-1,role:"option","aria-selected":s?"true":void 0,onClick:n,onMouseOver:t,onFocus:i,class:"kol-custom-suggestions-option",onKeyDown:u},g),CustomSuggestionsOptionsGroupFc=({blockSuggestionMouseOver:o,onKeyDown:e,style:s},n)=>index.h("ul",{role:"listbox",style:s,class:clsx.clsx("kol-custom-suggestions-options-group",{"kol-custom-suggestions-options-group--cursor-hidden":o}),onKeyDown:e},n);exports.CustomSuggestionsOptionFc=CustomSuggestionsOptionFc,exports.CustomSuggestionsOptionsGroupFc=CustomSuggestionsOptionsGroupFc,exports.CustomSuggestionsToggleFc=CustomSuggestionsToggleFc,exports.getRenderStates=getRenderStates;