@gov-design-system-ce/components 4.2.4 → 4.2.6
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/core.cjs.js +1 -1
- package/dist/cjs/gov-flex_3.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-input_2.cjs.entry.js +2 -15
- package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +7 -20
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js.map +1 -1
- package/dist/collection/pages/Loading.js +5 -1
- package/dist/collection/pages/Loading.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-blockquote.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-range.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-link.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/{p-abea96cf.js → p-4fb591c3.js} +2 -2
- package/dist/components/{p-043a676e.js → p-5697ee30.js} +2 -2
- package/dist/components/{p-2b33d27c.js → p-8a9d4e12.js} +2 -2
- package/dist/components/{p-bd393ff0.js → p-8d1d7dd5.js} +2 -2
- package/dist/components/{p-90657523.js → p-a7917b98.js} +2 -2
- package/dist/components/p-b60d627f.js +2 -0
- package/dist/components/p-b60d627f.js.map +1 -0
- package/dist/components/{p-cbe3bc71.js → p-d2d05f02.js} +2 -2
- package/dist/components/{p-b56d6b99.js → p-ffc3a0df.js} +2 -2
- package/dist/core/core.css +20 -18
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-9e5eb19a.entry.js → p-2c52dcc9.entry.js} +2 -2
- package/dist/core/p-68b63bde.entry.js +2 -0
- package/dist/core/p-68b63bde.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-flex_3.entry.js +1 -1
- package/dist/esm/gov-form-input_2.entry.js +2 -15
- package/dist/esm/gov-form-input_2.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +7 -20
- package/dist/hydrate/index.mjs +7 -20
- package/dist/types/components/gov-loading/skeleton/gov-skeleton.d.ts +2 -6
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/components/p-313b4611.js +0 -2
- package/dist/components/p-313b4611.js.map +0 -1
- package/dist/core/p-b9f1c2ef.entry.js +0 -2
- package/dist/core/p-b9f1c2ef.entry.js.map +0 -1
- /package/dist/components/{p-abea96cf.js.map → p-4fb591c3.js.map} +0 -0
- /package/dist/components/{p-043a676e.js.map → p-5697ee30.js.map} +0 -0
- /package/dist/components/{p-2b33d27c.js.map → p-8a9d4e12.js.map} +0 -0
- /package/dist/components/{p-bd393ff0.js.map → p-8d1d7dd5.js.map} +0 -0
- /package/dist/components/{p-90657523.js.map → p-a7917b98.js.map} +0 -0
- /package/dist/components/{p-cbe3bc71.js.map → p-d2d05f02.js.map} +0 -0
- /package/dist/components/{p-b56d6b99.js.map → p-ffc3a0df.js.map} +0 -0
- /package/dist/core/{p-9e5eb19a.entry.js.map → p-2c52dcc9.entry.js.map} +0 -0
package/dist/hydrate/index.mjs
CHANGED
|
@@ -6413,7 +6413,7 @@ const IconClass = {
|
|
|
6413
6413
|
holder: 'gov-icon__holder',
|
|
6414
6414
|
};
|
|
6415
6415
|
|
|
6416
|
-
const version = "4.2.
|
|
6416
|
+
const version = "4.2.6";
|
|
6417
6417
|
|
|
6418
6418
|
const dsVersion = () => {
|
|
6419
6419
|
return version;
|
|
@@ -7215,27 +7215,14 @@ class GovSkeleton {
|
|
|
7215
7215
|
init() {
|
|
7216
7216
|
this.items.fill(1);
|
|
7217
7217
|
}
|
|
7218
|
-
get style() {
|
|
7219
|
-
const dimenssionsStyles = {
|
|
7220
|
-
width: null,
|
|
7221
|
-
height: null,
|
|
7222
|
-
};
|
|
7223
|
-
if (this.width) {
|
|
7224
|
-
dimenssionsStyles.width = this.width;
|
|
7225
|
-
}
|
|
7226
|
-
if (this.height) {
|
|
7227
|
-
dimenssionsStyles.height = this.height;
|
|
7228
|
-
}
|
|
7229
|
-
return Object.assign({}, dimenssionsStyles);
|
|
7230
|
-
}
|
|
7231
7218
|
render() {
|
|
7232
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
7219
|
+
return (hAsync(Host, Object.assign({ key: '3bad110a20779275c899c8a8d5d1086ec4cf59fd', size: this.size, color: this.color, class: {
|
|
7233
7220
|
[SkeletonClass.root]: true,
|
|
7234
7221
|
circle: this.shape === "circle",
|
|
7235
7222
|
line: this.shape === "line",
|
|
7236
7223
|
progress: this.animation === "progress",
|
|
7237
7224
|
pulse: this.animation === "pulse",
|
|
7238
|
-
} }, this.inheritedAttributes, { "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", role: "progressbar", tabindex: "0", style: this.
|
|
7225
|
+
} }, this.inheritedAttributes, { "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", role: "progressbar", tabindex: "0", style: { width: this.width, height: this.height } })));
|
|
7239
7226
|
}
|
|
7240
7227
|
get host() { return getElement(this); }
|
|
7241
7228
|
static get watchers() { return {
|
|
@@ -7247,17 +7234,17 @@ class GovSkeleton {
|
|
|
7247
7234
|
"$flags$": 0,
|
|
7248
7235
|
"$tagName$": "gov-skeleton",
|
|
7249
7236
|
"$members$": {
|
|
7250
|
-
"size": [
|
|
7237
|
+
"size": [513],
|
|
7251
7238
|
"color": [1],
|
|
7252
7239
|
"shape": [1],
|
|
7253
|
-
"width": [
|
|
7254
|
-
"height": [
|
|
7240
|
+
"width": [513],
|
|
7241
|
+
"height": [513],
|
|
7255
7242
|
"animation": [1],
|
|
7256
7243
|
"inheritedAttributes": [32]
|
|
7257
7244
|
},
|
|
7258
7245
|
"$listeners$": undefined,
|
|
7259
7246
|
"$lazyBundleId$": "-",
|
|
7260
|
-
"$attrsToReflect$": []
|
|
7247
|
+
"$attrsToReflect$": [["size", "size"], ["width", "width"], ["height", "height"]]
|
|
7261
7248
|
}; }
|
|
7262
7249
|
}
|
|
7263
7250
|
|
|
@@ -22,11 +22,11 @@ export declare class GovSkeleton {
|
|
|
22
22
|
/**
|
|
23
23
|
* Width of the skeleton ex. 100px, 100%, auto etc.
|
|
24
24
|
*/
|
|
25
|
-
width
|
|
25
|
+
width?: string;
|
|
26
26
|
/**
|
|
27
27
|
* Height of the skeleton ex. 100px, 100%, auto etc.
|
|
28
28
|
*/
|
|
29
|
-
height
|
|
29
|
+
height?: string;
|
|
30
30
|
/**
|
|
31
31
|
* Animation type
|
|
32
32
|
*/
|
|
@@ -42,9 +42,5 @@ export declare class GovSkeleton {
|
|
|
42
42
|
disconnectedCallback(): void;
|
|
43
43
|
onAriaAttributeChange(attributeName: string, newValue: string): void;
|
|
44
44
|
init(): void;
|
|
45
|
-
get style(): {
|
|
46
|
-
width?: string;
|
|
47
|
-
height?: string;
|
|
48
|
-
};
|
|
49
45
|
render(): any;
|
|
50
46
|
}
|
|
@@ -1546,7 +1546,7 @@ export namespace Components {
|
|
|
1546
1546
|
/**
|
|
1547
1547
|
* Height of the skeleton ex. 100px, 100%, auto etc.
|
|
1548
1548
|
*/
|
|
1549
|
-
"height"
|
|
1549
|
+
"height"?: string;
|
|
1550
1550
|
/**
|
|
1551
1551
|
* Shape of the skeleton
|
|
1552
1552
|
*/
|
|
@@ -1558,7 +1558,7 @@ export namespace Components {
|
|
|
1558
1558
|
/**
|
|
1559
1559
|
* Width of the skeleton ex. 100px, 100%, auto etc.
|
|
1560
1560
|
*/
|
|
1561
|
-
"width"
|
|
1561
|
+
"width"?: string;
|
|
1562
1562
|
}
|
|
1563
1563
|
interface GovSpacer {
|
|
1564
1564
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@gov-design-system-ce/components",
|
|
3
3
|
"description": "This package includes Gov Design System Web Components and related utilities.",
|
|
4
4
|
"author": "Zdeněk Vítek",
|
|
5
|
-
"version": "4.2.
|
|
5
|
+
"version": "4.2.6",
|
|
6
6
|
"license": "EUPL v1.2 Licensed",
|
|
7
7
|
"main": "./dist/index.cjs.js",
|
|
8
8
|
"unpkg": "./dist/core/core.esm.js",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as t,H as i,h as s,d as e}from"./p-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as o}from"./p-92f420cb.js";import{C as n}from"./p-5aad3497.js";import{g as r}from"./p-ea7fdd2e.js";import{v as h}from"./p-0b3574c2.js";import{A as l,a as c,i as p}from"./p-33d5d1ed.js";const d=a(o,["_XS","_S","_M","_L","_XL"]);a(n,["PRIMARY","NEUTRAL"]);var m;(function(t){t["CIRCLE"]="circle";t["LINE"]="line"})(m||(m={}));var u;(function(t){t["PULSE"]="pulse";t["PROGRESS"]="progress";t["FALSE"]="false"})(u||(u={}));const f={root:"gov-skeleton"};const v=t(class t extends i{constructor(){super();this.__registerHost();this.items=[];this.size="m";this.color="neutral";this.shape="line";this.width=null;this.height=null;this.animation="progress";this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){h(d,t,f.root)}validateShape(t){h(m,t,f.root)}validateAnimation(t){h(u,t,f.root)}componentDidLoad(){this.attributeObserver=new l(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(c)}componentWillLoad(){this.validateSize(this.size);this.validateShape(this.shape);this.validateAnimation(this.animation);this.init();this.inheritedAttributes=p(this.host)}componentWillUpdate(){this.init()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}init(){this.items.fill(1)}get style(){const t={width:null,height:null};if(this.width){t.width=this.width}if(this.height){t.height=this.height}return Object.assign({},t)}render(){return s(e,Object.assign({key:"fa43a5bc92210a51bb681449542c6f5c2863e3ad",size:this.size,color:this.color,class:{[f.root]:true,circle:this.shape==="circle",line:this.shape==="line",progress:this.animation==="progress",pulse:this.animation==="pulse"}},this.inheritedAttributes,{"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100",role:"progressbar",tabindex:"0",style:this.style}))}get host(){return this}static get watchers(){return{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}}},[0,"gov-skeleton",{size:[1],color:[1],shape:[1],width:[1],height:[1],animation:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-skeleton"];t.forEach((t=>{switch(t){case"gov-skeleton":if(!customElements.get(t)){customElements.define(t,v)}break}}))}b();export{v as G,b as d};
|
|
2
|
-
//# sourceMappingURL=p-313b4611.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SkeletonSizes","pick","Sizes","Colors","SkeletonShapes","SkeletonAnimation","SkeletonClass","root","GovSkeleton","proxyCustomElement","H","constructor","this","items","h","govHost","host","validateSize","newValue","validateProp","validateShape","validateAnimation","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","size","shape","animation","init","inheritedAttributes","inheritAriaAttributes","componentWillUpdate","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","fill","style","dimenssionsStyles","width","height","render","Host","key","color","class","circle","line","progress","pulse","role","tabindex"],"sources":["../../../packages/core/src/components/gov-loading/skeleton/constants.ts","../../../packages/core/src/components/gov-loading/skeleton/gov-skeleton.tsx"],"sourcesContent":["import { pick } from \"../../../utils/utils\"\nimport { ValueOf } from \"../../../types/interfaces\"\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {Colors} from \"../../../core/constants/colors\";\n\nexport const SkeletonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type SkeletonSizesType = `${ValueOf<typeof SkeletonSizes>}`\n\nexport const SkeletonColors = pick(Colors, [\"PRIMARY\", \"NEUTRAL\"])\nexport type SkeletonColorType = `${ValueOf<typeof SkeletonColors>}`\n\nexport enum SkeletonShapes {\n\tCIRCLE = 'circle',\n\tLINE = 'line'\n}\nexport type SkeletonShapesType = `${ValueOf<typeof SkeletonShapes>}`\n\nexport enum SkeletonAnimation {\n\tPULSE = 'pulse',\n\tPROGRESS = 'progress',\n\tFALSE = 'false'\n}\nexport type SkeletonAnimationType = `${ValueOf<typeof SkeletonAnimation>}`\n\nexport const SkeletonClass = {\n\troot: 'gov-skeleton',\n}\n","import {Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {\n\tSkeletonAnimation,\n\tSkeletonAnimationType,\n\tSkeletonClass,\n\tSkeletonColorType,\n\tSkeletonShapes,\n\tSkeletonShapesType,\n\tSkeletonSizes,\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormInputSizesType} from \"../../gov-form/input/constants\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-skeleton\",\n})\nexport class GovSkeleton {\n\th: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovSkeletonElement\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Style variation of the skeleton.\n\t */\n\t@Prop() readonly color?: SkeletonColorType = \"neutral\"\n\t/**\n\t * Shape of the skeleton\n\t */\n\t@Prop() shape?: SkeletonShapesType = \"line\"\n\t/**\n\t * Width of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop() width: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop() height: string = null\n\t/**\n\t * Animation type\n\t */\n\t@Prop() animation?: SkeletonAnimationType = \"progress\"\n\n\titems: number[] = []\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SkeletonSizes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('shape')\n\tvalidateShape(newValue: string): void {\n\t\tvalidateProp(SkeletonShapes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('animation')\n\tvalidateAnimation(newValue: string): void {\n\t\tvalidateProp(SkeletonAnimation, newValue, SkeletonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateShape(this.shape)\n\t\tthis.validateAnimation(this.animation)\n\t\tthis.init()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tthis.init()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tinit() {\n\t\tthis.items.fill(1)\n\t}\n\n\tget style() {\n\t\tconst dimenssionsStyles: {\n\t\t\twidth?: string,\n\t\t\theight?: string,\n\t\t} = {\n\t\t\twidth: null,\n\t\t\theight: null,\n\t\t}\n\t\tif (this.width) {\n\t\t\tdimenssionsStyles.width = this.width\n\t\t}\n\n\t\tif (this.height) {\n\t\t\tdimenssionsStyles.height = this.height\n\t\t}\n\n\t\treturn {...dimenssionsStyles}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t color={this.color}\n\t\t\t\t class={{\n\t\t\t\t\t [SkeletonClass.root]: true,\n\t\t\t\t\t circle: this.shape === \"circle\",\n\t\t\t\t\t line: this.shape === \"line\",\n\t\t\t\t\t progress: this.animation === \"progress\",\n\t\t\t\t\t pulse: this.animation === \"pulse\",\n\t\t\t\t }}\n\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t aria-busy=\"true\"\n\t\t\t\t aria-valuemin=\"0\"\n\t\t\t\t aria-valuemax=\"100\"\n\t\t\t\t role=\"progressbar\"\n\t\t\t\t tabindex=\"0\"\n\t\t\t\t style={this.style}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"+RAKO,MAAMA,EAAgBC,EAAKC,EAAO,CAAC,MAAO,KAAM,KAAM,KAAM,QAGrCD,EAAKE,EAAQ,CAAC,UAAW,YAGvD,IAAYC,GAAZ,SAAY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EAGF,CACHC,MAAO,KACPC,OAAQ,MAET,GAAInC,KAAKkC,MAAO,CACfD,EAAkBC,MAAQlC,KAAKkC,K,CAGhC,GAAIlC,KAAKmC,OAAQ,CAChBF,EAAkBE,OAASnC,KAAKmC,M,CAGjC,OAAAN,OAAAC,OAAA,GAAWG,E,CAGZ,MAAAG,GACC,OACClC,EAACmC,EAAIR,OAAAC,OAAA,CAAAQ,IAAA,2CAACpB,KAAMlB,KAAKkB,KACdqB,MAAOvC,KAAKuC,MACZC,MAAO,CACN,CAAC9C,EAAcC,MAAO,KACtB8C,OAAQzC,KAAKmB,QAAU,SACvBuB,KAAM1C,KAAKmB,QAAU,OACrBwB,SAAU3C,KAAKoB,YAAc,WAC7BwB,MAAO5C,KAAKoB,YAAc,UAEvBpB,KAAKsB,oBAAmB,aAClB,OAAM,gBACF,IAAG,gBACH,MACduB,KAAK,cACLC,SAAS,IACTd,MAAOhC,KAAKgC,Q","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,a as e,g as a}from"./p-9dea2efa.js";import{g as h,l as n,m as o}from"./p-da1db6fd.js";import{g as r,c,t as d,d as l}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";import{c as f}from"./p-cd6c2938.js";import{A as p,a as m}from"./p-9ac55bd1.js";import{i as b}from"./p-d9a299a4.js";import{p as v}from"./p-e0e2e9c1.js";import{S as g}from"./p-92f420cb.js";import{C as y}from"./p-5aad3497.js";import"./p-7f3becc5.js";import"./p-56efd4a2.js";import"./p-7ba4daf4.js";import"./p-e8ec030e.js";var k;(function(t){t["INPUT"]="input";t["TEXTAREA"]="textarea"})(k||(k={}));const j=class{constructor(s){t(this,s);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govKeyUp=i(this,"gov-keyup",7);this.govHydrated=i(this,"gov-hydrated",7);this.govKeyDown=i(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.accessibleShowPasswordLabel="Zobrazit heslo";this.accessibleHidePasswordLabel="Skrýt heslo";this.focused=undefined;this.showPassword=false;this.inheritedAttributes={};this.h=r(this.host);this.inputId=f("GovInput");this.f=h(this.h)}validateSize(t){u(o,t,n.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",c(this.success));this.f.passAttrToControl("disabled",c(this.disabled));this.f.passAttrToControl("invalid",c(this.invalid));this.f.passAttrToControl("type",this.multiline?k.TEXTAREA:k.INPUT)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(m);this.govHydrated.emit()}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}render(){const t=this.multiline?k.TEXTAREA:k.INPUT;return s(e,{key:"f2b0e3a105b6a3904d59821bc68e13bfa01acea9",class:n.root,size:this.size,type:this.type},this.h.hasSlot("prefix")&&s("slot",{key:"13ff8da008e08322cd0eb241600751f8e896416b",name:"prefix"}),s("span",{key:"22c1467190afaf1a2c8e98d0cd4500f123494885",class:"element"},this.h.hasSlot("icon-start")&&!this.multiline&&s("div",{key:"1ab85a6556b44fd92959c0311b57028a8e3b8d74",class:n.icons,onClick:()=>this.inputRef.focus()},s("slot",{key:"dcc9f5a1da1245bd4eccc0a919b08b73a556efe7",name:"icon-start"})),s(t,Object.assign({key:"f05f59a1ad7d28acfd005942fdd22e7ba04e2d73",type:this.inputType==="password"&&this.showPassword?"text":this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:t=>this.inputRef=t,placeholder:this.placeholder,spellcheck:d(this.spellcheck),lang:this.inputLang,readonly:d(this.readonly),autocomplete:l(this.autocomplete),autocorrect:l(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,value:this.value},this.inheritedAttributes,{"aria-required":d(this.required),"aria-invalid":d(this.invalid),"aria-disabled":d(this.disabled)})),(this.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&s("div",{key:"ab940283ca797a54590c73881aabe6e4032d4a77",class:n.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&s("gov-icon",{key:"af0b7c6e3c815eb74318052f490db2241f246707",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&s("gov-icon",{key:"4feef0479c061b9b073dea6c04e2bc428464a9de",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&s("slot",{key:"fa3f4ac957a08d066706c273b008edef401f0a2b",name:"icon-end"}),this.inputType==="password"?s("gov-button",{color:"primary",type:"base",size:this.size,"aria-label":this.showPassword?this.accessibleHidePasswordLabel:this.accessibleShowPasswordLabel,"on-gov-click":()=>this.showPassword=!this.showPassword},s("gov-icon",{slot:"icon-start",name:"eye",type:"components"})):null)),this.h.hasSlot("sufix")&&s("slot",{key:"ce4b50ff45632098c4457339538bac4a5a685df8",name:"sufix"}))}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:n.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.focused=false;this.govBlur.emit({component:n.root,value:this.value,originalEvent:t})}onKeyUpHandler(t){t.stopPropagation();this.govKeyUp.emit({component:n.root,value:this.value,originalEvent:t})}onKeyDownHandler(t){t.stopPropagation();this.govKeyDown.emit({component:n.root,value:this.value,originalEvent:t})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:n.root,value:this.value,originalEvent:t})}async setFocus(t){return this.inputRef.focus(t)}async setValue(t){this.value=t}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}get host(){return a(this)}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}};const w=v(g,["_XS","_S","_M","_L","_XL"]);v(y,["PRIMARY","NEUTRAL"]);var A;(function(t){t["CIRCLE"]="circle";t["LINE"]="line"})(A||(A={}));var x;(function(t){t["PULSE"]="pulse";t["PROGRESS"]="progress";t["FALSE"]="false"})(x||(x={}));const C={root:"gov-skeleton"};const z=class{constructor(i){t(this,i);this.items=[];this.size="m";this.color="neutral";this.shape="line";this.width=null;this.height=null;this.animation="progress";this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){u(w,t,C.root)}validateShape(t){u(A,t,C.root)}validateAnimation(t){u(x,t,C.root)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(m)}componentWillLoad(){this.validateSize(this.size);this.validateShape(this.shape);this.validateAnimation(this.animation);this.init();this.inheritedAttributes=b(this.host)}componentWillUpdate(){this.init()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}init(){this.items.fill(1)}get style(){const t={width:null,height:null};if(this.width){t.width=this.width}if(this.height){t.height=this.height}return Object.assign({},t)}render(){return s(e,Object.assign({key:"fa43a5bc92210a51bb681449542c6f5c2863e3ad",size:this.size,color:this.color,class:{[C.root]:true,circle:this.shape==="circle",line:this.shape==="line",progress:this.animation==="progress",pulse:this.animation==="pulse"}},this.inheritedAttributes,{"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100",role:"progressbar",tabindex:"0",style:this.style}))}get host(){return a(this)}static get watchers(){return{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}}};export{j as gov_form_input,z as gov_skeleton};
|
|
2
|
-
//# sourceMappingURL=p-b9f1c2ef.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Tags","GovFormInput","constructor","hostRef","this","h","govHost","host","inputId","createID","f","govForm","validateSize","newValue","validateProp","FormInputSizes","FormInputClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","multiline","TEXTAREA","INPUT","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","govHydrated","emit","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","removeAttribute","Object","assign","disconnectedCallback","_a","stopObserving","render","Tag","Host","key","class","type","hasSlot","name","icons","onClick","inputRef","focus","inputType","showPassword","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","placeholder","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","value","color","accessibleHidePasswordLabel","accessibleShowPasswordLabel","slot","e","stopPropagation","focused","govFocus","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","setValue","clearValue","getRef","SkeletonSizes","pick","Sizes","Colors","SkeletonShapes","SkeletonAnimation","SkeletonClass","GovSkeleton","items","validateShape","validateAnimation","shape","animation","init","componentWillUpdate","fill","style","dimenssionsStyles","width","height","circle","line","progress","pulse","tabindex"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.tsx","../../../packages/core/src/components/gov-loading/skeleton/constants.ts","../../../packages/core/src/components/gov-loading/skeleton/gov-skeleton.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormInputClass, FormInputSizes, FormInputSizesType, InputType, Type,} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop({reflect:true}) readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t */\n\t@Prop({reflect:true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({attribute: \"input-type\"}) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly invalid: boolean\n\t/**\n\t * Accessible text for password display\n\t */\n\t@Prop({attribute: \"accessible-show-password-label\"}) readonly accessibleShowPasswordLabel = 'Zobrazit heslo'\n\t/**\n\t * Accessible text to hide the password\n\t */\n\t@Prop({attribute: \"accessible-hide-password-label\"}) readonly accessibleHidePasswordLabel = 'Skrýt heslo'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keyup\"}) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-hydrated\"}) govHydrated: EventEmitter<void>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keydown\"}) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\t@State() showPassword: boolean = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t\tthis.govHydrated.emit();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{(this.h.hasSlot(\"icon-start\") && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t<slot name=\"icon-start\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType === 'password' && this.showPassword ? 'text' : this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t\t{((this.success || this.invalid || this.h.hasSlot(\"icon-end\") || this.inputType === 'password') && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && this.inputType !== 'password' && <slot name=\"icon-end\"/>}\n\t\t\t\t\t\t\t{this.inputType === 'password' ? (\n\t\t\t\t\t\t\t\t<gov-button color={'primary'}\n\t\t\t\t\t\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\taria-label={this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.showPassword = !this.showPassword}>\n\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"eye\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t</gov-button>) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n","import { pick } from \"../../../utils/utils\"\nimport { ValueOf } from \"../../../types/interfaces\"\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {Colors} from \"../../../core/constants/colors\";\n\nexport const SkeletonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type SkeletonSizesType = `${ValueOf<typeof SkeletonSizes>}`\n\nexport const SkeletonColors = pick(Colors, [\"PRIMARY\", \"NEUTRAL\"])\nexport type SkeletonColorType = `${ValueOf<typeof SkeletonColors>}`\n\nexport enum SkeletonShapes {\n\tCIRCLE = 'circle',\n\tLINE = 'line'\n}\nexport type SkeletonShapesType = `${ValueOf<typeof SkeletonShapes>}`\n\nexport enum SkeletonAnimation {\n\tPULSE = 'pulse',\n\tPROGRESS = 'progress',\n\tFALSE = 'false'\n}\nexport type SkeletonAnimationType = `${ValueOf<typeof SkeletonAnimation>}`\n\nexport const SkeletonClass = {\n\troot: 'gov-skeleton',\n}\n","import {Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {\n\tSkeletonAnimation,\n\tSkeletonAnimationType,\n\tSkeletonClass,\n\tSkeletonColorType,\n\tSkeletonShapes,\n\tSkeletonShapesType,\n\tSkeletonSizes,\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormInputSizesType} from \"../../gov-form/input/constants\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-skeleton\",\n})\nexport class GovSkeleton {\n\th: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovSkeletonElement\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Style variation of the skeleton.\n\t */\n\t@Prop() readonly color?: SkeletonColorType = \"neutral\"\n\t/**\n\t * Shape of the skeleton\n\t */\n\t@Prop() shape?: SkeletonShapesType = \"line\"\n\t/**\n\t * Width of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop() width: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop() height: string = null\n\t/**\n\t * Animation type\n\t */\n\t@Prop() animation?: SkeletonAnimationType = \"progress\"\n\n\titems: number[] = []\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SkeletonSizes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('shape')\n\tvalidateShape(newValue: string): void {\n\t\tvalidateProp(SkeletonShapes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('animation')\n\tvalidateAnimation(newValue: string): void {\n\t\tvalidateProp(SkeletonAnimation, newValue, SkeletonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateShape(this.shape)\n\t\tthis.validateAnimation(this.animation)\n\t\tthis.init()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tthis.init()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tinit() {\n\t\tthis.items.fill(1)\n\t}\n\n\tget style() {\n\t\tconst dimenssionsStyles: {\n\t\t\twidth?: string,\n\t\t\theight?: string,\n\t\t} = {\n\t\t\twidth: null,\n\t\t\theight: null,\n\t\t}\n\t\tif (this.width) {\n\t\t\tdimenssionsStyles.width = this.width\n\t\t}\n\n\t\tif (this.height) {\n\t\t\tdimenssionsStyles.height = this.height\n\t\t}\n\n\t\treturn {...dimenssionsStyles}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t color={this.color}\n\t\t\t\t class={{\n\t\t\t\t\t [SkeletonClass.root]: true,\n\t\t\t\t\t circle: this.shape === \"circle\",\n\t\t\t\t\t line: this.shape === \"line\",\n\t\t\t\t\t progress: this.animation === \"progress\",\n\t\t\t\t\t pulse: this.animation === \"pulse\",\n\t\t\t\t }}\n\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t aria-busy=\"true\"\n\t\t\t\t aria-valuemin=\"0\"\n\t\t\t\t aria-valuemax=\"100\"\n\t\t\t\t role=\"progressbar\"\n\t\t\t\t tabindex=\"0\"\n\t\t\t\t style={this.style}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"ygBAcA,IAAKA,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,sBACA,EAHD,CAAKA,MAAI,K,MAQIC,EAAY,MAOxB,WAAAC,CAAAC,G,0TAsB6C,I,mGAqBM,M,cAIA,M,wRAiDc,O,4EAa2B,iB,iCAIA,c,yCA0B3D,M,yBAeU,GAzJ1CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,YACxBL,KAAKM,EAAIC,EAAQP,KAAKC,E,CA2IvB,YAAAO,CAAaC,GACZC,EAAaC,EAAgBF,EAAUG,EAAeC,K,CAOvD,iBAAAC,GACCd,KAAKe,kB,CAKE,gBAAAA,GACPf,KAAKM,EAAEU,kBAAkB,OAAQhB,KAAKiB,MACtCjB,KAAKM,EAAEU,kBAAkB,UAAWE,EAAWlB,KAAKmB,UACpDnB,KAAKM,EAAEU,kBAAkB,WAAYE,EAAWlB,KAAKoB,WACrDpB,KAAKM,EAAEU,kBAAkB,UAAWE,EAAWlB,KAAKqB,UACpDrB,KAAKM,EAAEU,kBAAkB,OAAQhB,KAAKsB,UAAY1B,EAAK2B,SAAW3B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G,K,CAGvD,mBAAA4H,GACC/H,KAAK8H,M,CAGN,oBAAAlF,G,OACCC,EAAA7C,KAAK0B,qBAAiB,MAAAmB,SAAA,SAAAA,EAAEC,e,CAGzB,qBAAAjB,CAAsBD,EAAuBnB,GAC5CT,KAAKG,KAAKsC,gBAAgBb,GAC1B5B,KAAKmC,oBAAmBO,OAAAC,OAAAD,OAAAC,OAAA,GAAO3C,KAAKmC,qBAAmB,CAAEP,CAACA,GAAgBnB,G,CAG3E,IAAAqH,GACC9H,KAAKyH,MAAMO,KAAK,E,CAGjB,SAAIC,GACH,MAAMC,EAGF,CACHC,MAAO,KACPC,OAAQ,MAET,GAAIpI,KAAKmI,MAAO,CACfD,EAAkBC,MAAQnI,KAAKmI,K,CAGhC,GAAInI,KAAKoI,OAAQ,CAChBF,EAAkBE,OAASpI,KAAKoI,M,CAGjC,OAAA1F,OAAAC,OAAA,GAAWuF,E,CAGZ,MAAAnF,GACC,OACC9C,EAACgD,EAAIP,OAAAC,OAAA,CAAAO,IAAA,2CAACjC,KAAMjB,KAAKiB,KACd4E,MAAO7F,KAAK6F,MACZ1C,MAAO,CACN,CAACoE,EAAc1G,MAAO,KACtBwH,OAAQrI,KAAK4H,QAAU,SACvBU,KAAMtI,KAAK4H,QAAU,OACrBW,SAAUvI,KAAK6H,YAAc,WAC7BW,MAAOxI,KAAK6H,YAAc,UAEvB7H,KAAKmC,oBAAmB,aAClB,OAAM,gBACF,IAAG,gBACH,MACdwD,KAAK,cACL8C,SAAS,IACTR,MAAOjI,KAAKiI,Q","ignoreList":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|