@public-ui/components 2.0.13 → 2.0.14
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/custom-elements.json +1 -1
- package/dist/cjs/{app-globals-c3d85b0a.js → app-globals-7b5b3873.js} +1 -1
- package/dist/cjs/{app-globals-c3d85b0a.js.map → app-globals-7b5b3873.js.map} +1 -1
- package/dist/cjs/i18n-ac90ee57.js +4 -0
- package/dist/cjs/i18n-ac90ee57.js.map +1 -0
- package/dist/cjs/{i18n-7971042d.js → i18n-e10b3ac1.js} +1 -1
- package/dist/cjs/{i18n-7971042d.js.map → i18n-e10b3ac1.js.map} +1 -1
- package/dist/cjs/{index-d33b9844.js → index-926e4608.js} +1 -1
- package/dist/cjs/{index-d33b9844.js.map → index-926e4608.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
- package/dist/cjs/kol-table.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/toaster-5907cde3.js +4 -0
- package/dist/cjs/toaster-5907cde3.js.map +1 -0
- package/dist/cjs/{toaster-693061df.js → toaster-949fe63f.js} +1 -1
- package/dist/cjs/{toaster-693061df.js.map → toaster-949fe63f.js.map} +1 -1
- package/dist/components/i18n.js +1 -1
- package/dist/components/i18n.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-tabs.js.map +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toast-container.js.map +1 -1
- package/dist/esm/{app-globals-d172fbc3.js → app-globals-065709f5.js} +1 -1
- package/dist/esm/{app-globals-d172fbc3.js.map → app-globals-065709f5.js.map} +1 -1
- package/dist/esm/i18n-0c047df5.js +4 -0
- package/dist/esm/i18n-0c047df5.js.map +1 -0
- package/dist/esm/{i18n-1e6a70ea.js → i18n-7a7ff96e.js} +1 -1
- package/dist/esm/{i18n-1e6a70ea.js.map → i18n-7a7ff96e.js.map} +1 -1
- package/dist/{kolibri/index-fff5a4e2.js → esm/index-9314e6e6.js} +1 -1
- package/dist/esm/{index-fff5a4e2.js.map → index-9314e6e6.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
- package/dist/esm/kol-input.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-logo.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-symbol.entry.js +1 -1
- package/dist/esm/kol-table.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js.map +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toast-container.entry.js.map +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/toaster-521ae465.js +4 -0
- package/dist/esm/toaster-521ae465.js.map +1 -0
- package/dist/esm/{toaster-1e7f1deb.js → toaster-fd35e14e.js} +1 -1
- package/dist/esm/{toaster-1e7f1deb.js.map → toaster-fd35e14e.js.map} +1 -1
- package/dist/kolibri/app-globals-065709f5.js +4 -0
- package/dist/kolibri/i18n-0c047df5.js +4 -0
- package/dist/kolibri/i18n-0c047df5.js.map +1 -0
- package/dist/kolibri/{i18n-1e6a70ea.js → i18n-7a7ff96e.js} +1 -1
- package/dist/{esm/index-fff5a4e2.js → kolibri/index-9314e6e6.js} +1 -1
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
- package/dist/kolibri/kol-input.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-logo.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-symbol.entry.js +1 -1
- package/dist/kolibri/kol-table.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js.map +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/toaster-521ae465.js +4 -0
- package/dist/kolibri/toaster-521ae465.js.map +1 -0
- package/dist/kolibri/toaster-fd35e14e.js +4 -0
- package/dist/types/components/tabs/component.d.ts +0 -1
- package/dist/types/components/toaster/InternalToast.d.ts +4 -3
- package/dist/types/components/toaster/component.d.ts +2 -0
- package/dist/types/core/i18n.d.ts +7 -12
- package/dist/types/index.d.ts +5 -5
- package/doc/toaster.md +3 -3
- package/package.json +1 -1
- package/dist/cjs/i18n-c3fa5bd7.js +0 -4
- package/dist/cjs/i18n-c3fa5bd7.js.map +0 -1
- package/dist/cjs/toaster-62a35c5f.js +0 -4
- package/dist/cjs/toaster-62a35c5f.js.map +0 -1
- package/dist/esm/i18n-fddf0324.js +0 -4
- package/dist/esm/i18n-fddf0324.js.map +0 -1
- package/dist/esm/toaster-98560ca8.js +0 -4
- package/dist/esm/toaster-98560ca8.js.map +0 -1
- package/dist/kolibri/app-globals-d172fbc3.js +0 -4
- package/dist/kolibri/i18n-fddf0324.js +0 -4
- package/dist/kolibri/i18n-fddf0324.js.map +0 -1
- package/dist/kolibri/toaster-1e7f1deb.js +0 -4
- package/dist/kolibri/toaster-98560ca8.js +0 -4
- package/dist/kolibri/toaster-98560ca8.js.map +0 -1
- /package/dist/kolibri/{app-globals-d172fbc3.js.map → app-globals-065709f5.js.map} +0 -0
- /package/dist/kolibri/{i18n-1e6a70ea.js.map → i18n-7a7ff96e.js.map} +0 -0
- /package/dist/kolibri/{index-fff5a4e2.js.map → index-9314e6e6.js.map} +0 -0
- /package/dist/kolibri/{toaster-1e7f1deb.js.map → toaster-fd35e14e.js.map} +0 -0
package/custom-elements.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";const index=require("./index-6a8528c2.js"),index$1=require("./index-97424b25.js");index$1.setMode((e=>{try{e.shadowRoot instanceof ShadowRoot&&index.ee(e,index.j(e))}catch(e){}return"default"})),Promise.resolve().then((function(){return require("./devtools-f5b7dc5c.js")})).then((e=>{"object"==typeof e&&null!==e&&"function"==typeof e.initialize&&e.initialize()})).catch((e=>{index.Log.error(e)})),"development"===index.processEnv&&Promise.resolve().then((function(){return require("./index-
|
4
|
+
"use strict";const index=require("./index-6a8528c2.js"),index$1=require("./index-97424b25.js");index$1.setMode((e=>{try{e.shadowRoot instanceof ShadowRoot&&index.ee(e,index.j(e))}catch(e){}return"default"})),Promise.resolve().then((function(){return require("./devtools-f5b7dc5c.js")})).then((e=>{"object"==typeof e&&null!==e&&"function"==typeof e.initialize&&e.initialize()})).catch((e=>{index.Log.error(e)})),"development"===index.processEnv&&Promise.resolve().then((function(){return require("./index-926e4608.js")}));const globalFn=()=>{},appGlobalScript=globalFn,globalScripts=appGlobalScript;exports.globalScripts=globalScripts;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"app-globals-
|
1
|
+
{"file":"app-globals-7b5b3873.js","mappings":";;;;;;;;AAKAA,eAAO,CAAC,CAAC,GAAG;IACX,IAAI;QACH,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;YACzCC,QAAa,CAAC,GAAG,EAAEC,OAAe,CAAC,GAAG,CAAC,CAAC,CAAC;SACzC;KACD;IAAC,OAAO,KAAK,EAAE;KAMf;IACD,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,oDAAO,wBAAY,KAAC;KAClB,IAAI,CAAC,CAAC,QAAQ;IACd,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;QACnG,QAAQ,CAAC,UAAU,EAAE,CAAC;KACtB;AACF,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAK;IACZC,SAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAGJ,IAAIC,gBAAU,KAAK,aAAa,EAAE;IACjC,oDAAO,qBAAQ,KAAC,CAAC;AAClB,CAAC;;;;AChCW,MAAC,aAAa,GAAG;;;;","names":["setMode","setThemeStyle","getThemeDetails","Log","processEnv"],"sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { Log, processEnv } from '@public-ui/schema';\nimport { setMode } from '@stencil/core';\n\nsetMode((elm) => {\n\ttry {\n\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t}\n\t} catch (error) {\n\t\t/**\n\t\t * Try is needed for SSR.\n\t\t * - no HTMLElement is available\n\t\t * - no ShadowRoot is available\n\t\t */\n\t}\n\treturn 'default';\n});\n\nimport('./devtools')\n\t.then((devTools) => {\n\t\tif (typeof devTools === 'object' && devTools !== null && typeof devTools.initialize === 'function') {\n\t\t\tdevTools.initialize();\n\t\t}\n\t})\n\t.catch((error) => {\n\t\tLog.error(error);\n\t});\n\n/* Import scripts necessary for the development server, i.e. the /dev/*.html files. Only include in development environment. */\nif (processEnv === 'development') {\n\timport('../dev');\n}\n","import appGlobalScript from '/home/runner/work/kolibri/kolibri/packages/components/src/global/script.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/*!
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
3
|
+
*/
|
4
|
+
"use strict";const replaceAll=function(e,n,t){return e.split(n).join(t)};class I18nService{constructor(e){this.resourceMap=new Map,this.language=null!=e?e:"de"}addTranslations(e){Array.isArray(e)?e=new Set(e):"function"==typeof e&&(e=new Set([e])),void 0!==e&&e.forEach((e=>e(((e,n)=>{let t=this.resourceMap.get(e);return t||(t=new Map,this.resourceMap.set(e,t)),Object.entries(n).forEach((([e,n])=>{n&&t.set(e,n)})),e}))))}setLanguage(e){this.language=e}translate(e,n){var t;let i=null===(t=this.resourceMap.get(this.language))||void 0===t?void 0:t.get(e);return i?(null==n?void 0:n.placeholders)&&Object.entries(n.placeholders).forEach((([e,n])=>{i=replaceAll(i,`{{${e}}}`,n)})):i=e,i}}let i18n;const getI18nInstance=()=>{if(!(i18n instanceof I18nService))throw new Error("i18n not initialized yet");return i18n},initializeI18n=(e,n)=>{i18n=new I18nService(e),i18n.addTranslations(n)};exports.getI18nInstance=getI18nInstance,exports.initializeI18n=initializeI18n;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"i18n-ac90ee57.js","mappings":";;;;;AAUA,MAAM,UAAU,GAAG,UAAU,IAAY,EAAE,MAAc,EAAE,WAAmB;IAC7E,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC7C,CAAC,CAAC;MAIW,WAAW;IAIvB,YAAmB,eAA+C;QAH1D,gBAAW,GAAG,IAAI,GAAG,EAA4C,CAAC;QAIzE,IAAI,CAAC,QAAQ,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI,CAAC;KACxC;IAOM,eAAe,CACrB,YAGiF;QAEjF,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YAChC,YAAY,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;SACrC;aAAM,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE;YAC9C,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;SACvC;QAED,IAAI,YAAY,KA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I,IAAiB,CAAC;MAET,eAAe,GAAG;IAC9B,IAAI,EAAE,IAAI,YAAY,WAAW,CAAC,EAAE;QACnC,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,CAAC;AACb,EAAE;MAEW,cAAc,GAAG,CAC7B,GAAkC,EAClC,YAGiF;IAEjF,IAAI,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;AACpC;;;;;","names":[],"sources":["src/core/i18n.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\ninterface ITranslationOptions {\n\t/**\n\t * Placeholders to insert into the text. Replacing {{key}} with the specified value if the \"key\".\n\t */\n\tplaceholders?: { [K: string]: string };\n}\n\n// String.replaceAll should be used but is only available with ECMAScript 2021.\nconst replaceAll = function (text: string, search: string, replacement: string) {\n\treturn text.split(search).join(replacement);\n};\n\ntype Resources = Map<string, string>;\n\nexport class I18nService {\n\tprivate resourceMap = new Map<Generic.I18n.Locale.ISO_639_1, Resources>();\n\tlanguage: Generic.I18n.Locale.ISO_639_1;\n\n\tpublic constructor(initialLanguage?: Generic.I18n.Locale.ISO_639_1) {\n\t\tthis.language = initialLanguage ?? 'de';\n\t}\n\n\t/**\n\t * Adds a resource bundle for the specified language.\n\t * @param lng the language the bundle is for\n\t * @param translationMap the translations of the given language\n\t */\n\tpublic addTranslations(\n\t\ttranslations?:\n\t\t\t| Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string>\n\t\t\t| Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string>[]\n\t\t\t| Set<Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string>>,\n\t) {\n\t\tif (Array.isArray(translations)) {\n\t\t\ttranslations = new Set(translations);\n\t\t} else if (typeof translations === 'function') {\n\t\t\ttranslations = new Set([translations]);\n\t\t}\n\n\t\tif (translations !== undefined) {\n\t\t\ttranslations.forEach((t) =>\n\t\t\t\tt((l, t) => {\n\t\t\t\t\tlet resources = this.resourceMap.get(l);\n\t\t\t\t\tif (!resources) {\n\t\t\t\t\t\tresources = new Map<string, string>();\n\t\t\t\t\t\tthis.resourceMap.set(l, resources);\n\t\t\t\t\t}\n\n\t\t\t\t\tObject.entries(t).forEach(([k, v]) => {\n\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\tresources.set(k, v);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\treturn l;\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Set the current language.\n\t * @param lng the language the bundle is for\n\t */\n\tpublic setLanguage(lng: Generic.I18n.Locale.ISO_639_1) {\n\t\tthis.language = lng;\n\t}\n\n\t/**\n\t * Determines a human-readable translated text for the given resource key.\n\t * @param key the resource key\n\t * @param options optional translation parameters\n\t * @returns the translated text\n\t */\n\tpublic translate(key: string, options?: ITranslationOptions) {\n\t\tlet result = this.resourceMap.get(this.language)?.get(key);\n\t\tif (result) {\n\t\t\tif (options?.placeholders) {\n\t\t\t\tObject.entries(options.placeholders).forEach(([k, v]) => {\n\t\t\t\t\tresult = replaceAll(result!, `{{${k}}}`, v);\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tresult = key;\n\t\t}\n\t\treturn result;\n\t}\n}\n\nlet i18n: I18nService;\n\nexport const getI18nInstance = () => {\n\tif (!(i18n instanceof I18nService)) {\n\t\tthrow new Error('i18n not initialized yet');\n\t}\n\treturn i18n;\n};\n\nexport const initializeI18n = (\n\tlng: Generic.I18n.Locale.ISO_639_1,\n\ttranslations?:\n\t\t| Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string>\n\t\t| Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string>[]\n\t\t| Set<Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string>>,\n) => {\n\ti18n = new I18nService(lng);\n\ti18n.addTranslations(translations);\n};\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";const index=require("./index-6a8528c2.js"),i18n=require("./i18n-
|
4
|
+
"use strict";const index=require("./index-6a8528c2.js"),i18n=require("./i18n-ac90ee57.js"),locale_de={error:"Fehler",warning:"Warnung",info:"Hinweis",success:"Erfolg",message:"Nachricht",close:"Schließen","form-description":"Formular-Felder, die mit einem Sternchen (*) gekennzeichnet sind, sind Pflichtangaben.",of:"von",characters:"Zeichen",new:"Neu","no-entries":"Es sind keine Einträge vorhanden.","change-order":"Sortierung von {{colLabel}} ändern","action-running":"Aktion wird ausgeführt...","action-done":"Aktion abgeschlossen",pagination:"Paginierung","page-first":"Direkt zur ersten Seite","page-back":"Eine Seite zurück","page-next":"Eine Seite weiter","page-last":"Direkt zur letzten Seite","entries-per-site":"Einträge pro Seite",page:"Seite","page-current":"Seite {{page}}","page-selected":"Seite {{page}} ist ausgewählt","page-per-site":"{{entries}} Einträge pro Seite","nav-maximize":"Navigation maximieren","nav-minimize":"Navigation minimieren","logo-description":"Logo {{orgShort}}. Bundesadler mit Flaggenstab und Schriftzug {{orgLong}}","open-link-in-tab":"Öffnet in neuem Tab.","kolibri-logo":"Logo von KoliBri","table-pagination-label":"Paginierung für die Tabelle {{label}}","avatar-alt":"Avatar von {{name}}","toast-close-all":"Alle schließen","error-list":"Fehlerliste","error-list-message":"Bitte korrigieren Sie folgende Fehler:",version:"Versionsnummer","table-visible-range":"Einträge {{start}} bis {{end}} von {{total}}"},locale_en={error:"Error",warning:"Warning",info:"Note",success:"Success",message:"Message",close:"Close","form-description":"Form fields marked with an asterisk (*) are mandatory.",of:"of",characters:"characters",new:"New","no-entries":"No entries available.","change-order":"Change order of {{colLabel}}","action-running":"Action is running...","action-done":"Action done",pagination:"Pagination","page-first":"Directly to the first page","page-back":"One page back","page-next":"One page further","page-last":"Directly to the last page","entries-per-site":"Entries per page",page:"Page","page-current":"Page {{page}}","page-selected":"Page {{page}} is selected","page-per-site":"{{entries}} entries per page","nav-maximize":"Maximize navigation","nav-minimize":"Minimize navigation","logo-description":"Logo {{orgShort}}. Federal eagle with flag staff and lettering {{orgLong}}","open-link-in-tab":"Opens in new tab.","kolibri-logo":"KoliBri logo","table-pagination-label":"Pagination for table {{label}}","avatar-alt":"Avatar of {{name}}","toast-close-all":"Close all","error-list":"Error list","error-list-message":"Please correct the following errors",version:"Version number","table-visible-range":"Entries {{start}} to {{end}} of {{total}}"},mapLocaleKeys=e=>Object.keys(e).reduce(((n,a)=>(n[`kol-${a}`]=e[a],n)),{}),translations=new Set([e=>e("en",mapLocaleKeys(locale_en)),e=>e("de",mapLocaleKeys(locale_de))]);exports.translate=(e,n)=>{const a=i18n.getI18nInstance();let i=a.translate(e,n);return i===e&&(a.addTranslations(translations),i=a.translate(e,n)),i},"test"===index.processEnv&&(exports.translate=e=>e);
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"i18n-
|
1
|
+
{"file":"i18n-e10b3ac1.js","mappings":";;;;;;;;AAAA,kBAAe;IACd,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,WAAW;IAClB,kBAAkB,EAAE,wFAAwF;IAC5G,EAAE,EAAE,KAAK;IACT,UAAU,EAAE,SAAS;IACrB,GAAG,EAAE,KAAK;IACV,YAAY,EAAE,mCAAmC;IACjD,cAAc,EAAE,oCAAoC;IACpD,gBAAgB,EAAE,2BAA2B;IAC7C,aAAa,EAAE,sBAAsB;IACrC,UAAU,EAAE,aAAa;IACzB,YAAY,EAAE,yBAAyB;IACvC,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,0BAA0B;IACvC,kBAAkB,EAAE,oBAAoB;IACxC,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AC1D,YAAY,EAAE,oBAAoB;IAClC,iBAAiB,EAAE,WAAW;IAC9B,YAAY,EAAE,YAAY;IAC1B,oBAAoB,EAAE,qCAAqC;IAC3D,OAAO,EAAE,gBAAgB;IACzB,qBAAqB,EAAE,2CAA2C;CAClE;;AC5BD,MAAM,aAAa,GAAG,CAAC,MAAwC,KAC7D,MAAM,CAAC,IAAI,CAAC,MAAM,CAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAqD,CAAC,CAAC;AAEzJ,MAAM,YAAY,GAAG,IAAI,GAAG,CAA2F;IACtH,CAAC,CAAqH,KAAK,CAAC,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAC5J,CAAC,CAAqH,KAAK,CAAC,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CAC5J,CAAC,CAAC;AAOQA,iBAAS,GAAG,CAAC,GAA+D,EAAE,OAAiB;IACzG,MAAMC,MAAI,GAAGC,oBAAe,EAAE,CAAC;IAC/B,IAAI,IAAI,GAAGD,MAAI,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACxC,IAAI,IAAI,KAAK,GAAG,EAAE;QACjBA,MAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QACnC,IAAI,GAAGA,MAAI,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KACpC;IACD,OAAO,IAAI,CAAC;AACb,EAAE;AAEF,IAAIE,gBAAU,KAAK,MAAM,EAAE;IAC1BH,iBAAS,GAAG,CAAC,GAAG,KAAa,GAAG,CAAC;AAClC;;","names":["translate","i18n","getI18nInstance","processEnv"],"sources":["src/locales/de.ts","src/locales/en.ts","src/i18n.ts"],"sourcesContent":["export default {\n\terror: 'Fehler',\n\twarning: 'Warnung',\n\tinfo: 'Hinweis',\n\tsuccess: 'Erfolg',\n\tmessage: 'Nachricht',\n\tclose: 'Schließen',\n\t'form-description': 'Formular-Felder, die mit einem Sternchen (*) gekennzeichnet sind, sind Pflichtangaben.',\n\tof: 'von',\n\tcharacters: 'Zeichen',\n\tnew: 'Neu',\n\t'no-entries': 'Es sind keine Einträge vorhanden.',\n\t'change-order': 'Sortierung von {{colLabel}} ändern',\n\t'action-running': 'Aktion wird ausgeführt...',\n\t'action-done': 'Aktion abgeschlossen',\n\tpagination: 'Paginierung',\n\t'page-first': 'Direkt zur ersten Seite',\n\t'page-back': 'Eine Seite zurück',\n\t'page-next': 'Eine Seite weiter',\n\t'page-last': 'Direkt zur letzten Seite',\n\t'entries-per-site': 'Einträge pro Seite',\n\tpage: 'Seite',\n\t'page-current': 'Seite {{page}}',\n\t'page-selected': 'Seite {{page}} ist ausgewählt',\n\t'page-per-site': '{{entries}} Einträge pro Seite',\n\t'nav-maximize': 'Navigation maximieren',\n\t'nav-minimize': 'Navigation minimieren',\n\t'logo-description': 'Logo {{orgShort}}. Bundesadler mit Flaggenstab und Schriftzug {{orgLong}}',\n\t'open-link-in-tab': 'Öffnet in neuem Tab.',\n\t'kolibri-logo': 'Logo von KoliBri',\n\t'table-pagination-label': 'Paginierung für die Tabelle {{label}}',\n\t'avatar-alt': 'Avatar von {{name}}',\n\t'toast-close-all': 'Alle schließen',\n\t'error-list': 'Fehlerliste',\n\t'error-list-message': 'Bitte korrigieren Sie folgende Fehler:',\n\tversion: 'Versionsnummer',\n\t'table-visible-range': 'Einträge {{start}} bis {{end}} von {{total}}',\n};\n","export default {\n\terror: 'Error',\n\twarning: 'Warning',\n\tinfo: 'Note',\n\tsuccess: 'Success',\n\tmessage: 'Message',\n\tclose: 'Close',\n\t'form-description': 'Form fields marked with an asterisk (*) are mandatory.',\n\tof: 'of',\n\tcharacters: 'characters',\n\tnew: 'New',\n\t'no-entries': 'No entries available.',\n\t'change-order': 'Change order of {{colLabel}}',\n\t'action-running': 'Action is running...',\n\t'action-done': 'Action done',\n\tpagination: 'Pagination',\n\t'page-first': 'Directly to the first page',\n\t'page-back': 'One page back',\n\t'page-next': 'One page further',\n\t'page-last': 'Directly to the last page',\n\t'entries-per-site': 'Entries per page',\n\tpage: 'Page',\n\t'page-current': 'Page {{page}}',\n\t'page-selected': 'Page {{page}} is selected',\n\t'page-per-site': '{{entries}} entries per page',\n\t'nav-maximize': 'Maximize navigation',\n\t'nav-minimize': 'Minimize navigation',\n\t'logo-description': 'Logo {{orgShort}}. Federal eagle with flag staff and lettering {{orgLong}}',\n\t'open-link-in-tab': 'Opens in new tab.',\n\t'kolibri-logo': 'KoliBri logo',\n\t'table-pagination-label': 'Pagination for table {{label}}',\n\t'avatar-alt': 'Avatar of {{name}}',\n\t'toast-close-all': 'Close all',\n\t'error-list': 'Error list',\n\t'error-list-message': 'Please correct the following errors',\n\tversion: 'Version number',\n\t'table-visible-range': 'Entries {{start}} to {{end}} of {{total}}',\n};\n","import { processEnv } from '@public-ui/schema';\nimport type { Generic } from 'adopted-style-sheets';\nimport { getI18nInstance } from './core/i18n';\nimport locale_de from './locales/de';\nimport locale_en from './locales/en';\n\ntype ResourcePrefix = 'Kol';\ntype ComponentKeys = keyof typeof locale_de;\n\nconst mapLocaleKeys = (locale: { [K in ComponentKeys]: string }) =>\n\t(Object.keys(locale) as ComponentKeys[]).reduce((a, c) => ((a[`${'kol'}-${c}`] = locale[c]), a), {} as Generic.I18n.Map<ResourcePrefix, ComponentKeys>);\n\nconst translations = new Set<Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, ResourcePrefix, ComponentKeys>>([\n\t(t: (language: 'en', translationMap: Generic.I18n.Map<ResourcePrefix, ComponentKeys>) => Generic.I18n.Locale.ISO_639_1) => t('en', mapLocaleKeys(locale_en)),\n\t(t: (language: 'de', translationMap: Generic.I18n.Map<ResourcePrefix, ComponentKeys>) => Generic.I18n.Locale.ISO_639_1) => t('de', mapLocaleKeys(locale_de)),\n]);\n\ntype Options = {\n\tcount?: number;\n\tplaceholders?: { [K: string]: string };\n};\n\nexport let translate = (key: `${Lowercase<ResourcePrefix>}-${Lowercase<ComponentKeys>}`, options?: Options) => {\n\tconst i18n = getI18nInstance();\n\tlet text = i18n.translate(key, options);\n\tif (text === key) {\n\t\ti18n.addTranslations(translations);\n\t\ttext = i18n.translate(key, options);\n\t}\n\treturn text;\n};\n\nif (processEnv === 'test') {\n\ttranslate = (key): string => key;\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";switch(location.pathname){case"/dev/toaster.html":Promise.resolve().then((function(){return require("./toaster-
|
4
|
+
"use strict";switch(location.pathname){case"/dev/toaster.html":Promise.resolve().then((function(){return require("./toaster-949fe63f.js")}));break;case"/dev/input-error.html":Promise.resolve().then((function(){return require("./input-error-ac3a12f5.js")}));break;case"/dev/reprod-accordion-does-not-toggle-with-open.html":Promise.resolve().then((function(){return require("./reprod-accordion-does-not-toggle-with-open-092e559d.js")}));break;case"/dev/details-synced-open-state.html":Promise.resolve().then((function(){return require("./details-synced-open-state-e88811c7.js")}));break;case"/dev/table-render-function.html":Promise.resolve().then((function(){return require("./table-render-function-7d9ebadc.js")}))}
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"index-
|
1
|
+
{"file":"index-926e4608.js","mappings":";;;;;AAEA,QAAQ,QAAQ,CAAC,QAAQ;IACxB,KAAK,mBAAmB;QACvB,oDAAO,uBAAW,KAAC,CAAC;QACpB,MAAM;IACP,KAAK,uBAAuB;QAC3B,oDAAO,2BAAe,KAAC,CAAC;QACxB,MAAM;IACP,KAAK,sDAAsD;QAC1D,oDAAO,0DAA8C,KAAC,CAAC;QACvD,MAAM;IACP,KAAK,qCAAqC;QACzC,oDAAO,yCAA6B,KAAC,CAAC;QACtC,MAAM;IACP,KAAK,iCAAiC;QACrC,oDAAO,qCAAyB,KAAC,CAAC;QAClC,MAAM;AACR;;","names":[],"sources":["src/dev/index.ts"],"sourcesContent":["import './theme-registration';\n\nswitch (location.pathname) {\n\tcase '/dev/toaster.html':\n\t\timport('./toaster');\n\t\tbreak;\n\tcase '/dev/input-error.html':\n\t\timport('./input-error');\n\t\tbreak;\n\tcase '/dev/reprod-accordion-does-not-toggle-with-open.html':\n\t\timport('./reprod-accordion-does-not-toggle-with-open');\n\t\tbreak;\n\tcase '/dev/details-synced-open-state.html':\n\t\timport('./details-synced-open-state');\n\t\tbreak;\n\tcase '/dev/table-render-function.html':\n\t\timport('./table-render-function');\n\t\tbreak;\n}\n"],"version":3}
|
package/dist/cjs/index.cjs.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-6a8528c2.js"),ariaCurrentService=require("./ariaCurrentService-53afa476.js"),toaster=require("./toaster-5907cde3.js"),bund=require("./bund-4be96755.js");require("./component-names-4cf3e7f5.js"),require("./i18n-ac90ee57.js"),exports.KoliBriDevHelper=index.KoliBriDevHelper,exports.setCurrentLocation=ariaCurrentService.setCurrentLocation,exports.ToasterService=toaster.ToasterService,exports.bootstrap=toaster.bootstrap,exports.register=toaster.register,exports.BUNDESAEMTER=bund.BUNDESAEMTER,exports.BUNDESANSTALTEN=bund.BUNDESANSTALTEN,exports.BUNDESMINISTERIEN=bund.BUNDESMINISTERIEN,exports.BUND_LOGO_TEXT_MAP=bund.BUND_LOGO_TEXT_MAP,Object.defineProperty(exports,"Bundesamt",{enumerable:!0,get:function(){return bund.Bundesamt}}),Object.defineProperty(exports,"Bundesanstalt",{enumerable:!0,get:function(){return bund.Bundesanstalt}}),Object.defineProperty(exports,"Bundesministerium",{enumerable:!0,get:function(){return bund.Bundesministerium}});
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-e10b3ac1.js"),validation=require("./validation-cc617690.js"),componentNames=require("./component-names-4cf3e7f5.js");require("./i18n-ac90ee57.js");const Icon=e=>index.h(componentNames.KolIconTag,{class:"heading-icon",_label:"string"==typeof e.label&&e.label.length>0?"":e.ariaLabel,_icons:e.icon}),AlertIcon=e=>{switch(e.type){case"error":return index.h(Icon,{ariaLabel:i18n.translate("kol-error"),icon:"codicon codicon-error",label:e.label});case"info":return index.h(Icon,{ariaLabel:i18n.translate("kol-info"),icon:"codicon codicon-info",label:e.label});case"warning":return index.h(Icon,{ariaLabel:i18n.translate("kol-warning"),icon:"codicon codicon-warning",label:e.label});case"success":return index.h(Icon,{ariaLabel:i18n.translate("kol-success"),icon:"codicon codicon-pass",label:e.label});default:return index.h(Icon,{ariaLabel:i18n.translate("kol-message"),icon:"codicon codicon-comment",label:e.label})}},KolAlertWc=class{constructor(e){index.registerInstance(this,e),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var e;if(this.state._alert){try{index$1.Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(e){index$1.Log.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return index.h(index.Host,{key:"056ebeba8b0ebc0d76a98e3855a0022e1c689e09",class:{"kol-alert-wc":!0,alert:!0,[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},index.h("div",{key:"e2807b51c729dc7814aa46bc40f371d9b785b590",class:"heading"},index.h(AlertIcon,{key:"207367acb5c59e0977feb68adefb0a7cdb0f4668",label:this.state._label,type:this.state._type}),index.h("div",{key:"1d9b3c352e84393eb31fbd056a6aa9ec639d13cd",class:"heading-content"},"string"==typeof this.state._label&&(null===(e=this.state._label)||void 0===e?void 0:e.length)>0&&index.h(componentNames.KolHeadingWcTag,{key:"d50d4a3e93158e486ccadec92a9e0ea2d6fa6619",_label:this.state._label,_level:this.state._level}),"msg"===this.state._variant&&index.h("div",{key:"63669d4a74b60428884b10f8b6dab0f6f81c3536",class:"content"},index.h("slot",{key:"96fcaa01e83175f5f4476b38765dfc0b98c623c7"}))),this.state._hasCloser&&index.h(componentNames.KolButtonWcTag,{key:"2d07628e18f992d455c5104869aa4c54341b97c5",class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:i18n.translate("kol-close"),_on:this.on,_tooltipAlign:"left"})),"card"===this.state._variant&&index.h("div",{key:"d2825b4f83e736616f4d8808f46af958ba2391d1",class:"content"},index.h("slot",{key:"2063f32e42cc024a8f9f4fe2e66489c8c73acf71"})))}validateAlert(e){index$1.watchBoolean(this,"_alert",e)}validateHasCloser(e){index$1.validateHasCloser(this,e)}validateLabel(e){index$1.validateLabel(this,e)}validateLevel(e){validation.watchHeadingLevel(this,e)}validateOn(e){this.validateOnValue(e)&&index$1.setState(this,"_on",{onClose:e.onClose})}validateType(e){index$1.watchValidator(this,"_type",(e=>"string"==typeof e&&index$1.alertTypeOptions.includes(e)),new Set(`String {${index$1.alertTypeOptions.join(", ")}`),e)}validateVariant(e){index$1.watchValidator(this,"_variant",(e=>"string"==typeof e&&index$1.alertVariantOptions.includes(e)),new Set(`AlertVariant {${index$1.alertVariantOptions.join(", ")}`),e)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}};exports.kol_alert_wc=KolAlertWc;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-e10b3ac1.js");require("./i18n-ac90ee57.js");const formatNameAsInitial=e=>0===e.length?"":e[0].toUpperCase(),formatLabelAsInitials=e=>{const a=e.split(/\s+/),t=a.at(0),i=a.at(-1);return a.length>=2&&t&&i?`${formatNameAsInitial(t)}${formatNameAsInitial(i)}`:formatNameAsInitial(e)},KolAvatarWc=class{constructor(e){index.registerInstance(this,e),this._src=void 0,this._label=void 0,this.state={_src:"",_label:""}}render(){return index.h(index.Host,{key:"99fac7e3555c26480cdaf36d21bae55e9455b2a4",class:"kol-avatar-wc"},index.h("div",{key:"bb096bc4e6e5c9e9d4c3e07338a09d36017966fe","aria-label":i18n.translate("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"container",role:"img"},this.state._src?index.h("img",{alt:"","aria-hidden":"true",class:"image",src:this.state._src}):index.h("span",{"aria-hidden":"true",class:"initials"},formatLabelAsInitials(this.state._label.trim()))))}validateSrc(e){index$1.validateImageSource(this,e)}validateLabel(e){index$1.validateLabel(this,e,{required:!0})}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}};exports.kol_avatar_wc=KolAvatarWc;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-e10b3ac1.js"),validation=require("./validation-cc617690.js"),componentNames=require("./component-names-4cf3e7f5.js");require("./i18n-ac90ee57.js");const defaultStyleCss="/*\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: 44px;\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 44px.\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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 .hidden {\n display: none;\n visibility: hidden;\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 > div.card {\n height: 100%;\n position: relative;\n /* Visible with forced colors */\n outline: transparent solid 1px;\n }\n .close {\n position: absolute;\n top: 0;\n right: 0;\n }\n}",KolCardDefaultStyle0=defaultStyleCss,KolCard=class{constructor(e){index.registerInstance(this,e),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._on=void 0,this._hasCloser=!1,this._label=void 0,this._level=1,this.state={_label:""}}render(){return index.h(index.Host,{key:"e403d95ac0c2dcb63f004dc274435d92b189cec0",class:"kol-card"},index.h("div",{key:"e95f4bae2c92745145847c3f6f7dcd991c83e234",class:"card"},index.h("div",{key:"314c85fa6d6c32f8204e330a8b29b2f91b790d16",class:"header"},index.h(componentNames.KolHeadingWcTag,{key:"d3f2ed37cf27695ef3645f298c62ff02d295674a",_label:this.state._label,_level:this.state._level})),index.h("div",{key:"7b54507a0e770ec6f5f70073680518e7a44dda0e",class:"content"},index.h("slot",{key:"e81a3e0d7764f284baa1a0ac464c173dad53bf61"})),this.state._hasCloser&&index.h(componentNames.KolButtonWcTag,{key:"443b14fe575f486f0e61a8dd717a0ccc78247938",class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:i18n.translate("kol-close"),_on:this.on,_tooltipAlign:"left"})))}validateOn(e){this.validateOnValue(e)&&index$1.setState(this,"_on",{onClose:e.onClose})}validateHasCloser(e){index$1.validateHasCloser(this,e)}validateLabel(e){index$1.validateLabel(this,e,{required:!0})}validateLevel(e){validation.watchHeadingLevel(this,e)}componentWillLoad(){this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};KolCard.style={default:KolCardDefaultStyle0},exports.kol_card=KolCard;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-e10b3ac1.js"),componentNames=require("./component-names-4cf3e7f5.js");require("./i18n-ac90ee57.js");const KolForm=class{constructor(e){index.registerInstance(this,e),this.onSubmit=e=>{var t,i;e.preventDefault(),e.stopPropagation(),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onSubmit)&&(null===(i=this.state._on)||void 0===i||i.onSubmit(e))},this.onReset=e=>{var t,i;e.preventDefault(),e.stopPropagation(),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onReset)&&(null===(i=this.state._on)||void 0===i||i.onReset(e))},this.handleLinkClick=e=>{var t;const i=null===(t=e.target)||void 0===t?void 0:t.href;if(i){const e=new URL(i),t=document.querySelector(e.hash);t&&"function"==typeof t.focus&&(t.scrollIntoView({behavior:"smooth"}),t.focus())}},this._on=void 0,this._requiredText=!0,this._errorList=void 0,this.state={}}render(){return index.h(index.Host,{key:"8200a5548128d69edd92b943223c8da7a94cab86",class:"kol-form"},this._errorList&&this._errorList.length>0&&index.h(componentNames.KolAlertTag,{key:"9a06342471329ce2f1d50b17b06227af2a94ee95",_type:"error"},i18n.translate("kol-error-list-message"),index.h("nav",{key:"b106a5122f460b3f431a6b3f9a067fa7835120d3","aria-label":i18n.translate("kol-error-list")},index.h("ul",{key:"6192d18193f85d4f1e2a277c4f6be1ed8208f4ac"},this._errorList.map(((e,t)=>index.h("li",{key:t},index.h(componentNames.KolLinkTag,{_href:e.selector,_label:e.message,_on:{onClick:this.handleLinkClick},ref:e=>{0===t&&(this.errorListElement=e)}}))))))),index.h("form",{key:"995e9a16ab130602237fecb0c35e9e95b27e929c",method:"post",onSubmit:this.onSubmit,onReset:this.onReset,autoComplete:"off",noValidate:!0},!0===this.state._requiredText?index.h("p",null,index.h(componentNames.KolIndentedTextTag,null,i18n.translate("kol-form-description"))):"string"==typeof this.state._requiredText&&this.state._requiredText.length>0?index.h("p",null,index.h(componentNames.KolIndentedTextTag,null,this.state._requiredText)):null,index.h("slot",{key:"f3b074738cd44195ab6d8960af0a0effee60ed10"})))}async focusErrorList(){return setTimeout((()=>{var e;this._errorList&&this._errorList.length>0&&(null===(e=this.errorListElement)||void 0===e||e.focus())}),300),Promise.resolve()}validateOn(e){"object"==typeof e&&null!==e&&(this.state=Object.assign(Object.assign({},this.state),{_on:e}))}validateRequiredText(e){"boolean"==typeof e?index$1.watchBoolean(this,"_requiredText",e):index$1.watchString(this,"_requiredText",e)}validateErrorList(e){index$1.validateErrorList(this,e)}componentWillLoad(){this.validateOn(this._on),this.validateRequiredText(this._requiredText),this.validateErrorList(this._errorList)}static get watchers(){return{_on:["validateOn"],_requiredText:["validateRequiredText"],_errorList:["validateErrorList"]}}};exports.kol_form=KolForm;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-97424b25.js"),index=require("./index-6a8528c2.js"),dev_utils=require("./dev.utils-18748d0d.js"),events=require("./events-221fcb43.js"),controller$1=require("./controller-b02ed1e6.js"),InternalUnderlinedAccessKey=require("./InternalUnderlinedAccessKey-44f3fd5d.js"),controller=require("./controller-be4b3d70.js"),componentNames=require("./component-names-4cf3e7f5.js");require("./associated.controller-44964fd5.js");class InputCheckboxController extends controller.InputCheckboxRadioController{constructor(e,n,t){super(e,n,t),this.setFormAssociatedCheckboxValue=e=>{this.component._checked?this.setFormAssociatedValue(e):this.setFormAssociatedValue(null)},this.component=e}validateChecked(e){index.validateChecked(this.component,e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateIcons(e){index.watchValidator(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&(index.isString(e.checked,1)||index.isString(e.indeterminate,1)||index.isString(e.unchecked,1))),new Set(["InputCheckboxIcons"]),e,{hooks:{beforePatch:(e,n,t)=>{n.set("_icons",Object.assign(Object.assign({},t.state._icons),e))}}})}validateIndeterminate(e){index.validateIndeterminate(this.component,e)}validateValue(e){index.setState(this.component,"_value",e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateVariant(e){index.watchValidator(this.component,"_variant",(e=>"string"==typeof e&&index.inputCheckboxVariantOptions.includes(e)),new Set([`String {${index.inputCheckboxVariantOptions.join(", ")}`]),e)}componentWillLoad(){super.componentWillLoad(),this.validateChecked(this.component._checked),this.validateIcons(this.component._icons),this.validateIndeterminate(this.component._indeterminate),this.validateValue(this.component._value),this.validateVariant(this.component._variant)}}const defaultStyleCss="/*\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: 44px;\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 44px.\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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 .hidden {\n display: none;\n visibility: hidden;\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 .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}\n@layer kol-component {\n label {\n cursor: pointer;\n }\n .kol-input {\n align-items: center;\n display: grid;\n justify-items: left;\n }\n .kol-input.default,\n .kol-input.switch {\n grid-template-columns: auto 1fr;\n }\n .kol-input .input {\n align-items: center;\n display: grid;\n order: 1;\n }\n .kol-input .input div {\n display: inline-flex;\n }\n .kol-input .input input {\n margin: 0;\n }\n .kol-input label {\n order: 2;\n }\n .kol-input .hint,\n .kol-input.error > .kol-alert {\n grid-column: span 2;\n }\n .kol-input .kol-alert.error {\n order: 3;\n }\n .kol-input .hint {\n order: 4;\n }\n input {\n border-style: solid;\n border-width: 2px;\n line-height: 24px;\n }\n input[type=checkbox] {\n appearance: none;\n background-color: #fff;\n cursor: pointer;\n transition: 0.5s;\n }\n input[type=checkbox]:before {\n content: \"\";\n cursor: pointer;\n }\n input[type=checkbox]:disabled:before {\n cursor: not-allowed;\n }\n .kol-input.required .tooltip-content .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .button {\n display: grid;\n grid-template-columns: var(--a11y-min-size) auto;\n grid-template-areas: \"error error\" \"input label\" \"hint hint\";\n }\n .button:focus-within {\n /* override global `[tabindex]:focus` style */\n cursor: inherit;\n outline-color: black;\n outline-style: solid;\n }\n .button > .error {\n grid-area: error;\n }\n .button > label {\n grid-area: label;\n }\n .button > .input {\n grid-area: input;\n }\n .button > .hint {\n grid-area: hint;\n }\n .button .icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n }\n}\n@layer kol-component {\n .default .checkbox-container {\n align-items: center;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .default .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .default:not(.checked):not(.indeterminate) .icon::part(icon) {\n display: none;\n }\n .default .checkbox-input-element {\n width: 22px;\n height: 22px;\n }\n}\n@layer kol-component {\n .switch .input {\n position: relative;\n }\n .switch input[type=checkbox] {\n display: inline-block;\n height: 1.7em;\n min-width: 3.2em;\n position: relative;\n width: 3.2em;\n }\n .switch input[type=checkbox]::before {\n background-color: #000;\n height: 1.2em;\n left: calc(0.25em - 2px);\n top: calc(0.25em - 2px);\n position: absolute;\n transition: 0.5s;\n width: 1.2em;\n }\n .switch input[type=checkbox]:checked::before {\n transform: translateX(1.5em);\n }\n .switch input[type=checkbox]:indeterminate::before {\n transform: translateX(0.75em);\n }\n .switch .icon {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1.2em;\n height: 1.2em;\n position: absolute;\n z-index: 1;\n top: 50%;\n left: 4px;\n transform: translate(0, -50%);\n transition: 0.5s;\n color: #000;\n }\n .switch.checked .icon {\n transform: translate(1.5em, -50%);\n }\n .switch.indeterminate .icon {\n transform: translate(0.75em, -50%);\n }\n}\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: 44px;\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 44px.\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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 .hidden {\n display: none;\n visibility: hidden;\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 .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 1px;\n }\n}",KolInputCheckboxDefaultStyle0=defaultStyleCss,KolInputCheckbox=class{async getValue(){var e;return null===(e=this.ref)||void 0===e?void 0:e.checked}render(){const{ariaDescribedBy:e}=controller$1.getRenderStates(this.state),n=index.showExpertSlot(this.state._label);return index$1.h(index$1.Host,{key:"0d858f4103b2f2deaeea083368509527ac2d0c9a",class:"kol-input-checkbox"},index$1.h(componentNames.KolInputTag,{key:"3c0d4a465f21daf4ea739cf4e072ccf0ad0caa40",class:{checkbox:!0,[this.state._variant]:!0,"hide-label":!!this.state._hideLabel,checked:this.state._checked,indeterminate:this.state._indeterminate},"data-role":"button"===this.state._variant?"button":void 0,_accessKey:this.state._accessKey,_alert:this.state._alert,_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:this.state._id,_label:this.state._label,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},index$1.h("span",{key:"05b3a490fb64fdb41c01b5bdbb915aada95ecc33",slot:"label"},n?index$1.h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?index$1.h(index$1.Fragment,null,index$1.h(InternalUnderlinedAccessKey.InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",index$1.h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):index$1.h("span",null,this.state._label)),index$1.h("label",{key:"8c173ec29e3e8e7a0575a2c6087a32d359606a4b",slot:"input",class:"checkbox-container"},index$1.h(componentNames.KolIconTag,{key:"88373905b98825427b374b02308a8cc4c12ef048",class:"icon",_icons:this.state._indeterminate?this.state._icons.indeterminate:this.state._checked?this.state._icons.checked:this.state._icons.unchecked,_label:""}),index$1.h("input",Object.assign({key:"0119bfa82028def230f749a9191b3b72b552cdb6",class:"checkbox-input-element"+("button"===this.state._variant?" visually-hidden":""),ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,checked:this.state._checked,disabled:this.state._disabled,id:this.state._id,indeterminate:this.state._indeterminate,name:this.state._name,required:this.state._required,tabIndex:this.state._tabIndex,type:"checkbox"},this.controller.onFacade,{onInput:this.onInput,onChange:this.onChange,onClick:void 0})))))}constructor(e){index$1.registerInstance(this,e),this.catchRef=e=>{this.ref=e,index.propagateFocus(this.host,e)},this.onInput=e=>{var n;this._checked=!this._checked,this._indeterminate=!1;const t=this._checked?this.state._value:null;events.tryToDispatchKoliBriEvent("input",this.host,t),"function"==typeof(null===(n=this._on)||void 0===n?void 0:n.onInput)&&this._on.onInput(e,t)},this.onChange=e=>{var n;const t=this._checked?this.state._value:null;events.tryToDispatchKoliBriEvent("change",this.host,t),this.controller.setFormAssociatedCheckboxValue(t),"function"==typeof(null===(n=this._on)||void 0===n?void 0:n.onChange)&&this._on.onChange(e,t)},this._accessKey=void 0,this._alert=!0,this._checked=!1,this._hideError=!1,this._disabled=!1,this._error=void 0,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._indeterminate=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.state={_checked:!1,_hideError:!1,_icons:{checked:"codicon codicon-check",indeterminate:"codicon codicon-remove",unchecked:"codicon codicon-add"},_id:`id-${dev_utils.nonce()}`,_indeterminate:!1,_label:"",_value:!0,_variant:"default"},this.controller=new InputCheckboxController(this,"checkbox",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateChecked(e){this.controller.validateChecked(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateIndeterminate(e){this.controller.validateIndeterminate(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateRequired(e){this.controller.validateRequired(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}validateVariant(e){this.controller.validateVariant(e)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return index$1.getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_checked:["validateChecked"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}}};KolInputCheckbox.style={default:KolInputCheckboxDefaultStyle0},exports.kol_input_checkbox=KolInputCheckbox;
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-97424b25.js"),index=require("./index-6a8528c2.js"),dev_utils=require("./dev.utils-18748d0d.js"),events=require("./events-221fcb43.js"),controller$1=require("./controller-b02ed1e6.js"),InternalUnderlinedAccessKey=require("./InternalUnderlinedAccessKey-44f3fd5d.js"),controller=require("./controller-be4b3d70.js"),componentNames=require("./component-names-4cf3e7f5.js");require("./associated.controller-44964fd5.js");class InputCheckboxController extends controller.InputCheckboxRadioController{constructor(e,n,t){super(e,n,t),this.setFormAssociatedCheckboxValue=e=>{this.component._checked?this.setFormAssociatedValue(e):this.setFormAssociatedValue(null)},this.component=e}validateChecked(e){index.validateChecked(this.component,e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateIcons(e){index.watchValidator(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&(index.isString(e.checked,1)||index.isString(e.indeterminate,1)||index.isString(e.unchecked,1))),new Set(["InputCheckboxIcons"]),e,{hooks:{beforePatch:(e,n,t)=>{n.set("_icons",Object.assign(Object.assign({},t.state._icons),e))}}})}validateIndeterminate(e){index.validateIndeterminate(this.component,e)}validateValue(e){index.setState(this.component,"_value",e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateVariant(e){index.watchValidator(this.component,"_variant",(e=>"string"==typeof e&&index.inputCheckboxVariantOptions.includes(e)),new Set([`String {${index.inputCheckboxVariantOptions.join(", ")}`]),e)}componentWillLoad(){super.componentWillLoad(),this.validateChecked(this.component._checked),this.validateIcons(this.component._icons),this.validateIndeterminate(this.component._indeterminate),this.validateValue(this.component._value),this.validateVariant(this.component._variant)}}const defaultStyleCss="/*\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: 44px;\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 44px.\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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 .hidden {\n display: none;\n visibility: hidden;\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 .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}\n@layer kol-component {\n label {\n cursor: pointer;\n }\n .kol-input {\n align-items: center;\n display: grid;\n justify-items: left;\n }\n .kol-input.default,\n .kol-input.switch {\n grid-template-columns: auto 1fr;\n }\n .kol-input .input {\n align-items: center;\n display: grid;\n order: 1;\n }\n .kol-input .input div {\n display: inline-flex;\n }\n .kol-input .input input {\n margin: 0;\n }\n .kol-input label {\n order: 2;\n }\n .kol-input .hint,\n .kol-input.error > .kol-alert {\n grid-column: span 2;\n }\n .kol-input .kol-alert.error {\n order: 3;\n }\n .kol-input .hint {\n order: 4;\n }\n input {\n border-style: solid;\n border-width: 2px;\n line-height: 24px;\n }\n input[type=checkbox] {\n appearance: none;\n background-color: #fff;\n cursor: pointer;\n transition: 0.5s;\n }\n input[type=checkbox]:before {\n content: \"\";\n cursor: pointer;\n }\n input[type=checkbox]:disabled:before {\n cursor: not-allowed;\n }\n .kol-input.required .tooltip-content .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .button {\n display: grid;\n grid-template-columns: var(--a11y-min-size) auto;\n grid-template-areas: \"error error\" \"input label\" \"hint hint\";\n }\n .button:focus-within {\n /* override global `[tabindex]:focus` style */\n cursor: inherit;\n outline-color: black;\n outline-style: solid;\n }\n .button > .error {\n grid-area: error;\n }\n .button > label {\n grid-area: label;\n }\n .button > .input {\n grid-area: input;\n }\n .button > .hint {\n grid-area: hint;\n }\n .button .icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n }\n}\n@layer kol-component {\n .default .checkbox-container {\n align-items: center;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .default .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .default:not(.checked):not(.indeterminate) .icon::part(icon) {\n display: none;\n }\n .default .checkbox-input-element {\n width: 22px;\n height: 22px;\n }\n}\n@layer kol-component {\n .switch .input {\n position: relative;\n }\n .switch input[type=checkbox] {\n display: inline-block;\n height: 1.7em;\n min-width: 3.2em;\n position: relative;\n width: 3.2em;\n }\n .switch input[type=checkbox]::before {\n background-color: #000;\n height: 1.2em;\n left: calc(0.25em - 2px);\n top: calc(0.25em - 2px);\n position: absolute;\n transition: 0.5s;\n width: 1.2em;\n }\n .switch input[type=checkbox]:checked::before {\n transform: translateX(1.5em);\n }\n .switch input[type=checkbox]:indeterminate::before {\n transform: translateX(0.75em);\n }\n .switch .icon {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1.2em;\n height: 1.2em;\n position: absolute;\n z-index: 1;\n top: 50%;\n left: 4px;\n transform: translate(0, -50%);\n transition: 0.5s;\n color: #000;\n }\n .switch.checked .icon {\n transform: translate(1.5em, -50%);\n }\n .switch.indeterminate .icon {\n transform: translate(0.75em, -50%);\n }\n}\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: 44px;\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 44px.\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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 .hidden {\n display: none;\n visibility: hidden;\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 .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 1px;\n }\n}",KolInputCheckboxDefaultStyle0=defaultStyleCss,KolInputCheckbox=class{async getValue(){var e;return null===(e=this.ref)||void 0===e?void 0:e.checked}render(){const{ariaDescribedBy:e}=controller$1.getRenderStates(this.state),n=index.showExpertSlot(this.state._label);return index$1.h(index$1.Host,{key:"0d858f4103b2f2deaeea083368509527ac2d0c9a",class:"kol-input-checkbox"},index$1.h(componentNames.KolInputTag,{key:"3c0d4a465f21daf4ea739cf4e072ccf0ad0caa40",class:{checkbox:!0,[this.state._variant]:!0,"hide-label":!!this.state._hideLabel,checked:this.state._checked,indeterminate:this.state._indeterminate},"data-role":"button"===this.state._variant?"button":void 0,_accessKey:this.state._accessKey,_alert:this.state._alert,_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:this.state._id,_label:this.state._label,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},index$1.h("span",{key:"05b3a490fb64fdb41c01b5bdbb915aada95ecc33",slot:"label"},n?index$1.h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?index$1.h(index$1.Fragment,null,index$1.h(InternalUnderlinedAccessKey.InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",index$1.h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):index$1.h("span",null,this.state._label)),index$1.h("label",{key:"8c173ec29e3e8e7a0575a2c6087a32d359606a4b",slot:"input",class:"checkbox-container"},index$1.h(componentNames.KolIconTag,{key:"88373905b98825427b374b02308a8cc4c12ef048",class:"icon",_icons:this.state._indeterminate?this.state._icons.indeterminate:this.state._checked?this.state._icons.checked:this.state._icons.unchecked,_label:""}),index$1.h("input",Object.assign({key:"0119bfa82028def230f749a9191b3b72b552cdb6",class:"checkbox-input-element"+("button"===this.state._variant?" visually-hidden":""),ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,checked:this.state._checked,disabled:this.state._disabled,id:this.state._id,indeterminate:this.state._indeterminate,name:this.state._name,required:this.state._required,tabIndex:this.state._tabIndex,type:"checkbox"},this.controller.onFacade,{onInput:this.onInput,onChange:this.onChange,onClick:void 0})))))}constructor(e){index$1.registerInstance(this,e),this.catchRef=e=>{this.ref=e,index.propagateFocus(this.host,e)},this.onInput=e=>{var n;this._checked=!this._checked,this._indeterminate=!1;const t=this._checked?this.state._value:null;events.tryToDispatchKoliBriEvent("input",this.host,t),"function"==typeof(null===(n=this._on)||void 0===n?void 0:n.onInput)&&this._on.onInput(e,t)},this.onChange=e=>{var n;const t=this._checked?this.state._value:null;events.tryToDispatchKoliBriEvent("change",this.host,t),this.controller.setFormAssociatedCheckboxValue(t),"function"==typeof(null===(n=this._on)||void 0===n?void 0:n.onChange)&&this._on.onChange(e,t)},this._accessKey=void 0,this._alert=!0,this._checked=!1,this._hideError=!1,this._disabled=!1,this._error=void 0,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._indeterminate=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.state={_checked:!1,_hideError:!1,_icons:{checked:"codicon codicon-check",indeterminate:"codicon codicon-remove",unchecked:"codicon codicon-close"},_id:`id-${dev_utils.nonce()}`,_indeterminate:!1,_label:"",_value:!0,_variant:"default"},this.controller=new InputCheckboxController(this,"checkbox",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateChecked(e){this.controller.validateChecked(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateIndeterminate(e){this.controller.validateIndeterminate(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateRequired(e){this.controller.validateRequired(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}validateVariant(e){this.controller.validateVariant(e)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return index$1.getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_checked:["validateChecked"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}}};KolInputCheckbox.style={default:KolInputCheckboxDefaultStyle0},exports.kol_input_checkbox=KolInputCheckbox;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-input-checkbox.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;MAgBa,uBAAwB,SAAQA,uC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AAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KACxC;IAGM,eAAe,CAAC,KAAe;QACrC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KACvC;IAGM,aAAa,CAAC,KAAmC;QACvD,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KACrC;IAGM,eAAe,CAAC,KAA4B;QAClD,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KACvC;IAEM,iBAAiB;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;KACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["InputCheckboxRadioController","validateChecked","watchValidator","isString","validateIndeterminate","setState","inputCheckboxVariantOptions","getRenderStates","showExpertSlot","h","Host","KolInputTag","InternalUnderlinedAccessKey","KolIconTag","propagateFocus","tryToDispatchKoliBriEvent","nonce"],"sources":["src/components/input-checkbox/controller.ts","src/components/input-checkbox/style.scss?tag=kol-input-checkbox&mode=default&encapsulation=shadow","src/components/input-checkbox/component.tsx"],"sourcesContent":["import type {\n\tCheckedPropType,\n\tIndeterminatePropType,\n\tInputCheckboxIconsProp,\n\tInputCheckboxIconsState,\n\tInputCheckboxProps,\n\tInputCheckboxVariant,\n\tInputCheckboxWatches,\n\tStencilUnknown,\n\tStringified,\n} from '@public-ui/schema';\nimport { inputCheckboxVariantOptions, isString, setState, validateChecked, validateIndeterminate, watchValidator } from '@public-ui/schema';\n\nimport { InputCheckboxRadioController } from '../input-radio/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\nexport class InputCheckboxController extends InputCheckboxRadioController implements InputCheckboxWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly setFormAssociatedCheckboxValue = (value: StencilUnknown) => {\n\t\tif (this.component._checked) {\n\t\t\tthis.setFormAssociatedValue(value);\n\t\t} else {\n\t\t\tthis.setFormAssociatedValue(null);\n\t\t}\n\t};\n\n\tpublic validateChecked(value?: CheckedPropType): void {\n\t\tvalidateChecked(this.component, value);\n\t\tthis.setFormAssociatedCheckboxValue(this.component.state._value as StencilUnknown);\n\t}\n\n\tpublic validateIcons(value?: Stringified<InputCheckboxIconsProp>): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_icons',\n\t\t\t(value): boolean => {\n\t\t\t\treturn typeof value === 'object' && value !== null && (isString(value.checked, 1) || isString(value.indeterminate, 1) || isString(value.unchecked, 1));\n\t\t\t},\n\t\t\tnew Set(['InputCheckboxIcons']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: (nextValue: unknown, nextState: Map<string, unknown>, component: Generic.Element.Component) => {\n\t\t\t\t\t\tnextState.set('_icons', {\n\t\t\t\t\t\t\t...(component.state._icons as InputCheckboxIconsState),\n\t\t\t\t\t\t\t...(nextValue as InputCheckboxIconsProp),\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic validateIndeterminate(value?: IndeterminatePropType): void {\n\t\tvalidateIndeterminate(this.component, value);\n\t}\n\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tsetState(this.component, '_value', value);\n\t\tthis.setFormAssociatedCheckboxValue(this.component.state._value as StencilUnknown);\n\t}\n\n\tpublic validateVariant(value?: InputCheckboxVariant): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_variant',\n\t\t\t(value): boolean => typeof value === 'string' && inputCheckboxVariantOptions.includes(value),\n\t\t\tnew Set([`String {${inputCheckboxVariantOptions.join(', ')}`]),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateChecked(this.component._checked);\n\t\tthis.validateIcons(this.component._icons);\n\t\tthis.validateIndeterminate(this.component._indeterminate);\n\t\tthis.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t}\n}\n","@import '../input';\n@import 'common';\n@import 'button';\n@import 'checkbox';\n@import 'switch';\n@import '../@shared/kol-alert-mixin.scss';\n\n@include kol-alert-styles;\n","import type {\n\tCheckedPropType,\n\tHideErrorPropType,\n\tIdPropType,\n\tIndeterminatePropType,\n\tInputCheckboxAPI,\n\tInputCheckboxIconsProp,\n\tInputCheckboxStates,\n\tInputCheckboxVariant,\n\tInputTypeOnDefault,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tStencilUnknown,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '@public-ui/schema';\nimport { propagateFocus, showExpertSlot } from '@public-ui/schema';\nimport { Component, Element, Fragment, h, Host, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { nonce } from '../../utils/dev.utils';\nimport { tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { getRenderStates } from '../input/controller';\nimport { InternalUnderlinedAccessKey } from '../span/InternalUnderlinedAccessKey';\nimport { InputCheckboxController } from './controller';\n\nimport type { JSX } from '@stencil/core';\nimport { KolIconTag, KolInputTag } from '../../core/component-names';\n\n/**\n * @slot expert - Die Beschriftung der Checkbox.\n */\n@Component({\n\ttag: 'kol-input-checkbox',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolInputCheckbox implements InputCheckboxAPI {\n\t@Element() private readonly host?: HTMLKolInputCheckboxElement;\n\tprivate ref?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, ref);\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<boolean | undefined> {\n\t\treturn this.ref?.checked;\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy } = getRenderStates(this.state);\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host class=\"kol-input-checkbox\">\n\t\t\t\t<KolInputTag\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tcheckbox: true,\n\t\t\t\t\t\t[this.state._variant]: true,\n\t\t\t\t\t\t'hide-label': !!this.state._hideLabel,\n\t\t\t\t\t\tchecked: this.state._checked,\n\t\t\t\t\t\tindeterminate: this.state._indeterminate,\n\t\t\t\t\t}}\n\t\t\t\t\tdata-role={this.state._variant === 'button' ? 'button' : undefined}\n\t\t\t\t\t_accessKey={this.state._accessKey}\n\t\t\t\t\t_alert={this.state._alert}\n\t\t\t\t\t_disabled={this.state._disabled}\n\t\t\t\t\t_msg={this.state._msg}\n\t\t\t\t\t_hideError={this.state._hideError}\n\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t_id={this.state._id}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t>\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{hasExpertSlot ? (\n\t\t\t\t\t\t\t<slot name=\"expert\"></slot>\n\t\t\t\t\t\t) : typeof this.state._accessKey === 'string' ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<InternalUnderlinedAccessKey accessKey={this.state._accessKey} label={this.state._label} />{' '}\n\t\t\t\t\t\t\t\t<span class=\"access-key-hint\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t{this.state._accessKey}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span>{this.state._label}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<label slot=\"input\" class=\"checkbox-container\">\n\t\t\t\t\t\t<KolIconTag\n\t\t\t\t\t\t\tclass=\"icon\"\n\t\t\t\t\t\t\t_icons={\n\t\t\t\t\t\t\t\tthis.state._indeterminate ? this.state._icons.indeterminate : this.state._checked ? this.state._icons.checked : this.state._icons.unchecked\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_label=\"\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={`checkbox-input-element${this.state._variant === 'button' ? ' visually-hidden' : ''}`}\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\taccessKey={this.state._accessKey} // by checkbox?!\n\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\t\t\tchecked={this.state._checked}\n\t\t\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\t\tindeterminate={this.state._indeterminate}\n\t\t\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\tonInput={this.onInput}\n\t\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\t\tonClick={undefined} // onClick is not needed since onChange already triggers the correct event\n\t\t\t\t\t\t/>\n\t\t\t\t\t</label>\n\t\t\t\t</KolInputTag>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputCheckboxController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Defines whether the checkbox is checked or not. Can be read and written.\n\t * @TODO: Change type back to `CheckedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _checked?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: boolean = false;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Defines the error message text.\n\t * @deprecated Will be removed in v3. Use `msg` instead.\n\t */\n\t@Prop() public _error?: string;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<InputCheckboxIconsProp>;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Puts the checkbox in the indeterminate state, does not change the value of _checked.\n\t * @TODO: Change type back to `IndeterminatePropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _indeterminate?: boolean;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: MsgPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown> = true;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: InputCheckboxVariant = 'default';\n\n\t@State() public state: InputCheckboxStates = {\n\t\t_checked: false,\n\t\t_hideError: false,\n\t\t_icons: {\n\t\t\tchecked: 'codicon codicon-check',\n\t\t\tindeterminate: 'codicon codicon-remove',\n\t\t\tunchecked: 'codicon codicon-add',\n\t\t},\n\t\t_id: `id-${nonce()}`,\n\t\t_indeterminate: false,\n\t\t_label: '', // ⚠ required\n\t\t_value: true,\n\t\t_variant: 'default',\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new InputCheckboxController(this, 'checkbox', this.host);\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\tthis.controller.validateAlert(value);\n\t}\n\n\t@Watch('_checked')\n\tpublic validateChecked(value?: CheckedPropType): void {\n\t\tthis.controller.validateChecked(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_error')\n\tpublic validateError(value?: string): void {\n\t\tthis.controller.validateError(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<InputCheckboxIconsProp>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_indeterminate')\n\tpublic validateIndeterminate(value?: IndeterminatePropType): void {\n\t\tthis.controller.validateIndeterminate(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: MsgPropType): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: InputCheckboxVariant): void {\n\t\tthis.controller.validateVariant(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._alert = this._alert === true;\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t}\n\n\tprivate onInput = (event: Event): void => {\n\t\tthis._checked = !this._checked;\n\t\tthis._indeterminate = false;\n\n\t\tconst value = this._checked ? this.state._value : null;\n\n\t\t// Event handling\n\t\ttryToDispatchKoliBriEvent('input', this.host, value);\n\n\t\t// Callback\n\t\tif (typeof this._on?.onInput === 'function') {\n\t\t\tthis._on.onInput(event, value);\n\t\t}\n\t};\n\n\tprivate onChange = (event: Event): void => {\n\t\tconst value = this._checked ? this.state._value : null;\n\n\t\t// Event handling\n\t\t// stopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('change', this.host, value);\n\n\t\t// Static form handling\n\t\t// this.controller.setFormAssociatedValue(value);\n\t\tthis.controller.setFormAssociatedCheckboxValue(value);\n\n\t\t// Callback\n\t\tif (typeof this._on?.onChange === 'function') {\n\t\t\tthis._on.onChange(event, value);\n\t\t}\n\t};\n}\n"],"version":3}
|
1
|
+
{"file":"kol-input-checkbox.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;MA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Ac;QACrC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KACxC;IAGM,eAAe,CAAC,KAAe;QACrC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KACvC;IAGM,aAAa,CAAC,KAAmC;QACvD,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KACrC;IAGM,eAAe,CAAC,KAA4B;QAClD,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KACvC;IAEM,iBAAiB;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;KACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["InputCheckboxRadioController","validateChecked","watchValidator","isString","validateIndeterminate","setState","inputCheckboxVariantOptions","getRenderStates","showExpertSlot","h","Host","KolInputTag","InternalUnderlinedAccessKey","KolIconTag","propagateFocus","tryToDispatchKoliBriEvent","nonce"],"sources":["src/components/input-checkbox/controller.ts","src/components/input-checkbox/style.scss?tag=kol-input-checkbox&mode=default&encapsulation=shadow","src/components/input-checkbox/component.tsx"],"sourcesContent":["import type {\n\tCheckedPropType,\n\tIndeterminatePropType,\n\tInputCheckboxIconsProp,\n\tInputCheckboxIconsState,\n\tInputCheckboxProps,\n\tInputCheckboxVariant,\n\tInputCheckboxWatches,\n\tStencilUnknown,\n\tStringified,\n} from '@public-ui/schema';\nimport { inputCheckboxVariantOptions, isString, setState, validateChecked, validateIndeterminate, watchValidator } from '@public-ui/schema';\n\nimport { InputCheckboxRadioController } from '../input-radio/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\nexport class InputCheckboxController extends InputCheckboxRadioController implements InputCheckboxWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly setFormAssociatedCheckboxValue = (value: StencilUnknown) => {\n\t\tif (this.component._checked) {\n\t\t\tthis.setFormAssociatedValue(value);\n\t\t} else {\n\t\t\tthis.setFormAssociatedValue(null);\n\t\t}\n\t};\n\n\tpublic validateChecked(value?: CheckedPropType): void {\n\t\tvalidateChecked(this.component, value);\n\t\tthis.setFormAssociatedCheckboxValue(this.component.state._value as StencilUnknown);\n\t}\n\n\tpublic validateIcons(value?: Stringified<InputCheckboxIconsProp>): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_icons',\n\t\t\t(value): boolean => {\n\t\t\t\treturn typeof value === 'object' && value !== null && (isString(value.checked, 1) || isString(value.indeterminate, 1) || isString(value.unchecked, 1));\n\t\t\t},\n\t\t\tnew Set(['InputCheckboxIcons']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: (nextValue: unknown, nextState: Map<string, unknown>, component: Generic.Element.Component) => {\n\t\t\t\t\t\tnextState.set('_icons', {\n\t\t\t\t\t\t\t...(component.state._icons as InputCheckboxIconsState),\n\t\t\t\t\t\t\t...(nextValue as InputCheckboxIconsProp),\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic validateIndeterminate(value?: IndeterminatePropType): void {\n\t\tvalidateIndeterminate(this.component, value);\n\t}\n\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tsetState(this.component, '_value', value);\n\t\tthis.setFormAssociatedCheckboxValue(this.component.state._value as StencilUnknown);\n\t}\n\n\tpublic validateVariant(value?: InputCheckboxVariant): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_variant',\n\t\t\t(value): boolean => typeof value === 'string' && inputCheckboxVariantOptions.includes(value),\n\t\t\tnew Set([`String {${inputCheckboxVariantOptions.join(', ')}`]),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateChecked(this.component._checked);\n\t\tthis.validateIcons(this.component._icons);\n\t\tthis.validateIndeterminate(this.component._indeterminate);\n\t\tthis.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t}\n}\n","@import '../input';\n@import 'common';\n@import 'button';\n@import 'checkbox';\n@import 'switch';\n@import '../@shared/kol-alert-mixin.scss';\n\n@include kol-alert-styles;\n","import type {\n\tCheckedPropType,\n\tHideErrorPropType,\n\tIdPropType,\n\tIndeterminatePropType,\n\tInputCheckboxAPI,\n\tInputCheckboxIconsProp,\n\tInputCheckboxStates,\n\tInputCheckboxVariant,\n\tInputTypeOnDefault,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tStencilUnknown,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '@public-ui/schema';\nimport { propagateFocus, showExpertSlot } from '@public-ui/schema';\nimport { Component, Element, Fragment, h, Host, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { nonce } from '../../utils/dev.utils';\nimport { tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { getRenderStates } from '../input/controller';\nimport { InternalUnderlinedAccessKey } from '../span/InternalUnderlinedAccessKey';\nimport { InputCheckboxController } from './controller';\n\nimport type { JSX } from '@stencil/core';\nimport { KolIconTag, KolInputTag } from '../../core/component-names';\n\n/**\n * @slot expert - Die Beschriftung der Checkbox.\n */\n@Component({\n\ttag: 'kol-input-checkbox',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolInputCheckbox implements InputCheckboxAPI {\n\t@Element() private readonly host?: HTMLKolInputCheckboxElement;\n\tprivate ref?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, ref);\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<boolean | undefined> {\n\t\treturn this.ref?.checked;\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy } = getRenderStates(this.state);\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host class=\"kol-input-checkbox\">\n\t\t\t\t<KolInputTag\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tcheckbox: true,\n\t\t\t\t\t\t[this.state._variant]: true,\n\t\t\t\t\t\t'hide-label': !!this.state._hideLabel,\n\t\t\t\t\t\tchecked: this.state._checked,\n\t\t\t\t\t\tindeterminate: this.state._indeterminate,\n\t\t\t\t\t}}\n\t\t\t\t\tdata-role={this.state._variant === 'button' ? 'button' : undefined}\n\t\t\t\t\t_accessKey={this.state._accessKey}\n\t\t\t\t\t_alert={this.state._alert}\n\t\t\t\t\t_disabled={this.state._disabled}\n\t\t\t\t\t_msg={this.state._msg}\n\t\t\t\t\t_hideError={this.state._hideError}\n\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t_id={this.state._id}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t>\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{hasExpertSlot ? (\n\t\t\t\t\t\t\t<slot name=\"expert\"></slot>\n\t\t\t\t\t\t) : typeof this.state._accessKey === 'string' ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<InternalUnderlinedAccessKey accessKey={this.state._accessKey} label={this.state._label} />{' '}\n\t\t\t\t\t\t\t\t<span class=\"access-key-hint\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t{this.state._accessKey}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span>{this.state._label}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<label slot=\"input\" class=\"checkbox-container\">\n\t\t\t\t\t\t<KolIconTag\n\t\t\t\t\t\t\tclass=\"icon\"\n\t\t\t\t\t\t\t_icons={\n\t\t\t\t\t\t\t\tthis.state._indeterminate ? this.state._icons.indeterminate : this.state._checked ? this.state._icons.checked : this.state._icons.unchecked\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_label=\"\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={`checkbox-input-element${this.state._variant === 'button' ? ' visually-hidden' : ''}`}\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\taccessKey={this.state._accessKey} // by checkbox?!\n\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\t\t\tchecked={this.state._checked}\n\t\t\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\t\tindeterminate={this.state._indeterminate}\n\t\t\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\tonInput={this.onInput}\n\t\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\t\tonClick={undefined} // onClick is not needed since onChange already triggers the correct event\n\t\t\t\t\t\t/>\n\t\t\t\t\t</label>\n\t\t\t\t</KolInputTag>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputCheckboxController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Defines whether the checkbox is checked or not. Can be read and written.\n\t * @TODO: Change type back to `CheckedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _checked?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: boolean = false;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Defines the error message text.\n\t * @deprecated Will be removed in v3. Use `msg` instead.\n\t */\n\t@Prop() public _error?: string;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<InputCheckboxIconsProp>;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Puts the checkbox in the indeterminate state, does not change the value of _checked.\n\t * @TODO: Change type back to `IndeterminatePropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _indeterminate?: boolean;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: MsgPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown> = true;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: InputCheckboxVariant = 'default';\n\n\t@State() public state: InputCheckboxStates = {\n\t\t_checked: false,\n\t\t_hideError: false,\n\t\t_icons: {\n\t\t\tchecked: 'codicon codicon-check',\n\t\t\tindeterminate: 'codicon codicon-remove',\n\t\t\tunchecked: 'codicon codicon-close',\n\t\t},\n\t\t_id: `id-${nonce()}`,\n\t\t_indeterminate: false,\n\t\t_label: '', // ⚠ required\n\t\t_value: true,\n\t\t_variant: 'default',\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new InputCheckboxController(this, 'checkbox', this.host);\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\tthis.controller.validateAlert(value);\n\t}\n\n\t@Watch('_checked')\n\tpublic validateChecked(value?: CheckedPropType): void {\n\t\tthis.controller.validateChecked(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_error')\n\tpublic validateError(value?: string): void {\n\t\tthis.controller.validateError(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<InputCheckboxIconsProp>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_indeterminate')\n\tpublic validateIndeterminate(value?: IndeterminatePropType): void {\n\t\tthis.controller.validateIndeterminate(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: MsgPropType): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: InputCheckboxVariant): void {\n\t\tthis.controller.validateVariant(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._alert = this._alert === true;\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t}\n\n\tprivate onInput = (event: Event): void => {\n\t\tthis._checked = !this._checked;\n\t\tthis._indeterminate = false;\n\n\t\tconst value = this._checked ? this.state._value : null;\n\n\t\t// Event handling\n\t\ttryToDispatchKoliBriEvent('input', this.host, value);\n\n\t\t// Callback\n\t\tif (typeof this._on?.onInput === 'function') {\n\t\t\tthis._on.onInput(event, value);\n\t\t}\n\t};\n\n\tprivate onChange = (event: Event): void => {\n\t\tconst value = this._checked ? this.state._value : null;\n\n\t\t// Event handling\n\t\t// stopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('change', this.host, value);\n\n\t\t// Static form handling\n\t\t// this.controller.setFormAssociatedValue(value);\n\t\tthis.controller.setFormAssociatedCheckboxValue(value);\n\n\t\t// Callback\n\t\tif (typeof this._on?.onChange === 'function') {\n\t\t\tthis._on.onChange(event, value);\n\t\t}\n\t};\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-e10b3ac1.js"),formFieldMsg=require("./form-field-msg-4194be2d.js"),componentNames=require("./component-names-4cf3e7f5.js");function r(e){var t,i,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(i=r(e[t]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}function clsx(){for(var e,t,i=0,s="",o=arguments.length;i<o;i++)(e=arguments[i])&&(t=r(e))&&(s&&(s+=" "),s+=t);return s}require("./i18n-ac90ee57.js");const KolInput=class{constructor(e){index.registerInstance(this,e),this.slotName="input",this.catchInputSlot=e=>{index$1.handleSlotContent(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._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,s,o,n,a,d,l,h,r,c;const _=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),f=!this._readOnly&&_&&!0===this._touched,u=Boolean(f||"error"!==(null===(i=this._msg)||void 0===i?void 0:i._type)&&(null===(s=this._msg)||void 0===s?void 0:s._description)),b=index$1.showExpertSlot(this._label),g="string"==typeof this._hint&&this._hint.length>0,m=!b&&this._hideLabel;return index.h(index.Host,{key:"8252bdffbfd6563aeaf125b5b67e9d55f2583bda",class:clsx("kol-input",this.getModifierClassNameByMsgType(),{disabled:!0===this._disabled,error:!0===f,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-error":!0===this._hideError})},index.h("label",{key:"5b687b0fc10212e4ad903975682c571c351f499f",class:"input-label",id:m?void 0:`${this._id}-label`,hidden:m,htmlFor:this._id},index.h("span",{key:"a27ab1747c51e0ef950312eae7f6a3eb4fb92cc8",class:"input-label-span"},index.h("slot",{key:"ea7c6f61e71e2f665c55c4240c54358f1f5c65e1",name:"label"}))),g&&index.h("span",{key:"92a7226e070e588bfb423726a55d88c3ddf33149",class:"hint",id:`${this._id}-hint`},this._hint),index.h("div",{key:"f07afe67765e4e267c633f94fd0ce240a12d97ae",class:{input:!0,"icon-left":"object"==typeof(null===(o=this._icons)||void 0===o?void 0:o.left),"icon-right":"object"==typeof(null===(n=this._icons)||void 0===n?void 0:n.right)}},(null===(a=this._icons)||void 0===a?void 0:a.left)&&index.h(componentNames.KolIconTag,{key:"ec32c7a63bddaaa7797d8fcfd1bd6d56870241ed",_label:"",_icons:(null===(d=this._icons)||void 0===d?void 0:d.left).icon,style:this.getIconStyles(null===(l=this._icons)||void 0===l?void 0:l.left)}),index.h("div",{key:"40134dcfd7e5ffeed24b16b4c70ccacf2e7b5c26",ref:this.catchInputSlot,id:this.slotName,class:"input-slot"}),"object"==typeof this._smartButton&&null!==this._smartButton&&index.h(componentNames.KolButtonWcTag,{key:"488299e9041bdbf0ffc7fc93f2fbb1ce838e35cf",_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===(h=this._icons)||void 0===h?void 0:h.right)&&index.h(componentNames.KolIconTag,{key:"3f24020b19c35572293fecde959feeecfe0e8847",_label:"",_icons:(null===(r=this._icons)||void 0===r?void 0:r.right).icon,style:this.getIconStyles(null===(c=this._icons)||void 0===c?void 0:c.right)})),m&&index.h(componentNames.KolTooltipWcTag,{key:"6b5d44a5ae88228110ed4e2d39eea2e3aca2a708","aria-hidden":"true",class:"input-tooltip",_accessKey:this._accessKey,_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),u&&index.h(formFieldMsg.FormFieldMsg,{key:"f41ba0206412d499fe66325e4f3893620c0fb5d5",_alert:this._alert,_hideError:this._hideError,_msg:this._msg,_id:this._id}),Array.isArray(this._suggestions)&&this._suggestions.length>0&&index.h("datalist",{key:"7d4502e1e3a81e2c5e51437a7fafef665a0bb8d6",id:`${this._id}-list`},this._suggestions.map((e=>index.h("option",{value:e})))),this._hasCounter&&index.h("span",{key:"12acf32b3b95f150100c8f402a739a91dd1e0ab3",class:"counter","aria-atomic":"true","aria-live":"polite"},this._currentLength,this._maxLength&&index.h(index.Fragment,null,index.h("span",{key:"9ce173b5e3eb5309ff158796b2de80a35966f5a4","aria-label":i18n.translate("kol-of"),role:"img"},"/"),this._maxLength)," ",index.h("span",{key:"e6b4a93cca61a4a6ff1957ff46d1701b12dae253"},i18n.translate("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 index.getElement(this)}};exports.kol_input=KolInput;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-97424b25.js"),index$1=require("./index-6a8528c2.js"),i18n=require("./i18n-e10b3ac1.js");require("./i18n-ac90ee57.js");const defaultStyleCss="/*\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: 44px;\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 44px.\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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 .hidden {\n display: none;\n visibility: hidden;\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: inline-block;\n }\n text {\n font-size: 90px;\n letter-spacing: normal;\n word-spacing: normal;\n }\n svg {\n max-height: 100%;\n }\n}",KolKolibriDefaultStyle0=defaultStyleCss,KolKolibri=class{constructor(e){index.registerInstance(this,e),this.handleColorChange=(e,n)=>{if("string"==typeof e){const t=index$1.colorRgba(e);n.set("_color",{red:t[0],green:t[1],blue:t[2]})}else index$1.devHint("[KolKolibri] You used the complex color schema. For the KoliBri we use need the color as hex string.")},this._color="#003c78",this._labeled=!0,this.state={_color:{red:0,green:60,blue:120},_labeled:!0}}render(){const e=`rgb(${this.state._color.red},${this.state._color.green},${this.state._color.blue})`;return index.h(index.Host,{key:"564ebf5b7bcc35a66ac119a885d840060388952d",class:"kol-kolibri"},index.h("svg",{key:"eab498755abb03ff07828d355b336b763be71729",role:"img","aria-label":i18n.translate("kol-kolibri-logo"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 600 600",fill:e},index.h("path",{key:"150506ef641f670458fa9a767629a692d2db9ef1",d:"M353 322L213 304V434L353 322Z"}),index.h("path",{key:"3a71e89612ccaf509c13a50c307b6fed0088b4ff",d:"M209 564V304L149 434L209 564Z"}),index.h("path",{key:"62e3558e0d84fa6de0f725cbb9f771d216209c4c",d:"M357 316L417 250L361 210L275 244L357 316Z"}),index.h("path",{key:"d7090215e7e76f48658b9efabccac047e47b6f7a",d:"M329 218L237 92L250 222L272 241L329 218Z"}),index.h("path",{key:"e70cf3e2dd7940c85ac530e98ad8bdd0b4e13d36",d:"M353 318L35 36L213 300L353 318Z"}),index.h("path",{key:"948d2b59cd8879af0eacf38f2ba12ece66c3aa86",d:"M391 286L565 272L421 252L391 286Z"}),!0===this.state._labeled&&index.h("text",{key:"0e96553dc0e8b3796e618154f23adafd9b6061b2",x:"250",y:"525",fill:e},"KoliBri")))}validateColor(e){index$1.validateColor(this,e,{defaultValue:"#003c78",hooks:{beforePatch:this.handleColorChange}})}validateLabeled(e){index$1.watchBoolean(this,"_labeled",e,{defaultValue:!0})}componentWillLoad(){this.validateColor(this._color),this.validateLabeled(this._labeled)}static get watchers(){return{_color:["validateColor"],_labeled:["validateLabeled"]}}};KolKolibri.style={default:KolKolibriDefaultStyle0},exports.kol_kolibri=KolKolibri;
|