@gov-design-system-ce/components 4.2.5 → 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/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/collection/components/gov-loading/skeleton/gov-skeleton.js +2 -15
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.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-range.js.map +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-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-80c889e2.js → p-4fb591c3.js} +2 -2
- package/dist/components/{p-2d1d727d.js → p-5697ee30.js} +2 -2
- package/dist/components/{p-d1a59544.js → p-8a9d4e12.js} +2 -2
- package/dist/components/{p-106a27de.js → p-8d1d7dd5.js} +2 -2
- package/dist/components/{p-246216b9.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-5c247bc2.js → p-d2d05f02.js} +2 -2
- package/dist/components/{p-f7ca5e39.js → p-ffc3a0df.js} +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/{p-d3014dc5.entry.js → p-2c52dcc9.entry.js} +2 -2
- package/dist/core/{p-2fd53723.entry.js → p-68b63bde.entry.js} +2 -2
- package/dist/core/p-68b63bde.entry.js.map +1 -0
- 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/hydrate/index.js +3 -16
- package/dist/hydrate/index.mjs +3 -16
- package/dist/types/components/gov-loading/skeleton/gov-skeleton.d.ts +0 -4
- package/package.json +1 -1
- package/dist/components/p-fcc6dd1d.js +0 -2
- package/dist/components/p-fcc6dd1d.js.map +0 -1
- package/dist/core/p-2fd53723.entry.js.map +0 -1
- /package/dist/components/{p-80c889e2.js.map → p-4fb591c3.js.map} +0 -0
- /package/dist/components/{p-2d1d727d.js.map → p-5697ee30.js.map} +0 -0
- /package/dist/components/{p-d1a59544.js.map → p-8a9d4e12.js.map} +0 -0
- /package/dist/components/{p-106a27de.js.map → p-8d1d7dd5.js.map} +0 -0
- /package/dist/components/{p-246216b9.js.map → p-a7917b98.js.map} +0 -0
- /package/dist/components/{p-5c247bc2.js.map → p-d2d05f02.js.map} +0 -0
- /package/dist/components/{p-f7ca5e39.js.map → p-ffc3a0df.js.map} +0 -0
- /package/dist/core/{p-d3014dc5.entry.js.map → p-2c52dcc9.entry.js.map} +0 -0
|
@@ -251,27 +251,14 @@ const GovSkeleton = class {
|
|
|
251
251
|
init() {
|
|
252
252
|
this.items.fill(1);
|
|
253
253
|
}
|
|
254
|
-
get style() {
|
|
255
|
-
const dimenssionsStyles = {
|
|
256
|
-
width: null,
|
|
257
|
-
height: null,
|
|
258
|
-
};
|
|
259
|
-
if (this.width) {
|
|
260
|
-
dimenssionsStyles.width = this.width;
|
|
261
|
-
}
|
|
262
|
-
if (this.height) {
|
|
263
|
-
dimenssionsStyles.height = this.height;
|
|
264
|
-
}
|
|
265
|
-
return Object.assign({}, dimenssionsStyles);
|
|
266
|
-
}
|
|
267
254
|
render() {
|
|
268
|
-
return (index.h(index.Host, Object.assign({ key: '
|
|
255
|
+
return (index.h(index.Host, Object.assign({ key: '3bad110a20779275c899c8a8d5d1086ec4cf59fd', size: this.size, color: this.color, class: {
|
|
269
256
|
[SkeletonClass.root]: true,
|
|
270
257
|
circle: this.shape === "circle",
|
|
271
258
|
line: this.shape === "line",
|
|
272
259
|
progress: this.animation === "progress",
|
|
273
260
|
pulse: this.animation === "pulse",
|
|
274
|
-
} }, this.inheritedAttributes, { "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", role: "progressbar", tabindex: "0", style: this.
|
|
261
|
+
} }, this.inheritedAttributes, { "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", role: "progressbar", tabindex: "0", style: { width: this.width, height: this.height } })));
|
|
275
262
|
}
|
|
276
263
|
get host() { return index.getElement(this); }
|
|
277
264
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-form-input.gov-skeleton.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAcA,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,uBAAe,CAAA;IACf,6BAAqB,CAAA;AACtB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAKY,YAAY;IAOxB;;;;;;;;;;;oBAsB6C,GAAG;;;;;wBAqBG,KAAK;wBAIL,KAAK;;;;;;;;;;;;yBAiDS,MAAM;;;2CAaqB,gBAAgB;2CAIhB,aAAa;;4BA0BxE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Prop","FormInputSizes","FormInputClass","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","h","Host","toBoolAttrIfDefined","toOnOffAttrIfDefined","pick","Sizes","Colors"],"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({reflect: true}) 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({reflect: true}) width?: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) 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"],"version":3}
|
|
1
|
+
{"file":"gov-form-input.gov-skeleton.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAcA,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,uBAAe,CAAA;IACf,6BAAqB,CAAA;AACtB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAKY,YAAY;IAOxB;;;;;;;;;;;oBAsB6C,GAAG;;;;;wBAqBG,KAAK;wBAIL,KAAK;;;;;;;;;;;;yBAiDS,MAAM;;;2CAaqB,gBAAgB;2CAIhB,aAAa;;4BA0BxE,KAAK;mCAeK,EAAE;QAzJ5C,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAGC,qBAAQ,CAAC,UAAU,CAAC,CAAA;QACnC,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACxB;IA0ID,YAAY,CAAC,QAAgB;QAC5BC,kBAAY,CAACC,mBAAc,EAAE,QAAQ,EAAEC,mB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AA;KAClB;IAED,MAAM;QACL,QACCC,QAACC,UAAI,mEAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE;gBACN,CAAC,aAAa,CAAC,IAAI,GAAG,IAAI;gBAC1B,MAAM,EAAE,IAAI,CAAC,KAAK,KAAK,QAAQ;gBAC/B,IAAI,EAAE,IAAI,CAAC,KAAK,KAAK,MAAM;gBAC3B,QAAQ,EAAE,IAAI,CAAC,SAAS,KAAK,UAAU;gBACvC,KAAK,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO;aACjC,IACG,IAAI,CAAC,mBAAmB,iBAClB,MAAM,mBACF,GAAG,mBACH,KAAK,EACnB,IAAI,EAAC,aAAa,EAClB,QAAQ,EAAC,GAAG,EACZ,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,IAC3C,EACP;KACD;;;;;;;;;;;;","names":["govHost","createID","govForm","validateProp","FormInputSizes","FormInputClass","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","h","Host","toBoolAttrIfDefined","toOnOffAttrIfDefined","pick","Sizes","Colors"],"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({reflect: true}) 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({reflect: true}) width?: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) 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\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={{width: this.width, height: this.height}}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -53,27 +53,14 @@ export class GovSkeleton {
|
|
|
53
53
|
init() {
|
|
54
54
|
this.items.fill(1);
|
|
55
55
|
}
|
|
56
|
-
get style() {
|
|
57
|
-
const dimenssionsStyles = {
|
|
58
|
-
width: null,
|
|
59
|
-
height: null,
|
|
60
|
-
};
|
|
61
|
-
if (this.width) {
|
|
62
|
-
dimenssionsStyles.width = this.width;
|
|
63
|
-
}
|
|
64
|
-
if (this.height) {
|
|
65
|
-
dimenssionsStyles.height = this.height;
|
|
66
|
-
}
|
|
67
|
-
return Object.assign({}, dimenssionsStyles);
|
|
68
|
-
}
|
|
69
56
|
render() {
|
|
70
|
-
return (h(Host, Object.assign({ key: '
|
|
57
|
+
return (h(Host, Object.assign({ key: '3bad110a20779275c899c8a8d5d1086ec4cf59fd', size: this.size, color: this.color, class: {
|
|
71
58
|
[SkeletonClass.root]: true,
|
|
72
59
|
circle: this.shape === "circle",
|
|
73
60
|
line: this.shape === "line",
|
|
74
61
|
progress: this.animation === "progress",
|
|
75
62
|
pulse: this.animation === "pulse",
|
|
76
|
-
} }, this.inheritedAttributes, { "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", role: "progressbar", tabindex: "0", style: this.
|
|
63
|
+
} }, this.inheritedAttributes, { "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", role: "progressbar", tabindex: "0", style: { width: this.width, height: this.height } })));
|
|
77
64
|
}
|
|
78
65
|
static get is() { return "gov-skeleton"; }
|
|
79
66
|
static get properties() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-skeleton.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-loading/skeleton/gov-skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAC7E,OAAO,EACN,iBAAiB,EAEjB,aAAa,EAEb,cAAc,EAEd,aAAa,GACb,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAC,OAAO,EAAC,MAAM,+BAA+B,CAAA;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAE5D,OAAO,EAAC,iBAAiB,EAAa,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAC,cAAc,EAAC,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAC,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AC,CAAA;QACxC,IAAI,CAAC,mBAAmB,mCAAO,IAAI,CAAC,mBAAmB,KAAE,CAAC,aAAa,CAAC,EAAE,QAAQ,GAAC,CAAC;IACrF,CAAC;IAED,IAAI;QACH,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC;IAED,MAAM;QACL,OAAO,CACN,EAAC,IAAI,mEAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE;gBACN,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI;gBAC1B,MAAM,EAAE,IAAI,CAAC,KAAK,KAAK,QAAQ;gBAC/B,IAAI,EAAE,IAAI,CAAC,KAAK,KAAK,MAAM;gBAC3B,QAAQ,EAAE,IAAI,CAAC,SAAS,KAAK,UAAU;gBACvC,KAAK,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO;aACjC,IACG,IAAI,CAAC,mBAAmB,iBAClB,MAAM,mBACF,GAAG,mBACH,KAAK,EACnB,IAAI,EAAC,aAAa,EAClB,QAAQ,EAAC,GAAG,EACZ,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,IAC3C,CACP,CAAA;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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({reflect: true}) 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({reflect: true}) width?: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) 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\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={{width: this.width, height: this.height}}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as a,d as i}from"./p-42200001.js";import{v as c}from"./p-0b3574c2.js";import{A as o,b as n,a as d}from"./p-d4509899.js";import{g as f,t as b,b as r}from"./p-ea7fdd2e.js";import{i as h}from"./p-33d5d1ed.js";import{t as m}from"./p-26618322.js";import{d as l}from"./p-
|
|
1
|
+
import{p as e,H as s,c as t,h as a,d as i}from"./p-42200001.js";import{v as c}from"./p-0b3574c2.js";import{A as o,b as n,a as d}from"./p-d4509899.js";import{g as f,t as b,b as r}from"./p-ea7fdd2e.js";import{i as h}from"./p-33d5d1ed.js";import{t as m}from"./p-26618322.js";import{d as l}from"./p-8a9d4e12.js";const p=e(class e extends s{constructor(){super();this.__registerHost();this.govChange=t(this,"gov-change",7);this.inheritedAttributes={};this.openState=undefined;this.identifier=undefined;this.size=undefined;this.disabled=false;this.open=false;this.h=f(this.host)}validateSize(e){c(d,e,n.root)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=h(this.host)}componentDidRender(){m((()=>this.getPropsFromParents()))}getPropsFromParents(){const e=this.h.getParent(o.root);if(e){this.size=e.getAttribute("size")}}render(){return a(i,{key:"1beb62527ea9274e6280ce0b64c9d52c12e4a993",class:this.h.classes([n.root,this.disabled&&n.disabled]),size:this.size,role:"listitem"},a("details",{key:"53ca7688e8f26e85cd76feb073a26d04c5505d2b",class:n.details,id:this.identifier,"aria-disabled":b(this.disabled),open:this.open},a("summary",Object.assign({key:"19fec49b0066b7a6162a6010e0ee20431c2a578b",onClick:e=>{e.stopPropagation();e.preventDefault();!this.disabled&&this.toggle().finally()},class:n.summary,tabIndex:this.disabled?-1:0,"aria-expanded":r(this.open)},this.inheritedAttributes),this.h.hasSlot("icon")&&a("span",{key:"19254947c22fa2b1a2fa4e26eacb22c0c89b40c9",class:n.icon},a("slot",{key:"262be1640f250fabf9918f4162c071bb68dc4fb3",name:"icon"})),a("span",{key:"ebb5ef762ef51921b68a8063fd09c979d7d0d32d",class:n.title},a("slot",{key:"75783345d2276f06e53c401761cb4e57d241e5e0",name:"label"}),a("slot",{key:"f2d9cdff693edbcae6293921fde7996d1b1251b6",name:"annotation"})),a("span",{key:"f7e28ea54455756c7d146c7b88be7001e80b07a8",class:n.right},a("slot",{key:"e76b31bf1c349a8a86d4b91ec1cfa650a75edf60",name:"suffix"}),a("span",{key:"87ea99c9862deb3ff9820fa383cec52956b4655a",class:n.arrow},a("slot",{key:"c8b64a90455a731f359e12550664ba5aa905abbc",name:"toggle-icon"},a("gov-icon",{key:"867406c5634d6446683529f5f647492b9b289a31",name:"chevron-down",type:"components"}))))),a("div",{key:"2adf7441dd470ae1b32a08fb374cd1d9e2d1f789",class:n.content},a("slot",{key:"8eb27d0b33689933b6e71850324c35c89d71c4c0"}))))}async toggle(){this.open=!this.open;this.govChange.emit({open:this.open,component:n.root,ref:this.host})}async currentState(){return this.open}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-accordion-item",{identifier:[1],size:[1025],disabled:[4],open:[1028],openState:[32],toggle:[64],currentState:[64]},undefined,{size:["validateSize"]}]);function u(){if(typeof customElements==="undefined"){return}const e=["gov-accordion-item","gov-icon"];e.forEach((e=>{switch(e){case"gov-accordion-item":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}u();const y=p;const g=u;export{y as GovAccordionItem,g as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-accordion-item.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as o,d as s}from"./p-
|
|
1
|
+
import{G as o,d as s}from"./p-ffc3a0df.js";const f=o;const t=s;export{f as GovAttachmentsItem,t as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-attachments-item.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,h as o,d as s}from"./p-42200001.js";import{g as c}from"./p-ea7fdd2e.js";import{d as a}from"./p-
|
|
1
|
+
import{p as e,H as t,h as o,d as s}from"./p-42200001.js";import{g as c}from"./p-ea7fdd2e.js";import{d as a}from"./p-8a9d4e12.js";var n;(function(e){e["PRIMARY"]="primary";e["SUBTLE"]="subtle";e["NEUTRAL"]="neutral"})(n||(n={}));const f={root:"gov-blockquote"};const i=e(class e extends t{constructor(){super();this.__registerHost();this.type=n.SUBTLE;this.cite=undefined;this.h=c(this.host)}render(){return o(s,{key:"0d4b930791ee54ea55552b1a8ab9a2f248b5109e",class:this.h.classes(f.root),type:this.type},o("gov-icon",{key:"f27a6a5059203b000bede13c47aa7e5eb150e4cd",type:"components",name:"quote",size:"3xl"}),o("blockquote",{key:"3206cd993309f5636920e5b552e3cd97be98b334",cite:this.cite},o("slot",{key:"16ac7ec3098d37e1c5b444fe18e47986a5afa915"})),o("slot",{key:"ae4f20fbf0820346cc9919014ab6a3fc9f9ef96e",name:"image"}),o("slot",{key:"f43c96fef744f2d6147f8579fad0c808c064c81a",name:"author"}))}get host(){return this}},[4,"gov-blockquote",{type:[513],cite:[1]}]);function r(){if(typeof customElements==="undefined"){return}const e=["gov-blockquote","gov-icon"];e.forEach((e=>{switch(e){case"gov-blockquote":if(!customElements.get(e)){customElements.define(e,i)}break;case"gov-icon":if(!customElements.get(e)){a()}break}}))}r();const u=i;const b=r;export{u as GovBlockquote,b as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-blockquote.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as s,H as e,c as t,h as i,d as a}from"./p-42200001.js";import{a as c}from"./p-10cad7f1.js";import{c as o}from"./p-e8ec030e.js";import{g as n}from"./p-ea7fdd2e.js";import{t as l}from"./p-26618322.js";import{d as r}from"./p-
|
|
1
|
+
import{p as s,H as e,c as t,h as i,d as a}from"./p-42200001.js";import{a as c}from"./p-10cad7f1.js";import{c as o}from"./p-e8ec030e.js";import{g as n}from"./p-ea7fdd2e.js";import{t as l}from"./p-26618322.js";import{d as r}from"./p-4fb591c3.js";import{d}from"./p-8a9d4e12.js";const b={root:"gov-breadcrumbs"};const h=s(class s extends e{constructor(){super();this.__registerHost();this.govChange=t(this,"gov-change",7);this.inited=false;this.collapsible=false;this.isExpanded=false;this.accessibleLabel=undefined;this.accessibleLabelledBy=undefined;this.accessibleToggleLabel="Zobrazit či skrýt navigaci";this.expanded=false;this.toggleOption=false;this.h=n(this.host)}async componentDidRender(){this.scheduleContentVerification();if(o()){l((()=>this.validateAccessibility()))}}scheduleContentVerification(){if(this.inited)return;this.inited=true;l((()=>{this.calculateWidthOfItems();this.inited=false}))}calculateWidthOfItems(){const s=this.host.getBoundingClientRect().width;let e=0;this.host.querySelectorAll("li").forEach((s=>{e+=s.getBoundingClientRect().width}));this.toggleOption=e>s}render(){return i(a,{key:"dadd8de710050476be68e3f6fa0b317d6ccedfc1",class:this.h.classes(b.root),expanded:this.expanded},i("nav",{key:"468a3b605408c943421243024733b0381809f931","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy},i("slot",{key:"2c9f85b826c8c54340ab5abba51c1861282c9cb7"})),this.toggleOption?i("gov-button",{size:"xs",color:"primary",type:"base","aria-label":this.accessibleToggleLabel,"aria-pressed":this.expanded,"aria-expanded":this.expanded,"on-gov-click":()=>this.expanded=!this.expanded},i("gov-icon",{name:this.expanded?"chevron-up":"chevron-down",type:"components"})):null)}async validateAccessibility(){c(this.accessibleLabel,this.accessibleLabelledBy,b.root,this.host);c(this.accessibleToggleLabel,undefined,b.root,this.host)}get host(){return this}},[4,"gov-breadcrumbs",{collapsible:[4],isExpanded:[4,"is-expanded"],accessibleLabel:[1,"accessible-label"],accessibleLabelledBy:[1,"accessible-labelledby"],accessibleToggleLabel:[1,"accessible-toggle-label"],expanded:[32],toggleOption:[32],validateAccessibility:[64]}]);function f(){if(typeof customElements==="undefined"){return}const s=["gov-breadcrumbs","gov-button","gov-icon"];s.forEach((s=>{switch(s){case"gov-breadcrumbs":if(!customElements.get(s)){customElements.define(s,h)}break;case"gov-button":if(!customElements.get(s)){r()}break;case"gov-icon":if(!customElements.get(s)){d()}break}}))}f();const m=h;const p=f;export{m as GovBreadcrumbs,p as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-breadcrumbs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as o,d as s}from"./p-
|
|
1
|
+
import{G as o,d as s}from"./p-4fb591c3.js";const t=o;const c=s;export{t as GovButton,c as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as i,c as s,h as t,d as a}from"./p-42200001.js";import{g as c,b as d}from"./p-ea7fdd2e.js";import{c as o}from"./p-cd6c2938.js";import{a as n}from"./p-10cad7f1.js";import{c as r}from"./p-e8ec030e.js";import{d as l}from"./p-e0e2e9c1.js";import{d as h}from"./p-
|
|
1
|
+
import{p as e,H as i,c as s,h as t,d as a}from"./p-42200001.js";import{g as c,b as d}from"./p-ea7fdd2e.js";import{c as o}from"./p-cd6c2938.js";import{a as n}from"./p-10cad7f1.js";import{c as r}from"./p-e8ec030e.js";import{d as l}from"./p-e0e2e9c1.js";import{d as h}from"./p-8a9d4e12.js";var f;(function(e){e["HORIZONTAL"]="horizontal";e["VERTICAL"]="vertical"})(f||(f={}));const b={root:"gov-card",header:"gov-card__header",arrow:"gov-card__arrow",inner:"gov-card__inner",img:"gov-card__img",icon:"gov-card__icon",content:"gov-card__content",footer:"gov-card__footer"};var m;(function(e){e["A"]="a";e["DIV"]="div"})(m||(m={}));const v=e(class e extends i{constructor(){super();this.__registerHost();this.govToggle=s(this,"gov-toggle",7);this.hydrated=false;this.direction="vertical";this.collapsible=false;this.open=true;this.href=undefined;this.target=undefined;this.accessibleTriggerLabel=undefined;this.accessibleTriggerLabelledBy=undefined;this.h=c(this.host);this.headlineId=o("GovCardHeadline");this.contentId=o("GovCardContent")}async componentDidRender(){if(r()){await l(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const e=this.href?m.A:m.DIV;return t(a,{key:"3a11dfeface1fa81d0c27f4ee3644c1c3b3a0191",class:this.h.classes(b.root),open:this.open,collapsible:d(this.collapsible),clickable:this.href?true:null,direction:this.direction,hydrated:this.hydrated},this.collapsible?t("button",{id:this.headlineId,class:b.header,"aria-label":this.accessibleTriggerLabel,"aria-labelledby":this.accessibleTriggerLabelledBy,"aria-expanded":d(this.open),"aria-controls":this.contentId,onClick:this.onClickHandler.bind(this)},t("slot",{name:"headline"}),t("gov-icon",{class:b.arrow,name:"chevron-down",type:"components"})):this.h.hasSlot("headline")?t("div",{class:b.header},t("slot",{name:"headline"})):null,t(e,{key:"bdf47c610db6c937ebe9f6fa45124b5df8e2847f",href:this.href,target:this.target,id:this.contentId,"aria-hidden":this.collapsible?d(!this.open):undefined,hidden:this.collapsible?!this.open:undefined,"aria-labelledby":this.collapsible?this.headlineId:undefined,class:b.inner},this.h.hasSlot("img")&&t("div",{key:"11ed1b55fe67d05382d538c903726ffd84fb7d48",class:b.img},t("slot",{key:"b1c362609163af2748256ecd1370bd074b8cd396",name:"img"})),this.h.hasSlot("icon")&&t("div",{key:"70b848927a86419442be3a84ee060c27a87fa12b",class:b.icon},t("slot",{key:"357b5dffa7c0970495ed167ca9a5db0b8d67c721",name:"icon"})),t("div",{key:"0bec7d7dc66dda27ba05e9041caeca8f20def8c4",class:b.content},t("slot",{key:"e3b08eb1097e0d788df4a45f78711bd0a5f02656"})),this.h.hasSlot("footer")&&t("div",{key:"0f4ef687f88e18a935d8f651bb7d2a9ea2c3df97",class:b.footer},t("slot",{key:"d645292f3ee9f007d9aeffdefcf2c26a1e5415b1",name:"footer"}))))}onClickHandler(e){e.stopPropagation();if(this.collapsible){this.open=!this.open;this.govToggle.emit({open:this.open,element:this.host})}}async validateAccessibility(){if(this.collapsible){n(this.accessibleTriggerLabel,this.accessibleTriggerLabelledBy,b.root,this.host)}}get host(){return this}},[4,"gov-card",{direction:[1],collapsible:[4],open:[1540],href:[513],target:[1],accessibleTriggerLabel:[1,"accessible-label"],accessibleTriggerLabelledBy:[1,"accessible-labelledby"],validateAccessibility:[64]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-card","gov-icon"];e.forEach((e=>{switch(e){case"gov-card":if(!customElements.get(e)){customElements.define(e,v)}break;case"gov-icon":if(!customElements.get(e)){h()}break}}))}g();const p=v;const u=g;export{p as GovCard,u as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-card.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as o,d as s}from"./p-
|
|
1
|
+
import{G as o,d as s}from"./p-d2d05f02.js";const t=o;const d=s;export{t as GovChip,d as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-chip.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as i,h as a,d as t}from"./p-42200001.js";import{g as o,a as c,c as l}from"./p-ea7fdd2e.js";import{c as d}from"./p-e8ec030e.js";import{b}from"./p-10cad7f1.js";import{c as n}from"./p-cd6c2938.js";import{t as h}from"./p-26618322.js";import{d as r}from"./p-e0c3b1a7.js";import{d as f}from"./p-
|
|
1
|
+
import{p as e,H as s,c as i,h as a,d as t}from"./p-42200001.js";import{g as o,a as c,c as l}from"./p-ea7fdd2e.js";import{c as d}from"./p-e8ec030e.js";import{b}from"./p-10cad7f1.js";import{c as n}from"./p-cd6c2938.js";import{t as h}from"./p-26618322.js";import{d as r}from"./p-e0c3b1a7.js";import{d as f}from"./p-4fb591c3.js";import{d as g}from"./p-8a9d4e12.js";const m={root:"gov-dialog",dialog:"gov-dialog__dialog",inner:"gov-dialog__inner",header:"gov-dialog__header",title:"gov-dialog__title",content:"gov-dialog__content",close:"gov-dialog__close",footer:"gov-dialog__footer",bodyFix:"body-fixed"};const p=e(class e extends s{constructor(){super();this.__registerHost();this.govClose=i(this,"gov-close",7);this.hydrated=false;this.open=false;this.blockClose=false;this.blockBackdropClose=false;this.role="dialog";this.labelTag="h2";this.accessibleLabelledBy=undefined;this.accessibleDescribedBy=undefined;this.accessibleCloseLabel="Zavřít okno";this.accessibleCloseLabelledBy=undefined;this.h=o(this.host);this.labelId=n("GovDialogLabel");this.contentId=n("GovDialogContent")}watchOpen(e){this.open=e;this.setFocus().finally()}showDialog(){this.open=true;document.body.classList.add(m.bodyFix)}hideDialog(){this.open=false;document.body.classList.remove(m.bodyFix)}async componentDidRender(){if(d()){h((()=>this.validateAccessibility()))}if(this.open){this.showDialog()}else{this.hideDialog()}}connectedCallback(){this.hydrated=true}disconnectedCallback(){document.body.classList.remove(m.bodyFix)}render(){return a(t,{key:"d4185a1b611db509ebf08509afa23b6e1682fe6f",class:this.h.classes(m.root),open:this.open,hydrated:this.hydrated},a("dialog",{key:"6a9624025826c1bd0eb7e83739112cf7b2d56dbc",class:m.dialog,hidden:!this.open,tabindex:c(this.open),open:this.open,"aria-modal":"true","aria-hidden":l(!this.open),"aria-labelledby":this.accessibleLabelledBy||this.labelId,"aria-describedby":this.accessibleDescribedBy||this.contentId,role:this.role},a("div",{key:"1f93dc885aad9898151e00ca4717c8dd8eeea1ff",class:m.inner},a("div",{key:"4455c3f5f5e6aa9e6ec84ce400ead24a3e526374",class:m.header},this.h.hasSlot("icon")&&a("span",{key:"40bd7dba7f121d87e00b48b5c4f3ed0c01f5d4a0"},a("slot",{key:"911f36f5199cde0f6561da2385934bb88e668c68",name:"icon"})),this.h.hasSlot("title")&&a("span",{key:"1e45df978ffc0f360d242d24e826b4df41188196",class:m.title,id:this.labelId},a("slot",{key:"920d60a3305db5b2b7963e6e0c795dbe49101f40",name:"title"})),a("gov-button",{key:"42a64cd1706ba71362bc0bc0b8d69e9867ec5fb1",ref:e=>this.closeCtaRef=e,disabled:this.blockClose,class:m.close,color:"primary","aria-label":this.accessibleCloseLabel,"aria-labelledby":this.accessibleCloseLabelledBy,type:"base",size:"m","on-gov-click":this.onCloseHandler.bind(this)},a("gov-icon",{key:"480265e99c21126cbb755df8e6c6f482f69fb92b",slot:"icon-start",name:"x-lg",type:"components"}))),a("div",{key:"dc16ca442fbb779b8d0c127253324d2894e1b1e5",class:m.content,id:this.contentId},a("slot",{key:"a721e2e66951a436c2a7c946648e15cd1043a7c1"})),this.h.hasSlot("footer")&&a("div",{key:"ea53d2a6284285c3b33a346784f783e69cc6ff4a",class:m.footer},a("slot",{key:"1693aec930d48ffd79505638b4b03df4e50529f5",name:"footer"})))),this.open?a("gov-backdrop",{disabled:this.blockBackdropClose,"aria-label":this.accessibleCloseLabel,"aria-labelled-by":this.accessibleCloseLabelledBy,"on-gov-click":this.onCloseHandler.bind(this)}):null)}onCloseHandler(e){e.stopPropagation();e.preventDefault();if(this.blockClose===false){this.hideDialog();this.govClose.emit(e)}}async setFocus(){if(this.open&&this.closeCtaRef){this.closeCtaRef.setFocus().catch()}}async validateAccessibility(){b(this.accessibleLabelledBy,"accessible-labelled-by",m.root);b(this.accessibleDescribedBy,"accessible-described-by",m.root)}get host(){return this}static get watchers(){return{open:["watchOpen"]}}},[4,"gov-dialog",{open:[1540],blockClose:[4,"block-close"],blockBackdropClose:[4,"block-backdrop-close"],role:[1],labelTag:[1,"label-tag"],accessibleLabelledBy:[1,"accessible-labelled-by"],accessibleDescribedBy:[1,"accessible-described-by"],accessibleCloseLabel:[1,"accessible-close-label"],accessibleCloseLabelledBy:[1,"accessible-close-labelled-by"],setFocus:[64],validateAccessibility:[64]},undefined,{open:["watchOpen"]}]);function y(){if(typeof customElements==="undefined"){return}const e=["gov-dialog","gov-backdrop","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-dialog":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-backdrop":if(!customElements.get(e)){r()}break;case"gov-button":if(!customElements.get(e)){f()}break;case"gov-icon":if(!customElements.get(e)){g()}break}}))}y();const k=p;const v=y;export{k as GovDialog,v as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-dialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as o,d as s}from"./p-
|
|
1
|
+
import{G as o,d as s}from"./p-a7917b98.js";const t=o;const a=s;export{t as GovFormAutocomplete,a as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-form-autocomplete.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as i,c as s,h as e,d as h}from"./p-42200001.js";import{c as n}from"./p-cd6c2938.js";import{v as o}from"./p-0b3574c2.js";import{g as a,d as r,e as c}from"./p-9908b9f0.js";import{g as d,c as l,t as m}from"./p-ea7fdd2e.js";import{F as u}from"./p-1c1d0bbe.js";import{i as f,A as p,a as v}from"./p-33d5d1ed.js";import{d as b}from"./p-
|
|
1
|
+
import{p as t,H as i,c as s,h as e,d as h}from"./p-42200001.js";import{c as n}from"./p-cd6c2938.js";import{v as o}from"./p-0b3574c2.js";import{g as a,d as r,e as c}from"./p-9908b9f0.js";import{g as d,c as l,t as m}from"./p-ea7fdd2e.js";import{F as u}from"./p-1c1d0bbe.js";import{i as f,A as p,a as v}from"./p-33d5d1ed.js";import{d as b}from"./p-8a9d4e12.js";const g=t(class t extends i{constructor(){super();this.__registerHost();this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govChange=s(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.checked=false;this.required=false;this.disabled=false;this.indeterminate=false;this.name=undefined;this.size="m";this.identifier=undefined;this.noLabel=false;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=n("GovCheckbox");this.h=d(this.host);this.f=a(this.h)}validateSize(t){o(c,t,r.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("type","checkbox")}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=f(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(v)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}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})}render(){const t=t=>{if(this.noLabel){return e("label",{class:r.label},t)}return t};return e(h,{class:r.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:m(this.invalid)},t(e(u,null,e("input",Object.assign({id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,ref:t=>this.inputRef=t},this.inheritedAttributes,{"aria-checked":l(this.checked),"aria-required":m(this.required),"aria-invalid":m(this.invalid),"aria-disabled":m(this.disabled)})),e("span",null,e("slot",{name:"label"}),e("gov-icon",{class:r.check,name:"check-lg",type:"components"}),e("gov-icon",{class:r.indeterminate,name:"dash-lg",type:"components"})))))}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onClickHandler(t){t.stopPropagation()}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-checkbox",{value:[1],checked:[1540],required:[4],disabled:[516],indeterminate:[516],name:[1],size:[513],identifier:[1],noLabel:[4,"no-label"],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-checkbox","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-checkbox":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-icon":if(!customElements.get(t)){b()}break}}))}k();const C=g;const A=k;export{C as GovFormCheckbox,A as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-form-checkbox.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,d as o}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{g as n,c as r,t as h}from"./p-ea7fdd2e.js";import{g as l}from"./p-9908b9f0.js";import{A as c,a as f,i as m}from"./p-33d5d1ed.js";import{d}from"./p-022e49cf.js";import{d as u}from"./p-
|
|
1
|
+
import{p as t,H as e,c as s,h as i,d as o}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{g as n,c as r,t as h}from"./p-ea7fdd2e.js";import{g as l}from"./p-9908b9f0.js";import{A as c,a as f,i as m}from"./p-33d5d1ed.js";import{d}from"./p-022e49cf.js";import{d as u}from"./p-ffc3a0df.js";import{d as p}from"./p-4fb591c3.js";import{d as g}from"./p-de989dfe.js";import{d as v}from"./p-8a9d4e12.js";const b={root:"gov-form-file",area:"gov-form-file__area",input:"gov-form-file__input",attachments:"gov-form-file__attachments"};function y(t){const e=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let s=0,i=parseInt(t,10)||0;while(i>=1024&&++s){i=i/1024}return i.toFixed(i<10&&s>0?1:0)+" "+e[s]}function E(t,e){if(typeof e==="string"&&e.length){return e.replace(/\s/g,"").split(",").filter((e=>new RegExp(e.replace("*",".*")).test(t.type))).length>0}else{return true}}function A(t,e){const s=Math.round(t.size);return s<=e}const k=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govFiles=s(this,"gov-files",7);this.govAddFile=s(this,"gov-add-file",7);this.govRemoveFile=s(this,"gov-remove-file",7);this.eventsRegistered=false;this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=false;this.ignoreFileDuplicationCheck=false;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.multiple=false;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.accessibleAttachmentsLabel="Přílohy";this.files=[];this.inheritedAttributes={};this.fileId=a("GovInputFile");this.h=n(this.host);this.f=l(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","File")}registerListeners(){if(this.eventsRegistered){return}this.eventsRegistered=true;function t(){this.areaRef.classList.add("highlight")}function e(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(t=>{t.preventDefault();t.stopPropagation();const e=t.target.files;if(this.resetAfterPick){if(e.length){this.validateFiles(e)}}else{this.validateFiles(e)}}),false);if(this.expanded){const s=["dragover","dragleave"];const i=["dragenter","dragover","mouseenter"];const o=["dragleave","mouseleave"];s.map((t=>this.inputRef.addEventListener(t,this.preventDefaults.bind(this),false)));i.map((e=>this.inputRef.addEventListener(e,t.bind(this),false)));o.forEach((t=>this.inputRef.addEventListener(t,e.bind(this),false)))}}preventDefaults(t){t.preventDefault();t.stopPropagation()}handleDrop(t){const e=t.dataTransfer;this.validateFiles(e.files)}validateFiles(t){let e=[];Array.from(t).map((t=>{const s=this.files.find((e=>e.file.name===t.name&&e.file.size===t.size))||null;if(s===null||this.ignoreFileDuplicationCheck){const s=typeof this.maxFileSize==="number"&&this.maxFileSize>0?A(t,this.maxFileSize):true;const i=E(t,this.accept);const o={id:a("GovFormFile"),file:t,acceptValid:i,sizeValid:s};if(this.displayAttachments){this.files=[...this.files,o]}else{e=[...e,o]}this.govAddFile.emit({component:b.root,file:o})}}));this.govFiles.emit({component:b.root,files:e.length?e:this.files});if(this.resetAfterPick){this.reset().finally()}}componentDidLoad(){this.attributeObserver=new c(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(f)}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs();this.inheritedAttributes=m(this.host)}async componentDidRender(){this.registerListeners()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){return i(o,{key:"6fe6eb71a8275871bb0aeebae9531d846123ae06",class:this.h.classes([b.root]),invalid:h(this.invalid),expanded:h(this.expanded)},i("div",{key:"cd7ab5a0c223214f5d825c8695993e8c64b9ea78",class:b.area,ref:t=>this.areaRef=t},i("slot",{key:"6197c08c6a50725a261da65069159f75e3e47834"}),i("input",Object.assign({key:"f6897d875af8c47268118ef5d7dd9c19cec6e9a1",class:b.input,ref:t=>this.inputRef=t,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,multiple:this.multiple,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled},this.inheritedAttributes,{"aria-required":h(this.required),"aria-invalid":h(this.invalid),"aria-disabled":h(this.disabled)}))),this.h.hasSlot("attachments")?i("div",{class:b.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:b.attachments},i("gov-attachments",{label:this.accessibleAttachmentsLabel,"accessible-label":this.accessibleAttachmentsLabel},this.files.map((t=>i("gov-attachments-item",{"accessible-remove-labelledby":t.id,"on-gov-remove":()=>this.onRemoveFileHandler(t)},i("span",{class:"sr-only",id:t.id},this.accessibleRemoveLabel.replace("{FILE_NAME}",t.file.name)),t.file.name,t.acceptValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),t.acceptValid===false?this.errorAccept:null):null,t.sizeValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),this.errorSize.replace("{FILE_SIZE}",y(this.maxFileSize))):null,i("span",{slot:"info"},"(",y(t.file.size),")")))))):null)}onRemoveFileHandler(t){const e=this.files.findIndex((e=>e.id===t.id));if(e!==-1){const t=this.files;const s=this.files[e];t.splice(e,1);this.files=[...t];this.govRemoveFile.emit({component:b.root,file:s});this.govFiles.emit({component:b.root,files:t})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:b.root,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:b.root,originalEvent:t})}onChangeHandler(t){t.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];this.inputRef.value=""}get host(){return this}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-file",{expanded:[4],required:[4],disabled:[516],resetAfterPick:[4,"reset-after-pick"],ignoreFileDuplicationCheck:[4,"ignore-file-duplication-check"],displayAttachments:[4,"display-attachments"],name:[1],accept:[1],multiple:[4],maxFileSize:[2,"max-file-size"],identifier:[1],invalid:[4],errorSize:[1,"error-size"],errorAccept:[1,"error-accept"],accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleAttachmentsLabel:[1,"accessible-attachments-label"],files:[32],inheritedAttributes:[32],getRef:[64],getAreaRef:[64],reset:[64]},undefined,{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function j(){if(typeof customElements==="undefined"){return}const t=["gov-form-file","gov-attachments","gov-attachments-item","gov-button","gov-form-message","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-file":if(!customElements.get(t)){customElements.define(t,k)}break;case"gov-attachments":if(!customElements.get(t)){d()}break;case"gov-attachments-item":if(!customElements.get(t)){u()}break;case"gov-button":if(!customElements.get(t)){p()}break;case"gov-form-message":if(!customElements.get(t)){g()}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}j();const F=k;const C=j;export{F as GovFormFile,C as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-form-file.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as
|
|
1
|
+
import{G as d,d as o}from"./p-8d1d7dd5.js";const s=d;const t=o;export{s as GovFormInput,t as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-form-input.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,c as i,h as s,d as o}from"./p-42200001.js";import{g as a,h as n,i as h}from"./p-9908b9f0.js";import{g as l,c as r,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-0b3574c2.js";import{c as u,r as f}from"./p-cd6c2938.js";import{p as m}from"./p-be086357.js";import{t as v}from"./p-26618322.js";import{A as p,a as b}from"./p-33d5d1ed.js";import{d as g}from"./p-
|
|
1
|
+
import{p as t,H as e,c as i,h as s,d as o}from"./p-42200001.js";import{g as a,h as n,i as h}from"./p-9908b9f0.js";import{g as l,c as r,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-0b3574c2.js";import{c as u,r as f}from"./p-cd6c2938.js";import{p as m}from"./p-be086357.js";import{t as v}from"./p-26618322.js";import{A as p,a as b}from"./p-33d5d1ed.js";import{d as g}from"./p-4fb591c3.js";import{d as y}from"./p-a7917b98.js";import{d as k}from"./p-8d1d7dd5.js";import{d as j}from"./p-8a9d4e12.js";import{d as w}from"./p-b60d627f.js";const O=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.govSelect=i(this,"gov-select",7);this.govRemove=i(this,"gov-remove",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.placeholder=undefined;this.size="m";this.name=undefined;this.hideSelectedList=false;this.required=false;this.disabled=false;this.invalid=undefined;this.success=undefined;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.inheritedAttributes={};this.selectId=u("GovSelect");this.listId=u("GovMultiList");this.h=l(this.host);this.f=a(this.h)}validateSize(t){d(h,t,n.root)}watchOptions(t){this.optionsState=m(t)}watchValue(t){this.selectedOptionsState=m(t)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(b);this.initAutocomplete()}componentWillLoad(){this.validateSize(this.size);this.optionsState=m(this.options);this.selectedOptionsState=m(this.value)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}getAvailableOptions(t=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(t){return this.optionsState}return this.optionsState.filter((t=>{const e=this.selectedValueIndex(t.value);return e!==-1||(t===null||t===void 0?void 0:t.disabled)?false:true})).map((t=>{var e;return{name:(e=t.label)!==null&&e!==void 0?e:t.value,value:t.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((e=>{if(t){return true}const i=this.selectedValueIndex(e.value);return!(e.disabled||e.selected||i>-1)})).map((t=>({name:t.textContent,value:t.value})))}initAutocomplete(){var t,e,i,s,o;(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-select",this.onSelectHandler.bind(this));(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-input",this.onInputHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-focus",this.onFocusHandler.bind(this));(s=this.autocompleteRef)===null||s===void 0?void 0:s.addEventListener("gov-blur",this.onBlurHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.setSearchCallback((t=>new Promise((e=>{const i=this.getAvailableOptions();if(String(t).length===0){return e(i)}e(i.filter((({label:e,value:i})=>{if(!e)e=i;return f(e).toLowerCase().indexOf(f(t).toLowerCase())>-1})))})))).finally()}selectedValueIndex(t){return this.selectedOptionsState.findIndex((e=>e===t))}getOptionElement(t){return this.selectRef.querySelector('option[value="'+t+'"]')}getOption(t){var e;return(e=this.getAvailableOptions(true).find((e=>e.value===t)))!==null&&e!==void 0?e:null}selectOption(t,e=true){const i=this.selectedValueIndex(t);if(i===-1){this.selectedOptionsState=[...this.selectedOptionsState,t];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:n.root,value:this.selectedOptionsState});this.govSelect.emit({component:n.root,value:this.selectedOptionsState})}const i=this.getOptionElement(t);if(i){i.selected=true}}}removeOption(t,e=true){const i=this.selectedValueIndex(t);if(i!==-1){this.selectedOptionsState.splice(i,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:n.root,value:this.selectedOptionsState});this.govRemove.emit({component:n.root,value:this.selectedOptionsState})}const s=this.getOptionElement(t);if(s){s.selected=false}}}async componentDidRender(){this.f.passAttrToLabel("required",String(this.required));v((()=>{this.selectRef.querySelectorAll("option").forEach((t=>{if(t.selected){this.selectOption(t.value,false)}}))}))}render(){return s(o,{key:"efc41cd22f35a7c326f8321f11c875a6ee6d44fe",class:n.root,size:this.size},s("div",{key:"229b01f0a9b0cb35e59cda5ce5a78c14309ab1ee",class:n.wrap},this.h.hasSlot("prefix")&&s("slot",{key:"48cefdbe753f57acca0aa5fc74bc7cc6f902e4b7",name:"prefix"}),s("gov-form-autocomplete",{key:"a4a3e0f0fb0f9e3d9ec0ce8d24b390a169f0749a",value:this.valueState,disabled:this.disabled,identifier:this.identifier||this.selectId,required:false,invalid:this.invalid,success:this.success,size:this.size,placeholder:this.placeholder,"message-empty":this.messageEmpty,"message-loading":this.messageLoading,ref:t=>this.autocompleteRef=t,minlength:0,"aria-owns":this.listId},this.success&&s("gov-icon",{key:"8a43c6c12f16773956b669b7cd08608d6aeb3bb9",slot:"validation-icon",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&s("gov-icon",{key:"6eaee1ebf4ac9c337e22b071edf77fbeec012a3c",slot:"validation-icon",class:"validation-icon",name:"exclamation-lg",type:"components"}),s("gov-icon",{key:"c9f7f2f83f37abdab373bfb2aa43c36ec08dfede",slot:"icon-end",class:"arrow-icon",name:"chevron-down",type:"components"})),s("select",Object.assign({key:"d4623e47694c6b28b5e201f083e6d73fa6a331aa",hidden:true,class:"hidden-select-list","aria-hidden":r(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":c(this.disabled),"aria-required":c(this.required),"aria-invalid":c(this.invalid)}),s("slot",{key:"f5e03e3e33a1bb97b00c544765332b67812c5fd5"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var e;const i=this.selectedValueIndex(t.value);return s("option",{value:t.value,selected:i>-1,disabled:t===null||t===void 0?void 0:t.disabled},(e=t.label)!==null&&e!==void 0?e:t.value)}))),this.h.hasSlot("sufix")&&s("slot",{key:"aa9c37047083aa68a9ccaf8066a62a2eb9a3797f",name:"sufix"})),this.hideSelectedList===false?s("ul",{role:"listbox",id:this.listId,class:n.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((t=>{var e,i;const o=this.getOption(t);if(!o)return null;return s("li",{class:n.item,role:"option"},(e=o.label)!==null&&e!==void 0?e:o.value,s("gov-button",{"aria-label":(i="Odebrat vybranou položku "+o.label)!==null&&i!==void 0?i:o.value,color:"primary",type:"base",size:this.size,"on-gov-click":()=>this.onTagRemove(t)},s("gov-icon",{name:"x-lg",type:"components"})))}))):null)}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:n.root,originalEvent:t,value:this.selectedOptionsState})}onBlurHandler(t){t.stopPropagation();t.stopPropagation();this.focused=false;this.govBlur.emit({component:n.root,originalEvent:t,value:this.selectedOptionsState})}onInputHandler(t){this.valueState=t.detail.value;t.stopPropagation()}onSelectHandler(t){t.stopPropagation();const e=t.detail.selected;this.selectOption(e.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(t){this.removeOption(t)}async setFocus(t){return this.selectRef.focus(t)}async setValue(t){this.valueState=t}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}}},[4,"gov-form-multi-select",{value:[1537],options:[1537],identifier:[1],placeholder:[1],size:[1],name:[1],hideSelectedList:[4,"hide-selected-list"],required:[4],disabled:[516],invalid:[516],success:[4],messageEmpty:[1,"message-empty"],messageLoading:[1,"message-loading"],focused:[32],valueState:[32],selectedOptionsState:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],setValue:[64],getRef:[64]},undefined,{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-multi-select","gov-button","gov-form-autocomplete","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-multi-select":if(!customElements.get(t)){customElements.define(t,O)}break;case"gov-button":if(!customElements.get(t)){g()}break;case"gov-form-autocomplete":if(!customElements.get(t)){y()}break;case"gov-form-input":if(!customElements.get(t)){k()}break;case"gov-icon":if(!customElements.get(t)){j()}break;case"gov-skeleton":if(!customElements.get(t)){w()}break}}))}E();const S=O;const x=E;export{S as GovFormMultiSelect,x as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-form-multi-select.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as s,c as i,h as e,d as n}from"./p-42200001.js";import{p as o}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";import{g as h,c as r,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-0b3574c2.js";import{A as l,a as u,i as f}from"./p-33d5d1ed.js";import{g as m}from"./p-9908b9f0.js";import{t as p}from"./p-26618322.js";import{b
|
|
1
|
+
import{p as t,H as s,c as i,h as e,d as n}from"./p-42200001.js";import{p as o}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";import{g as h,c as r,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-0b3574c2.js";import{A as l,a as u,i as f}from"./p-33d5d1ed.js";import{g as m}from"./p-9908b9f0.js";import{t as p}from"./p-26618322.js";import{b}from"./p-2fe7d728.js";import{c as v}from"./p-cd6c2938.js";import{d as g}from"./p-4fb591c3.js";import{d as j}from"./p-8d1d7dd5.js";import{d as w}from"./p-8a9d4e12.js";const A=o(a,["_S","_M","_L"]);const y={root:"gov-form-range",fill:"gov-form-range--fill",input:"gov-form-range--input"};const C=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.size="m";this.value=undefined;this.identifier=undefined;this.name=undefined;this.min=undefined;this.max=undefined;this.step=undefined;this.tooltip=false;this.input=false;this.listIdentifier=undefined;this.required=false;this.success=undefined;this.invalid=undefined;this.disabled=false;this.inheritedAttributes={};this.h=h(this.host);this.f=m(this.h);this.inputId=v("GovInput")}validateSize(t){d(A,t,y.root)}watchValue(){this.controlOutputPosition()}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("invalid",r(this.invalid))}get getThumbWidth(){const t=window.getComputedStyle(this.inputRef);return parseFloat(t.getPropertyValue("--thumb-size"))||1}controlOutputPosition(){const t=+this.value;const s=+this.inputRef.min;const i=+this.inputRef.max;const e=this.getThumbWidth*16;const n=this.inputRef.offsetWidth;const o=(t-s)/(i-s)*100;let a=o/100*(n-e)+e/2;if(this.outputRef){this.outputRef.textContent=this.value;const t=this.outputRef.offsetWidth/2;this.outputRef.style.left=`${a-t}px`}if(this.fillRef){this.fillRef.style.width=`${a}px`}}componentDidLoad(){this.attributeObserver=new l(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(u)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=f(this.host)}componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));p(this.controlOutputPosition.bind(this))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}render(){return e(n,{key:"87236e8cdb0534dbefc72286517c353d41860260",class:y.root,size:this.size},this.h.hasSlot("prefix")&&e("slot",{key:"83f2b5ff50d7638d1e13de9e0f4774d747a8e374",name:"prefix"}),e("span",{key:"7cef4eac6144ee71dd6b3ffcdc2e992f33f97740",class:"element"},e("input",Object.assign({key:"1c2fda25454dc11bdfab17065f07bb38959a2941",type:"range",ref:t=>this.inputRef=t,onInput:this.onInputHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),id:this.identifier||this.inputId,name:this.name,min:this.min,max:this.max,step:this.step,list:this.listIdentifier,value:this.value,required:this.required,disabled:this.disabled},this.inheritedAttributes,{"aria-required":c(this.required),"aria-invalid":c(this.invalid),"aria-disabled":c(this.disabled)})),e("div",{key:"bdece1cc0cad1614eb090e9183d9dd96389b7568",class:y.fill,ref:t=>this.fillRef=t}),this.tooltip?e("output",{htmlFor:this.name,ref:t=>this.outputRef=t},this.value):null,e("slot",{key:"4e346163e119d7508942a31bc35b28acd807bdb3",name:"datalist"})),this.h.hasSlot("sufix")&&e("slot",{key:"3faaf9ba94069c9a7f3a147e9a6ecfec7a38edc7",name:"sufix"}),this.input?e("gov-form-input",Object.assign({"on-gov-input":this.onCustomInputHandler.bind(this),class:y.input,size:this.size,value:this.value,disabled:this.disabled},this.inheritedAttributes)):null)}onCustomInputHandler(t){const s=t.target.value;if(this.step&&b(+this.step)){const i=+s;const e=+this.min;const n=+this.max;const o=+this.step;if(isNaN(i)){return false}if(i<e||i>n){return false}const a=i-e;if(a%o!==0){return false}this.value=s;this.govInput.emit({component:y.root,value:this.value,originalEvent:t})}}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:y.root,value:this.value,originalEvent:t})}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:y.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:y.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 this}static get watchers(){return{size:["validateSize","watchControlAttrs"],value:["watchValue"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}},[4,"gov-form-range",{size:[1],value:[1537],identifier:[1],name:[1],min:[8],max:[8],step:[8],tooltip:[4],input:[4],listIdentifier:[1,"list-identifier"],required:[516],success:[516],invalid:[516],disabled:[516],inheritedAttributes:[32],setFocus:[64],setValue:[64],clearValue:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],value:["watchValue"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-range","gov-button","gov-form-input","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-range":if(!customElements.get(t)){customElements.define(t,C)}break;case"gov-button":if(!customElements.get(t)){g()}break;case"gov-form-input":if(!customElements.get(t)){j()}break;case"gov-icon":if(!customElements.get(t)){w()}break}}))}k();const x=C;const z=k;export{x as GovFormRange,z as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=gov-form-range.js.map
|