@3t-transform/threeteeui 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-8a7479e4.js → index-253ca97c.js} +239 -415
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/tttx-button.cjs.entry.js +28 -0
- package/dist/cjs/tttx-checkbox.cjs.entry.js +28 -0
- package/dist/cjs/tttx-form.cjs.entry.js +58 -0
- package/dist/cjs/tttx-single-input.cjs.entry.js +44 -0
- package/dist/cjs/tttx-text-box.cjs.entry.js +38 -0
- package/dist/cjs/tttx.cjs.js +7 -3
- package/dist/collection/collection-manifest.json +7 -5
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +61 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +93 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +30 -0
- package/dist/collection/components/atoms/tttx-single-input/tttx-single-input.css +142 -0
- package/dist/collection/components/atoms/tttx-single-input/tttx-single-input.js +259 -0
- package/dist/collection/components/atoms/tttx-single-input/tttx-single-input.stories.js +92 -0
- package/dist/collection/components/atoms/tttx-text-box/tttx-text-box.css +142 -0
- package/dist/collection/components/atoms/tttx-text-box/tttx-text-box.js +150 -0
- package/dist/collection/components/atoms/tttx-text-box/tttx-text-box.stories.js +17 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +138 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +101 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +13 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +109 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +37 -0
- package/dist/collection/icons.js +2838 -0
- package/dist/components/index.d.ts +14 -3
- package/dist/components/index.js +6 -4
- package/dist/components/{tttx-page.d.ts → tttx-button.d.ts} +4 -4
- package/dist/components/tttx-button.js +45 -0
- package/dist/components/{tttx-worksheet.d.ts → tttx-checkbox.d.ts} +4 -4
- package/dist/components/tttx-checkbox.js +46 -0
- package/dist/components/{tttx-icon.d.ts → tttx-form.d.ts} +4 -4
- package/dist/components/tttx-form.js +75 -0
- package/dist/components/tttx-single-input.d.ts +11 -0
- package/dist/components/tttx-single-input.js +71 -0
- package/dist/components/tttx-text-box.d.ts +11 -0
- package/dist/components/tttx-text-box.js +59 -0
- package/dist/esm/{index-854ff56f.js → index-fcca6c58.js} +237 -416
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/tttx-button.entry.js +24 -0
- package/dist/esm/tttx-checkbox.entry.js +24 -0
- package/dist/esm/tttx-form.entry.js +54 -0
- package/dist/esm/tttx-single-input.entry.js +40 -0
- package/dist/esm/tttx-text-box.entry.js +34 -0
- package/dist/esm/tttx.js +4 -3
- package/dist/tttx/p-05d7d002.entry.js +1 -0
- package/dist/tttx/p-40709c59.entry.js +1 -0
- package/dist/tttx/p-64703252.entry.js +1 -0
- package/dist/tttx/p-8d1f2e5c.entry.js +1 -0
- package/dist/tttx/p-9bf836ed.entry.js +1 -0
- package/dist/tttx/p-a7b95fd2.js +2 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +9 -0
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +20 -0
- package/dist/types/components/atoms/tttx-single-input/tttx-single-input.d.ts +20 -0
- package/dist/types/components/atoms/tttx-single-input/tttx-single-input.stories.d.ts +27 -0
- package/dist/types/components/atoms/tttx-text-box/tttx-text-box.d.ts +14 -0
- package/dist/types/components/atoms/tttx-text-box/tttx-text-box.stories.d.ts +6 -0
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +9 -0
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +6 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +11 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +6 -0
- package/dist/types/components.d.ts +128 -51
- package/dist/types/icons.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +59 -3
- package/loader/index.d.ts +9 -0
- package/package.json +58 -59
- package/readme.md +1 -6
- package/dist/cjs/toolbar-656be6e6.js +0 -34259
- package/dist/cjs/tttx-icon.cjs.entry.js +0 -21
- package/dist/cjs/tttx-page.cjs.entry.js +0 -927
- package/dist/cjs/tttx-worksheet.cjs.entry.js +0 -47
- package/dist/collection/components/components/tttx-icon/tttx-icon.css +0 -89
- package/dist/collection/components/components/tttx-icon/tttx-icon.js +0 -59
- package/dist/collection/components/components/tttx-icon/tttx-icon.stories.js +0 -40
- package/dist/collection/components/patterns/tttx-page/tttx-page.css +0 -162
- package/dist/collection/components/patterns/tttx-page/tttx-page.js +0 -213
- package/dist/collection/components/patterns/tttx-page/tttx-page.stories.js +0 -80
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.css +0 -134
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.js +0 -70
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.stories.js +0 -44
- package/dist/components/tttx-icon.js +0 -37
- package/dist/components/tttx-page.js +0 -953
- package/dist/components/tttx-worksheet.js +0 -6
- package/dist/components/tttx-worksheet2.js +0 -34288
- package/dist/esm/toolbar-cede4385.js +0 -34231
- package/dist/esm/tttx-icon.entry.js +0 -17
- package/dist/esm/tttx-page.entry.js +0 -923
- package/dist/esm/tttx-worksheet.entry.js +0 -43
- package/dist/tttx/p-4b57de2e.entry.js +0 -1
- package/dist/tttx/p-61f78304.entry.js +0 -1
- package/dist/tttx/p-7244abd4.entry.js +0 -1
- package/dist/tttx/p-d038fe18.js +0 -1
- package/dist/tttx/p-ddfeb0ba.js +0 -2
- package/dist/tttx/tttx.css +0 -1
- package/dist/types/components/components/tttx-icon/tttx-icon.d.ts +0 -5
- package/dist/types/components/components/tttx-icon/tttx-icon.stories.d.ts +0 -24
- package/dist/types/components/patterns/tttx-page/tttx-page.d.ts +0 -21
- package/dist/types/components/patterns/tttx-page/tttx-page.stories.d.ts +0 -48
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.d.ts +0 -9
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.stories.d.ts +0 -23
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-fcca6c58.js';
|
|
2
|
+
export { s as setNonce } from './index-fcca6c58.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
5
|
+
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchEsm = () => {
|
|
7
8
|
return promiseResolve();
|
|
@@ -10,7 +11,7 @@ const patchEsm = () => {
|
|
|
10
11
|
const defineCustomElements = (win, options) => {
|
|
11
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
13
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["tttx-
|
|
14
|
+
return bootstrapLazy([["tttx-button",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form",[[1,"tttx-form",{"dataAttribute":[1,"data-attribute"],"functionAttribute":[1,"function-attribute"]}]]],["tttx-single-input",[[1,"tttx-single-input",{"label":[1],"valid":[4],"showerrormsg":[4],"errormsg":[1],"value":[1025],"type":[1],"placeholder":[1],"pattern":[1],"iconleft":[1],"iconright":[1],"required":[4],"isfocused":[32]}]]],["tttx-text-box",[[1,"tttx-text-box",{"label":[1],"showerrormsg":[4],"errormsg":[1],"required":[4],"value":[1025],"isfocused":[32]}]]]], options);
|
|
14
15
|
});
|
|
15
16
|
};
|
|
16
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
1
|
+
var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-fcca6c58.js';
|
|
2
|
+
|
|
3
|
+
const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.button{height:36px;padding:8px 16px;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:inline-block}.spacingleft{margin-left:8px}.font-white{color:white}.font-black{color:#212121}";
|
|
4
|
+
|
|
5
|
+
const TttxButton = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.clickEvent = createEvent(this, "clickEvent", 7);
|
|
9
|
+
this.fontColor = undefined;
|
|
10
|
+
this.buttonStyle = undefined;
|
|
11
|
+
}
|
|
12
|
+
onClick() {
|
|
13
|
+
this.clickEvent.emit('clicked');
|
|
14
|
+
}
|
|
15
|
+
onClicked(event) {
|
|
16
|
+
console.log('Picked up a clickEvent', event);
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, null, h("button", { onClick: this.onClick.bind(this), class: `button ${this.fontColor} ${this.buttonStyle}` }, h("span", null, h("slot", null)))));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
TttxButton.style = tttxButtonCss;
|
|
23
|
+
|
|
24
|
+
export { TttxButton as tttx_button };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-fcca6c58.js';
|
|
2
|
+
|
|
3
|
+
const tttxCheckboxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\";font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;font-size:16px;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{height:16px;display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;color:white;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}";
|
|
4
|
+
|
|
5
|
+
const TttxCheckbox = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
9
|
+
this.value = undefined;
|
|
10
|
+
this.label = undefined;
|
|
11
|
+
this.required = undefined;
|
|
12
|
+
}
|
|
13
|
+
handleClick(event) {
|
|
14
|
+
const target = event.target;
|
|
15
|
+
this.value = target.checked;
|
|
16
|
+
this.valueChanged.emit(target.checked);
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, null, h("div", { class: "field spacing" }, this.label && h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : ''), h("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
TttxCheckbox.style = tttxCheckboxCss;
|
|
23
|
+
|
|
24
|
+
export { TttxCheckbox as tttx_checkbox };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-fcca6c58.js';
|
|
2
|
+
|
|
3
|
+
const TttxForm = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
this.formSubmit = createEvent(this, "formSubmit", 7);
|
|
7
|
+
this.fetchFormData = () => {
|
|
8
|
+
let validForm = true;
|
|
9
|
+
const formData = {};
|
|
10
|
+
const elements = this.el.querySelectorAll(`[${this.dataAttribute}]`);
|
|
11
|
+
elements.forEach((element) => {
|
|
12
|
+
const inputElement = element;
|
|
13
|
+
validForm = validForm ? this.validateFormField(inputElement) : false;
|
|
14
|
+
formData[inputElement.getAttribute(this.dataAttribute)] = inputElement.value;
|
|
15
|
+
});
|
|
16
|
+
return validForm ? formData : null;
|
|
17
|
+
};
|
|
18
|
+
this.dataAttribute = 'form-data';
|
|
19
|
+
this.functionAttribute = 'function-data';
|
|
20
|
+
}
|
|
21
|
+
validateFormField(element) {
|
|
22
|
+
let isValid = true;
|
|
23
|
+
const isRequired = element.hasAttribute("required");
|
|
24
|
+
if (isRequired && !element.value) {
|
|
25
|
+
// required and not set, show error
|
|
26
|
+
element.setAttribute("showerrormsg", "true");
|
|
27
|
+
isValid = false;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// required and set, ensure error does not show
|
|
31
|
+
element.removeAttribute("showerrormsg");
|
|
32
|
+
}
|
|
33
|
+
return isValid;
|
|
34
|
+
}
|
|
35
|
+
componentDidLoad() {
|
|
36
|
+
const elements = this.el.querySelectorAll(`[${this.functionAttribute}]`);
|
|
37
|
+
elements.forEach((element) => {
|
|
38
|
+
element.addEventListener('click', event => {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
const formData = this.fetchFormData();
|
|
41
|
+
if (formData) {
|
|
42
|
+
// only emit event if form data is valid
|
|
43
|
+
this.formSubmit.emit(this.fetchFormData());
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
return (h("div", null, h("slot", null)));
|
|
50
|
+
}
|
|
51
|
+
get el() { return getElement(this); }
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { TttxForm as tttx_form };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-fcca6c58.js';
|
|
2
|
+
|
|
3
|
+
const tttxSingleInputCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\";font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;font-size:16px;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{height:16px;display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;color:white;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}.errorstate{border-color:#DC0000}";
|
|
4
|
+
|
|
5
|
+
const TttxSingleInput = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
9
|
+
this.handleFocus = () => {
|
|
10
|
+
this.isfocused = true;
|
|
11
|
+
};
|
|
12
|
+
this.handleBlur = () => {
|
|
13
|
+
this.isfocused = false;
|
|
14
|
+
};
|
|
15
|
+
this.isfocused = false;
|
|
16
|
+
this.label = undefined;
|
|
17
|
+
this.valid = undefined;
|
|
18
|
+
this.showerrormsg = undefined;
|
|
19
|
+
this.errormsg = undefined;
|
|
20
|
+
this.value = undefined;
|
|
21
|
+
this.type = 'text';
|
|
22
|
+
this.placeholder = undefined;
|
|
23
|
+
this.pattern = undefined;
|
|
24
|
+
this.iconleft = undefined;
|
|
25
|
+
this.iconright = undefined;
|
|
26
|
+
this.required = undefined;
|
|
27
|
+
}
|
|
28
|
+
handleChange(event) {
|
|
29
|
+
const target = event.target;
|
|
30
|
+
this.value = target.value;
|
|
31
|
+
this.valueChanged.emit(target.value);
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
const inputClass = ['container', this.showerrormsg ? 'errorstate' : '', this.isfocused ? 'focused' : '', this.iconleft ? 'iconleft' : ''].join(' ');
|
|
35
|
+
return (h(Host, null, h("div", { class: "field spacing" }, this.label && h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : ''), h("div", { class: inputClass }, this.iconleft && (h("div", { class: "icon-left" }, h("span", { class: "material-symbols-rounded" }, this.iconleft))), h("input", { class: "input", onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this), type: this.type, placeholder: this.placeholder, value: this.value, onInput: event => this.handleChange(event) }), this.iconright && (h("div", { class: "icon-right" }, h("span", { class: "material-symbols-rounded" }, this.iconright)))), this.showerrormsg && this.errormsg && h("div", { class: "errormsg" }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
TttxSingleInput.style = tttxSingleInputCss;
|
|
39
|
+
|
|
40
|
+
export { TttxSingleInput as tttx_single_input };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-fcca6c58.js';
|
|
2
|
+
|
|
3
|
+
const tttxTextBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\";font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;font-size:16px;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{height:16px;display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;color:white;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}.errorstate{border-color:#DC0000}";
|
|
4
|
+
|
|
5
|
+
const TttxTextBox = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
9
|
+
this.handleFocus = () => {
|
|
10
|
+
this.isfocused = true;
|
|
11
|
+
};
|
|
12
|
+
this.handleBlur = () => {
|
|
13
|
+
this.isfocused = false;
|
|
14
|
+
};
|
|
15
|
+
this.label = undefined;
|
|
16
|
+
this.showerrormsg = undefined;
|
|
17
|
+
this.errormsg = undefined;
|
|
18
|
+
this.required = undefined;
|
|
19
|
+
this.value = undefined;
|
|
20
|
+
this.isfocused = false;
|
|
21
|
+
}
|
|
22
|
+
handleChange(event) {
|
|
23
|
+
const target = event.target;
|
|
24
|
+
this.value = target.value;
|
|
25
|
+
this.valueChanged.emit(target.value);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const inputClass = ['container', this.showerrormsg ? 'errorstate' : '', this.isfocused ? 'focused' : ''].join(' ');
|
|
29
|
+
return (h(Host, null, h("div", { class: "field spacing" }, this.label && h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : ''), h("div", { class: inputClass }, h("input", { class: "input", type: "text", value: this.value, required: this.required, onInput: event => this.handleChange(event), onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this) })), this.showerrormsg && this.errormsg && h("div", { class: "errormsg" }, this.errormsg))));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
TttxTextBox.style = tttxTextBoxCss;
|
|
33
|
+
|
|
34
|
+
export { TttxTextBox as tttx_text_box };
|
package/dist/esm/tttx.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-fcca6c58.js';
|
|
2
|
+
export { s as setNonce } from './index-fcca6c58.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.
|
|
5
|
+
Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchBrowser = () => {
|
|
7
8
|
const importMeta = import.meta.url;
|
|
@@ -13,5 +14,5 @@ const patchBrowser = () => {
|
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["tttx-
|
|
17
|
+
return bootstrapLazy([["tttx-button",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form",[[1,"tttx-form",{"dataAttribute":[1,"data-attribute"],"functionAttribute":[1,"function-attribute"]}]]],["tttx-single-input",[[1,"tttx-single-input",{"label":[1],"valid":[4],"showerrormsg":[4],"errormsg":[1],"value":[1025],"type":[1],"placeholder":[1],"pattern":[1],"iconleft":[1],"iconright":[1],"required":[4],"isfocused":[32]}]]],["tttx-text-box",[[1,"tttx-text-box",{"label":[1],"showerrormsg":[4],"errormsg":[1],"required":[4],"value":[1025],"isfocused":[32]}]]]], options);
|
|
17
18
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as o,H as s}from"./p-a7b95fd2.js";const n=class{constructor(o){i(this,o),this.valueChanged=t(this,"valueChanged",7),this.handleFocus=()=>{this.isfocused=!0},this.handleBlur=()=>{this.isfocused=!1},this.isfocused=!1,this.label=void 0,this.valid=void 0,this.showerrormsg=void 0,this.errormsg=void 0,this.value=void 0,this.type="text",this.placeholder=void 0,this.pattern=void 0,this.iconleft=void 0,this.iconright=void 0,this.required=void 0}handleChange(i){const t=i.target;this.value=t.value,this.valueChanged.emit(t.value)}render(){const i=["container",this.showerrormsg?"errorstate":"",this.isfocused?"focused":"",this.iconleft?"iconleft":""].join(" ");return o(s,null,o("div",{class:"field spacing"},this.label&&o("label",{class:"label"},this.label,this.required?"":o("span",{class:"optional"}," (optional)")),o("div",{class:i},this.iconleft&&o("div",{class:"icon-left"},o("span",{class:"material-symbols-rounded"},this.iconleft)),o("input",{class:"input",onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),type:this.type,placeholder:this.placeholder,value:this.value,onInput:i=>this.handleChange(i)}),this.iconright&&o("div",{class:"icon-right"},o("span",{class:"material-symbols-rounded"},this.iconright))),this.showerrormsg&&this.errormsg&&o("div",{class:"errormsg"},o("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg)))}};n.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded";font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;font-size:16px;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{height:16px;display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;color:white;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}.errorstate{border-color:#DC0000}';export{n as tttx_single_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as r,g as i}from"./p-a7b95fd2.js";const o=class{constructor(r){t(this,r),this.formSubmit=s(this,"formSubmit",7),this.fetchFormData=()=>{let t=!0;const s={};return this.el.querySelectorAll(`[${this.dataAttribute}]`).forEach((r=>{const i=r;t=!!t&&this.validateFormField(i),s[i.getAttribute(this.dataAttribute)]=i.value})),t?s:null},this.dataAttribute="form-data",this.functionAttribute="function-data"}validateFormField(t){let s=!0;return t.hasAttribute("required")&&!t.value?(t.setAttribute("showerrormsg","true"),s=!1):t.removeAttribute("showerrormsg"),s}componentDidLoad(){this.el.querySelectorAll(`[${this.functionAttribute}]`).forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),this.fetchFormData()&&this.formSubmit.emit(this.fetchFormData())}))}))}render(){return r("div",null,r("slot",null))}get el(){return i(this)}};export{o as tttx_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as o,h as t,H as e}from"./p-a7b95fd2.js";const n=class{constructor(t){i(this,t),this.valueChanged=o(this,"valueChanged",7),this.value=void 0,this.label=void 0,this.required=void 0}handleClick(i){const o=i.target;this.value=o.checked,this.valueChanged.emit(o.checked)}render(){return t(e,null,t("div",{class:"field spacing"},this.label&&t("label",{class:"label"},this.label,this.required?"":t("span",{class:"optional"}," (optional)")),t("input",{type:"checkbox",class:"input",onChange:i=>this.handleClick(i),checked:this.value})))}};n.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded";font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;font-size:16px;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{height:16px;display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;color:white;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}';export{n as tttx_checkbox}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as i,H as n}from"./p-a7b95fd2.js";const r=class{constructor(i){t(this,i),this.clickEvent=o(this,"clickEvent",7),this.fontColor=void 0,this.buttonStyle=void 0}onClick(){this.clickEvent.emit("clicked")}onClicked(t){console.log("Picked up a clickEvent",t)}render(){return i(n,null,i("button",{onClick:this.onClick.bind(this),class:`button ${this.fontColor} ${this.buttonStyle}`},i("span",null,i("slot",null))))}};r.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.button{height:36px;padding:8px 16px;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:inline-block}.spacingleft{margin-left:8px}.font-white{color:white}.font-black{color:#212121}';export{r as tttx_button}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as o,H as e}from"./p-a7b95fd2.js";const n=class{constructor(o){i(this,o),this.valueChanged=t(this,"valueChanged",7),this.handleFocus=()=>{this.isfocused=!0},this.handleBlur=()=>{this.isfocused=!1},this.label=void 0,this.showerrormsg=void 0,this.errormsg=void 0,this.required=void 0,this.value=void 0,this.isfocused=!1}handleChange(i){const t=i.target;this.value=t.value,this.valueChanged.emit(t.value)}render(){const i=["container",this.showerrormsg?"errorstate":"",this.isfocused?"focused":""].join(" ");return o(e,null,o("div",{class:"field spacing"},this.label&&o("label",{class:"label"},this.label,this.required?"":o("span",{class:"optional"}," (optional)")),o("div",{class:i},o("input",{class:"input",type:"text",value:this.value,required:this.required,onInput:i=>this.handleChange(i),onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this)})),this.showerrormsg&&this.errormsg&&o("div",{class:"errormsg"},this.errormsg)))}};n.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded";font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;font-size:16px;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{height:16px;display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;color:white;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}.errorstate{border-color:#DC0000}';export{n as tttx_text_box}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let t,e,n=!1;const l={},o=t=>"object"==(t=typeof t)||"function"===t;function s(t){var e,n,l;return null!==(l=null===(n=null===(e=t.head)||void 0===e?void 0:e.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const c=(t,e,...n)=>{let l=null,s=!1,c=!1;const r=[],u=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!o(l))&&(l+=""),s&&c?r[r.length-1].t+=l:r.push(s?i(null,l):l),c=s)};if(u(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const a=i(t,null);return a.l=e,r.length>0&&(a.o=r),a},i=(t,e)=>({i:0,u:t,t:e,h:null,o:null,l:null}),r={},u=t=>D(t).$,a=(t,e,n)=>{const l=u(t);return{emit:t=>f(l,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},f=(t,e,n)=>{const l=Q.ce(e,n);return t.dispatchEvent(l),l},d=new WeakMap,h=t=>"sc-"+t.m,$=(t,e,n,l,s,c)=>{if(n!==l){let i=_(t,e),r=e.toLowerCase();if("class"===e){const e=t.classList,o=y(n),s=y(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if(i||"o"!==e[0]||"n"!==e[1]){const r=o(l);if((i||r&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&c||s)&&!r&&t.setAttribute(e,l=!0===l?"":l)}else e="-"===e[2]?e.slice(3):_(J,r)?r.slice(2):r[2]+e.slice(3),n&&Q.rel(t,e,n,!1),l&&Q.ael(t,e,l,!1)}},m=/\s/,y=t=>t?t.split(m):[],p=(t,e,n,o)=>{const s=11===e.h.nodeType&&e.h.host?e.h.host:e.h,c=t&&t.l||l,i=e.l||l;for(o in c)o in i||$(s,o,c[o],void 0,n,e.i);for(o in i)$(s,o,c[o],i[o],n,e.i)},b=(e,n,l)=>{const o=n.o[l];let s,c,i=0;if(null!==o.t)s=o.h=K.createTextNode(o.t);else if(s=o.h=K.createElement(o.u),p(null,o,!1),null!=t&&s["s-si"]!==t&&s.classList.add(s["s-si"]=t),o.o)for(i=0;i<o.o.length;++i)c=b(e,o,i),c&&s.appendChild(c);return s},v=(t,n,l,o,s,c)=>{let i,r=t;for(r.shadowRoot&&r.tagName===e&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=b(null,l,s),i&&(o[s].h=i,r.insertBefore(i,n)))},w=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.h.remove()},S=(t,e)=>t.u===e.u,g=(t,e)=>{const n=e.h=t.h,l=t.o,o=e.o,s=e.t;null===s?("slot"===e.u||p(t,e,!1),null!==l&&null!==o?((t,e,n,l)=>{let o,s=0,c=0,i=e.length-1,r=e[0],u=e[i],a=l.length-1,f=l[0],d=l[a];for(;s<=i&&c<=a;)null==r?r=e[++s]:null==u?u=e[--i]:null==f?f=l[++c]:null==d?d=l[--a]:S(r,f)?(g(r,f),r=e[++s],f=l[++c]):S(u,d)?(g(u,d),u=e[--i],d=l[--a]):S(r,d)?(g(r,d),t.insertBefore(r.h,u.h.nextSibling),r=e[++s],d=l[--a]):S(u,f)?(g(u,f),t.insertBefore(u.h,r.h),u=e[--i],f=l[++c]):(o=b(e&&e[c],n,c),f=l[++c],o&&r.h.parentNode.insertBefore(o,r.h));s>i?v(t,null==l[a+1]?null:l[a+1].h,n,l,c,a):c>a&&w(e,s,i)})(n,l,e,o):null!==o?(null!==t.t&&(n.textContent=""),v(n,null,e,o,0,o.length-1)):null!==l&&w(l,0,l.length-1)):t.t!==s&&(n.data=s)},j=(t,e)=>{e&&!t.p&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.p=e)))},M=(t,e)=>{if(t.i|=16,!(4&t.i))return j(t,t.v),st((()=>k(t,e)));t.i|=512},k=(t,e)=>{const n=t.S;return e&&(t.i|=256,t.g&&(t.g.map((([t,e])=>E(n,t,e))),t.g=null)),L(void 0,(()=>C(t,n,e)))},C=async(t,e,n)=>{const l=t.$,o=l["s-rc"];n&&(t=>{const e=t.j,n=t.$,l=e.i,o=((t,e)=>{var n;let l=h(e);const o=I.get(l);if(t=11===t.nodeType?t:K,o)if("string"==typeof o){let e,c=d.get(t=t.head||t);if(c||d.set(t,c=new Set),!c.has(l)){{e=K.createElement("style"),e.innerHTML=o;const l=null!==(n=Q.M)&&void 0!==n?n:s(K);null!=l&&e.setAttribute("nonce",l),t.insertBefore(e,t.querySelector("link"))}c&&c.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);O(t,e),o&&(o.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>x(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},O=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const o=n.$,s=n.k||i(null,null),u=(t=>t&&t.u===r)(l)?l:c(null,null,l);e=o.tagName,u.u=null,u.i|=4,n.k=u,u.h=s.h=o.shadowRoot||o,t=o["s-sc"],g(s,u)})(n,l)}catch(t){z(t,n.$)}return null},x=t=>{const e=t.$,n=t.S,l=t.v;64&t.i||(t.i|=64,N(e),E(n,"componentDidLoad"),t.C(e),l||P()),t.p&&(t.p(),t.p=void 0),512&t.i&&ot((()=>M(t,!1))),t.i&=-517},P=()=>{N(K.documentElement),ot((()=>f(J,"appload",{detail:{namespace:"tttx"}})))},E=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){z(t)}},L=(t,e)=>t&&t.then?t.then(e):e(),N=t=>t.classList.add("hydrated"),T=(t,e,n)=>{if(e.O){const l=Object.entries(e.O),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>D(this).P.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=D(t),c=s.P.get(e),i=s.i,r=s.S;n=((t,e)=>null==t||o(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t)(n,l.O[e][0]),8&i&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n)||(s.P.set(e,n),r&&2==(18&i)&&M(s,!1))})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const e=new Map;s.attributeChangedCallback=function(t,n,l){Q.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},A=(t,e={})=>{var n;const l=[],o=e.exclude||[],c=J.customElements,i=K.head,r=i.querySelector("meta[charset]"),u=K.createElement("style"),a=[];let f,d=!0;Object.assign(Q,e),Q.L=new URL(e.resourcesUrl||"./",K.baseURI).href,t.map((t=>{t[1].map((e=>{const n={i:e[0],m:e[1],O:e[2],N:e[3]};n.O=e[2],n.N=e[3];const s=n.m,i=class extends HTMLElement{constructor(t){super(t),V(t=this,n),1&n.i&&t.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):Q.jmp((()=>(t=>{if(0==(1&Q.i)){const e=D(t),n=e.j,l=()=>{};if(1&e.i)H(t,e,n.N);else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){j(e,e.v=n);break}}n.O&&Object.entries(n.O).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,o)=>{if(0==(32&e.i)){{if(e.i|=32,(o=G(n)).then){const t=()=>{};o=await o,t()}o.isProxied||(T(o,n,2),o.isProxied=!0);const t=()=>{};e.i|=8;try{new o(e)}catch(t){z(t)}e.i&=-9,t()}if(o.style){let t=o.style;const e=h(n);if(!I.has(e)){const l=()=>{};((t,e,n)=>{let l=I.get(t);Y&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,I.set(t,l)})(e,t,!!(1&n.i)),l()}}}const s=e.v,c=()=>M(e,!0);s&&s["s-rc"]?s["s-rc"].push(c):c()})(0,e,n)}l()}})(this)))}disconnectedCallback(){Q.jmp((()=>(()=>{if(0==(1&Q.i)){const t=D(this);t.T&&(t.T.map((t=>t())),t.T=void 0)}})()))}componentOnReady(){return D(this).A}};n.H=t[0],o.includes(s)||c.get(s)||(l.push(s),c.define(s,T(i,n,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const t=null!==(n=Q.M)&&void 0!==n?n:s(K);null!=t&&u.setAttribute("nonce",t),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,a.length?a.map((t=>t.connectedCallback())):Q.jmp((()=>f=setTimeout(P,30)))},H=(t,e,n)=>{n&&n.map((([n,l,o])=>{const s=t,c=R(e,o),i=U(n);Q.ael(s,l,c,i),(e.T=e.T||[]).push((()=>Q.rel(s,l,c,i)))}))},R=(t,e)=>n=>{try{256&t.i?t.S[e](n):(t.g=t.g||[]).push([e,n])}catch(t){z(t)}},U=t=>0!=(2&t),W=t=>Q.M=t,q=new WeakMap,D=t=>q.get(t),F=(t,e)=>q.set(e.S=t,e),V=(t,e)=>{const n={i:0,$:t,j:e,P:new Map};return n.A=new Promise((t=>n.C=t)),t["s-p"]=[],t["s-rc"]=[],H(t,n,e.N),q.set(t,n)},_=(t,e)=>e in t,z=(t,e)=>(0,console.error)(t,e),B=new Map,G=t=>{const e=t.m.replace(/-/g,"_"),n=t.H,l=B.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(B.set(n,t),t[e])),z)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},I=new Map,J="undefined"!=typeof window?window:{},K=J.document||{head:{}},Q={i:0,L:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},X=t=>Promise.resolve(t),Y=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),Z=[],tt=[],et=(t,e)=>l=>{t.push(l),n||(n=!0,e&&4&Q.i?ot(lt):Q.raf(lt))},nt=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){z(t)}t.length=0},lt=()=>{nt(Z),nt(tt),(n=Z.length>0)&&Q.raf(lt)},ot=t=>X().then(t),st=et(tt,!0);export{r as H,A as b,a as c,u as g,c as h,X as p,F as r,W as s}
|
package/dist/tttx/tttx.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as t,b as e}from"./p-a7b95fd2.js";export{s as setNonce}from"./p-a7b95fd2.js";(()=>{const e=import.meta.url,r={};return""!==e&&(r.resourcesUrl=new URL(".",e).href),t(r)})().then((t=>e([["p-8d1f2e5c",[[1,"tttx-button",{fontColor:[1,"font-color"],buttonStyle:[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["p-64703252",[[1,"tttx-checkbox",{value:[4],label:[1],required:[4]}]]],["p-40709c59",[[1,"tttx-form",{dataAttribute:[1,"data-attribute"],functionAttribute:[1,"function-attribute"]}]]],["p-05d7d002",[[1,"tttx-single-input",{label:[1],valid:[4],showerrormsg:[4],errormsg:[1],value:[1025],type:[1],placeholder:[1],pattern:[1],iconleft:[1],iconright:[1],required:[4],isfocused:[32]}]]],["p-9bf836ed",[[1,"tttx-text-box",{label:[1],showerrormsg:[4],errormsg:[1],required:[4],value:[1025],isfocused:[32]}]]]],t)));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: string;
|
|
4
|
+
argTypes: {
|
|
5
|
+
fontColor: {
|
|
6
|
+
control: {
|
|
7
|
+
type: string;
|
|
8
|
+
options: string[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
buttonStyle: {
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
options: string[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
export declare const Default: any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
export declare class TttxSingleInput {
|
|
3
|
+
isfocused: boolean;
|
|
4
|
+
label: string;
|
|
5
|
+
valid: boolean;
|
|
6
|
+
showerrormsg: boolean;
|
|
7
|
+
errormsg: string;
|
|
8
|
+
value: string;
|
|
9
|
+
type: string;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
pattern: string;
|
|
12
|
+
iconleft: string;
|
|
13
|
+
iconright: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
valueChanged: EventEmitter<string>;
|
|
16
|
+
handleChange(event: Event): void;
|
|
17
|
+
handleFocus: () => void;
|
|
18
|
+
handleBlur: () => void;
|
|
19
|
+
render(): any;
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: string;
|
|
4
|
+
argTypes: {
|
|
5
|
+
iconleft: {
|
|
6
|
+
options: string[];
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
iconright: {
|
|
12
|
+
options: string[];
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type: {
|
|
18
|
+
options: string[];
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
export declare const Default: any;
|
|
27
|
+
export declare const Example: any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
export declare class TttxTextBox {
|
|
3
|
+
label: string;
|
|
4
|
+
showerrormsg: boolean;
|
|
5
|
+
errormsg: string;
|
|
6
|
+
required: boolean;
|
|
7
|
+
value: string;
|
|
8
|
+
isfocused: boolean;
|
|
9
|
+
valueChanged: EventEmitter<string>;
|
|
10
|
+
handleChange(event: Event): void;
|
|
11
|
+
handleFocus: () => void;
|
|
12
|
+
handleBlur: () => void;
|
|
13
|
+
render(): any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
export declare class TttxForm {
|
|
3
|
+
el: HTMLElement;
|
|
4
|
+
dataAttribute: string;
|
|
5
|
+
functionAttribute: string;
|
|
6
|
+
formSubmit: EventEmitter;
|
|
7
|
+
fetchFormData: () => {};
|
|
8
|
+
validateFormField(element: HTMLInputElement): boolean;
|
|
9
|
+
componentDidLoad(): void;
|
|
10
|
+
render(): any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/web-components';
|
|
2
|
+
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const CreateUserTemplate: Story;
|
|
5
|
+
export declare const LoginTemplate: Story;
|
|
6
|
+
export declare const TextBoxExample: Story;
|