@haiilo/catalyst 13.1.0 → 13.2.0
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/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/{p-0f66432a.entry.js → p-1823cdaa.entry.js} +2 -2
- package/dist/catalyst/p-1823cdaa.entry.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +6 -6
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/cat-input/cat-input.css +12 -1
- package/dist/collection/components/cat-input/cat-input.js +43 -5
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/components/cat-input2.js +8 -6
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/esm/cat-alert_30.entry.js +6 -6
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/esm/catalyst.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cat-input/cat-input.d.ts +8 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +2 -2
- package/dist/catalyst/p-0f66432a.entry.js.map +0 -1
package/dist/cjs/catalyst.cjs.js
CHANGED
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy(JSON.parse("[[\"cat-alert_30.cjs\",[[0,\"cat-select-demo\"],[17,\"cat-date\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"placement\":[1],\"dateMaskOptions\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"min\":[\"onMinChanged\"],\"max\":[\"onMaxChanged\"]}],[17,\"cat-time\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"placement\":[1],\"step\":[2],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"selectionTime\":[32],\"isAm\":[32],\"valueChangedBySelection\":[32],\"select\":[64],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},[[0,\"catOpen\",\"onOpen\"]],{\"min\":[\"onMinChanged\"],\"max\":[\"onMaxChanged\"],\"value\":[\"onValueChanged\"]}],[1,\"cat-datepicker\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"mode\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"step\":[2],\"attachToElement\":[4,\"attach-to-element\"],\"position\":[1],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"nativePickerAttributes\":[16,\"native-picker-attributes\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]},null,{\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"readonly\":[\"onDisabledChanged\"],\"mode\":[\"onDisabledChanged\"],\"min\":[\"onMinChanged\"],\"max\":[\"onMinChanged\"]}],[17,\"cat-tabs\",{\"activeTab\":[1537,\"active-tab\"],\"tabsAlign\":[1,\"tabs-align\"],\"adaptive\":[4],\"activeTabAlwaysVisible\":[4,\"active-tab-always-visible\"],\"tabs\":[32],\"hiddenTabs\":[32],\"setActive\":[64],\"setActiveIndex\":[64],\"updateAdaptiveTabs\":[64]},[[0,\"keydown\",\"onKeydown\"]],{\"activeTab\":[\"onActiveTabChange\"]}],[17,\"cat-pagination\",{\"page\":[1026],\"pageCount\":[2,\"page-count\"],\"activePadding\":[2,\"active-padding\"],\"sidePadding\":[2,\"side-padding\"],\"size\":[1],\"variant\":[1],\"round\":[4],\"compact\":[4],\"iconPrev\":[1,\"icon-prev\"],\"iconNext\":[1,\"icon-next\"]}],[17,\"cat-tag\",{\"requiredMarker\":[1,\"required-marker\"],\"disabled\":[4],\"placeholder\":[1],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"name\":[1],\"labelHidden\":[4,\"label-hidden\"],\"required\":[4],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"value\":[1040],\"clearable\":[4],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"tagCreationChars\":[16,\"tag-creation-chars\"],\"addOnBlur\":[4,\"add-on-blur\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"tags\":[32],\"errorMap\":[32]},[[0,\"keydown\",\"onKeyDown\"]],{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-alert\",{\"color\":[513],\"icon\":[1],\"noIcon\":[4,\"no-icon\"]}],[1,\"cat-badge\",{\"variant\":[513],\"color\":[513],\"size\":[513],\"round\":[516],\"pulse\":[516],\"icon\":[1],\"iconOnly\":[8,\"icon-only\"],\"iconRight\":[4,\"icon-right\"],\"_iconOnly\":[32]},null,{\"iconOnly\":[\"onIconOnlyChanged\"]}],[81,\"cat-textarea\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"disabled\":[4],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"maxLength\":[2,\"max-length\"],\"minLength\":[2,\"min-length\"],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"rows\":[2],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"hasSlottedCounter\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-button-group\",{\"a11yLabel\":[1,\"a11y-label\"]}],[1,\"cat-card\"],[1,\"cat-datepicker-inline\",{\"disabled\":[4],\"max\":[1],\"min\":[1],\"mode\":[1],\"readonly\":[4],\"step\":[2],\"value\":[1025],\"nativePickerAttributes\":[16,\"native-picker-attributes\"]},null,{\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"readonly\":[\"onDisabledChanged\"]}],[1,\"cat-form-group\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"labelSize\":[1,\"label-size\"]},null,{\"requiredMarker\":[\"onRequiredMarkerChanged\"],\"horizontal\":[\"onHorizontalChanged\"]}],[17,\"cat-radio\",{\"checked\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-radio-group\",{\"name\":[1],\"value\":[1032],\"disabled\":[4],\"a11yLabel\":[1,\"a11y-label\"],\"labelLeft\":[4,\"label-left\"]},[[0,\"keydown\",\"onKeydown\"],[0,\"input\",\"onInput\"],[2,\"focus\",\"onFocus\"],[2,\"blur\",\"onBlur\"]],{\"name\":[\"onNameChanged\"],\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"labelLeft\":[\"onLabelLeftChanged\"]}],[1,\"cat-tab\",{\"label\":[513],\"icon\":[513],\"iconOnly\":[520,\"icon-only\"],\"iconRight\":[516,\"icon-right\"],\"url\":[513],\"urlTarget\":[513,\"url-target\"],\"deactivated\":[516],\"noActive\":[516,\"no-active\"],\"sticky\":[516],\"error\":[516],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"]},[[0,\"click\",\"onClick\"]]],[81,\"cat-toggle\",{\"checked\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"noValue\":[8,\"no-value\"],\"resolvedValue\":[1032,\"resolved-value\"],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-tooltip\",{\"content\":[1],\"disabled\":[4],\"placement\":[1],\"round\":[4],\"size\":[1],\"showDelay\":[2,\"show-delay\"],\"hideDelay\":[2,\"hide-delay\"],\"longTouchDuration\":[2,\"long-touch-duration\"],\"open\":[32]},[[8,\"keydown\",\"handleKeyDown\"]]],[17,\"cat-select\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"multiple\":[4],\"debounce\":[2],\"placement\":[1],\"value\":[1025],\"disabled\":[4],\"placeholder\":[1],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"name\":[1],\"labelHidden\":[4,\"label-hidden\"],\"required\":[4],\"clearable\":[4],\"tags\":[4],\"tagHint\":[1,\"tag-hint\"],\"noItems\":[1,\"no-items\"],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"connector\":[32],\"state\":[32],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64],\"connect\":[64]},[[0,\"blur\",\"onBlur\"],[0,\"keydown\",\"onKeyDown\"],[0,\"keyup\",\"onKeyUp\"]],{\"connector\":[\"onConnectorChanged\"],\"value\":[\"onValueChanged\"],\"errors\":[\"onErrorsChanged\"],\"state\":[\"onStateChanged\"]}],[17,\"cat-date-inline\",{\"noClear\":[4,\"no-clear\"],\"identifier\":[1],\"hint\":[4],\"noToday\":[4,\"no-today\"],\"weeks\":[4],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"min\":[1],\"max\":[1],\"range\":[4],\"required\":[4],\"a11yLabel\":[1,\"a11y-label\"],\"requiredMarker\":[1,\"required-marker\"],\"value\":[1025],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"viewDate\":[32],\"select\":[64],\"clear\":[64],\"resetView\":[64],\"doFocus\":[64]},[[0,\"keydown\",\"onKeyDown\"]]],[17,\"cat-avatar\",{\"size\":[1],\"round\":[4],\"label\":[1],\"initials\":[1],\"src\":[1],\"icon\":[1],\"url\":[1],\"urlTarget\":[1,\"url-target\"],\"backgroundImage\":[32]},null,{\"src\":[\"onSrcChanged\"]}],[65,\"cat-checkbox\",{\"checked\":[1028],\"indeterminate\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"noValue\":[8,\"no-value\"],\"resolvedValue\":[1032,\"resolved-value\"],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"requiredMarker\":[1,\"required-marker\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-scrollable\",{\"noShadowX\":[4,\"no-shadow-x\"],\"noShadowY\":[4,\"no-shadow-y\"],\"noOverflowX\":[4,\"no-overflow-x\"],\"noOverflowY\":[4,\"no-overflow-y\"],\"noOverscroll\":[4,\"no-overscroll\"],\"noScrolledInit\":[4,\"no-scrolled-init\"],\"scrolledBuffer\":[2,\"scrolled-buffer\"]}],[1,\"cat-skeleton\",{\"effect\":[1],\"variant\":[1],\"size\":[1],\"lines\":[2]}],[81,\"cat-input\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"togglePassword\":[4,\"toggle-password\"],\"disabled\":[4],\"loading\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[8],\"maxLength\":[2,\"max-length\"],\"min\":[8],\"minLength\":[2,\"min-length\"],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"round\":[4],\"type\":[1],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"timeMaskOptions\":[16,\"time-mask-options\"],\"dateMaskOptions\":[16,\"date-mask-options\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"hasSlottedCounter\":[32],\"isPasswordShown\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-dropdown\",{\"placement\":[1],\"justify\":[4],\"noAutoClose\":[4,\"no-auto-close\"],\"arrowNavigation\":[1,\"arrow-navigation\"],\"noResize\":[4,\"no-resize\"],\"overflow\":[4],\"noInitialFocus\":[4,\"no-initial-focus\"],\"isOpen\":[2052,\"is-open\"],\"noReturnFocus\":[4,\"no-return-focus\"],\"delayedTriggerInit\":[4,\"delayed-trigger-init\"],\"toggle\":[64],\"open\":[64],\"close\":[64]},[[0,\"catClick\",\"clickHandler\"]]],[17,\"cat-button\",{\"variant\":[1],\"color\":[1],\"active\":[4],\"size\":[1],\"name\":[1],\"value\":[1],\"disabled\":[4],\"loading\":[4],\"submit\":[4],\"noEllipsis\":[4,\"no-ellipsis\"],\"round\":[4],\"url\":[1],\"urlTarget\":[1,\"url-target\"],\"icon\":[1],\"iconOnly\":[8,\"icon-only\"],\"iconRight\":[4,\"icon-right\"],\"buttonId\":[1,\"button-id\"],\"a11yLabel\":[1,\"a11y-label\"],\"a11yCurrent\":[1,\"a11y-current\"],\"nativeAttributes\":[16,\"native-attributes\"],\"nativeContentAttributes\":[16,\"native-content-attributes\"],\"testId\":[1,\"test-id\"],\"buttonGroupPosition\":[1,\"button-group-position\"],\"_iconOnly\":[32],\"hasSlottedContent\":[32],\"doFocus\":[64],\"doBlur\":[64],\"doClick\":[64]},[[0,\"click\",\"haltDisabledEvents\"]],{\"iconOnly\":[\"onIconOnlyChanged\"]}],[1,\"cat-spinner\",{\"size\":[1],\"a11yLabel\":[1,\"a11y-label\"],\"value\":[2]}],[1,\"cat-icon\",{\"icon\":[1],\"iconSrc\":[1,\"icon-src\"],\"size\":[1],\"a11yLabel\":[1,\"a11y-label\"]}]]]]"), options);
|
|
22
|
+
return index.bootstrapLazy(JSON.parse("[[\"cat-alert_30.cjs\",[[0,\"cat-select-demo\"],[17,\"cat-date\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"placement\":[1],\"dateMaskOptions\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"min\":[\"onMinChanged\"],\"max\":[\"onMaxChanged\"]}],[17,\"cat-time\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"placement\":[1],\"step\":[2],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"selectionTime\":[32],\"isAm\":[32],\"valueChangedBySelection\":[32],\"select\":[64],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},[[0,\"catOpen\",\"onOpen\"]],{\"min\":[\"onMinChanged\"],\"max\":[\"onMaxChanged\"],\"value\":[\"onValueChanged\"]}],[1,\"cat-datepicker\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"mode\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"step\":[2],\"attachToElement\":[4,\"attach-to-element\"],\"position\":[1],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"nativePickerAttributes\":[16,\"native-picker-attributes\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]},null,{\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"readonly\":[\"onDisabledChanged\"],\"mode\":[\"onDisabledChanged\"],\"min\":[\"onMinChanged\"],\"max\":[\"onMinChanged\"]}],[17,\"cat-tabs\",{\"activeTab\":[1537,\"active-tab\"],\"tabsAlign\":[1,\"tabs-align\"],\"adaptive\":[4],\"activeTabAlwaysVisible\":[4,\"active-tab-always-visible\"],\"tabs\":[32],\"hiddenTabs\":[32],\"setActive\":[64],\"setActiveIndex\":[64],\"updateAdaptiveTabs\":[64]},[[0,\"keydown\",\"onKeydown\"]],{\"activeTab\":[\"onActiveTabChange\"]}],[17,\"cat-pagination\",{\"page\":[1026],\"pageCount\":[2,\"page-count\"],\"activePadding\":[2,\"active-padding\"],\"sidePadding\":[2,\"side-padding\"],\"size\":[1],\"variant\":[1],\"round\":[4],\"compact\":[4],\"iconPrev\":[1,\"icon-prev\"],\"iconNext\":[1,\"icon-next\"]}],[17,\"cat-tag\",{\"requiredMarker\":[1,\"required-marker\"],\"disabled\":[4],\"placeholder\":[1],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"name\":[1],\"labelHidden\":[4,\"label-hidden\"],\"required\":[4],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"value\":[1040],\"clearable\":[4],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"tagCreationChars\":[16,\"tag-creation-chars\"],\"addOnBlur\":[4,\"add-on-blur\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"tags\":[32],\"errorMap\":[32]},[[0,\"keydown\",\"onKeyDown\"]],{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-alert\",{\"color\":[513],\"icon\":[1],\"noIcon\":[4,\"no-icon\"]}],[1,\"cat-badge\",{\"variant\":[513],\"color\":[513],\"size\":[513],\"round\":[516],\"pulse\":[516],\"icon\":[1],\"iconOnly\":[8,\"icon-only\"],\"iconRight\":[4,\"icon-right\"],\"_iconOnly\":[32]},null,{\"iconOnly\":[\"onIconOnlyChanged\"]}],[81,\"cat-textarea\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"disabled\":[4],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"maxLength\":[2,\"max-length\"],\"minLength\":[2,\"min-length\"],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"rows\":[2],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"hasSlottedCounter\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-button-group\",{\"a11yLabel\":[1,\"a11y-label\"]}],[1,\"cat-card\"],[1,\"cat-datepicker-inline\",{\"disabled\":[4],\"max\":[1],\"min\":[1],\"mode\":[1],\"readonly\":[4],\"step\":[2],\"value\":[1025],\"nativePickerAttributes\":[16,\"native-picker-attributes\"]},null,{\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"readonly\":[\"onDisabledChanged\"]}],[1,\"cat-form-group\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"labelSize\":[1,\"label-size\"]},null,{\"requiredMarker\":[\"onRequiredMarkerChanged\"],\"horizontal\":[\"onHorizontalChanged\"]}],[17,\"cat-radio\",{\"checked\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-radio-group\",{\"name\":[1],\"value\":[1032],\"disabled\":[4],\"a11yLabel\":[1,\"a11y-label\"],\"labelLeft\":[4,\"label-left\"]},[[0,\"keydown\",\"onKeydown\"],[0,\"input\",\"onInput\"],[2,\"focus\",\"onFocus\"],[2,\"blur\",\"onBlur\"]],{\"name\":[\"onNameChanged\"],\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"labelLeft\":[\"onLabelLeftChanged\"]}],[1,\"cat-tab\",{\"label\":[513],\"icon\":[513],\"iconOnly\":[520,\"icon-only\"],\"iconRight\":[516,\"icon-right\"],\"url\":[513],\"urlTarget\":[513,\"url-target\"],\"deactivated\":[516],\"noActive\":[516,\"no-active\"],\"sticky\":[516],\"error\":[516],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"]},[[0,\"click\",\"onClick\"]]],[81,\"cat-toggle\",{\"checked\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"noValue\":[8,\"no-value\"],\"resolvedValue\":[1032,\"resolved-value\"],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-tooltip\",{\"content\":[1],\"disabled\":[4],\"placement\":[1],\"round\":[4],\"size\":[1],\"showDelay\":[2,\"show-delay\"],\"hideDelay\":[2,\"hide-delay\"],\"longTouchDuration\":[2,\"long-touch-duration\"],\"open\":[32]},[[8,\"keydown\",\"handleKeyDown\"]]],[17,\"cat-select\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"multiple\":[4],\"debounce\":[2],\"placement\":[1],\"value\":[1025],\"disabled\":[4],\"placeholder\":[1],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"name\":[1],\"labelHidden\":[4,\"label-hidden\"],\"required\":[4],\"clearable\":[4],\"tags\":[4],\"tagHint\":[1,\"tag-hint\"],\"noItems\":[1,\"no-items\"],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"connector\":[32],\"state\":[32],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64],\"connect\":[64]},[[0,\"blur\",\"onBlur\"],[0,\"keydown\",\"onKeyDown\"],[0,\"keyup\",\"onKeyUp\"]],{\"connector\":[\"onConnectorChanged\"],\"value\":[\"onValueChanged\"],\"errors\":[\"onErrorsChanged\"],\"state\":[\"onStateChanged\"]}],[17,\"cat-date-inline\",{\"noClear\":[4,\"no-clear\"],\"identifier\":[1],\"hint\":[4],\"noToday\":[4,\"no-today\"],\"weeks\":[4],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"min\":[1],\"max\":[1],\"range\":[4],\"required\":[4],\"a11yLabel\":[1,\"a11y-label\"],\"requiredMarker\":[1,\"required-marker\"],\"value\":[1025],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"viewDate\":[32],\"select\":[64],\"clear\":[64],\"resetView\":[64],\"doFocus\":[64]},[[0,\"keydown\",\"onKeyDown\"]]],[17,\"cat-avatar\",{\"size\":[1],\"round\":[4],\"label\":[1],\"initials\":[1],\"src\":[1],\"icon\":[1],\"url\":[1],\"urlTarget\":[1,\"url-target\"],\"backgroundImage\":[32]},null,{\"src\":[\"onSrcChanged\"]}],[65,\"cat-checkbox\",{\"checked\":[1028],\"indeterminate\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"noValue\":[8,\"no-value\"],\"resolvedValue\":[1032,\"resolved-value\"],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"requiredMarker\":[1,\"required-marker\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-scrollable\",{\"noShadowX\":[4,\"no-shadow-x\"],\"noShadowY\":[4,\"no-shadow-y\"],\"noOverflowX\":[4,\"no-overflow-x\"],\"noOverflowY\":[4,\"no-overflow-y\"],\"noOverscroll\":[4,\"no-overscroll\"],\"noScrolledInit\":[4,\"no-scrolled-init\"],\"scrolledBuffer\":[2,\"scrolled-buffer\"]}],[1,\"cat-skeleton\",{\"effect\":[1],\"variant\":[1],\"size\":[1],\"lines\":[2]}],[81,\"cat-input\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"accept\":[1],\"multiple\":[4],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"togglePassword\":[4,\"toggle-password\"],\"disabled\":[4],\"loading\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[8],\"maxLength\":[2,\"max-length\"],\"min\":[8],\"minLength\":[2,\"min-length\"],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"round\":[4],\"type\":[1],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"timeMaskOptions\":[16,\"time-mask-options\"],\"dateMaskOptions\":[16,\"date-mask-options\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"hasSlottedCounter\":[32],\"isPasswordShown\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-dropdown\",{\"placement\":[1],\"justify\":[4],\"noAutoClose\":[4,\"no-auto-close\"],\"arrowNavigation\":[1,\"arrow-navigation\"],\"noResize\":[4,\"no-resize\"],\"overflow\":[4],\"noInitialFocus\":[4,\"no-initial-focus\"],\"isOpen\":[2052,\"is-open\"],\"noReturnFocus\":[4,\"no-return-focus\"],\"delayedTriggerInit\":[4,\"delayed-trigger-init\"],\"toggle\":[64],\"open\":[64],\"close\":[64]},[[0,\"catClick\",\"clickHandler\"]]],[17,\"cat-button\",{\"variant\":[1],\"color\":[1],\"active\":[4],\"size\":[1],\"name\":[1],\"value\":[1],\"disabled\":[4],\"loading\":[4],\"submit\":[4],\"noEllipsis\":[4,\"no-ellipsis\"],\"round\":[4],\"url\":[1],\"urlTarget\":[1,\"url-target\"],\"icon\":[1],\"iconOnly\":[8,\"icon-only\"],\"iconRight\":[4,\"icon-right\"],\"buttonId\":[1,\"button-id\"],\"a11yLabel\":[1,\"a11y-label\"],\"a11yCurrent\":[1,\"a11y-current\"],\"nativeAttributes\":[16,\"native-attributes\"],\"nativeContentAttributes\":[16,\"native-content-attributes\"],\"testId\":[1,\"test-id\"],\"buttonGroupPosition\":[1,\"button-group-position\"],\"_iconOnly\":[32],\"hasSlottedContent\":[32],\"doFocus\":[64],\"doBlur\":[64],\"doClick\":[64]},[[0,\"click\",\"haltDisabledEvents\"]],{\"iconOnly\":[\"onIconOnlyChanged\"]}],[1,\"cat-spinner\",{\"size\":[1],\"a11yLabel\":[1,\"a11y-label\"],\"value\":[2]}],[1,\"cat-icon\",{\"icon\":[1],\"iconSrc\":[1,\"icon-src\"],\"size\":[1],\"a11yLabel\":[1,\"a11y-label\"]}]]]]"), options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy(JSON.parse("[[\"cat-alert_30.cjs\",[[0,\"cat-select-demo\"],[17,\"cat-date\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"placement\":[1],\"dateMaskOptions\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"min\":[\"onMinChanged\"],\"max\":[\"onMaxChanged\"]}],[17,\"cat-time\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"placement\":[1],\"step\":[2],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"selectionTime\":[32],\"isAm\":[32],\"valueChangedBySelection\":[32],\"select\":[64],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},[[0,\"catOpen\",\"onOpen\"]],{\"min\":[\"onMinChanged\"],\"max\":[\"onMaxChanged\"],\"value\":[\"onValueChanged\"]}],[1,\"cat-datepicker\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"mode\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"step\":[2],\"attachToElement\":[4,\"attach-to-element\"],\"position\":[1],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"nativePickerAttributes\":[16,\"native-picker-attributes\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]},null,{\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"readonly\":[\"onDisabledChanged\"],\"mode\":[\"onDisabledChanged\"],\"min\":[\"onMinChanged\"],\"max\":[\"onMinChanged\"]}],[17,\"cat-tabs\",{\"activeTab\":[1537,\"active-tab\"],\"tabsAlign\":[1,\"tabs-align\"],\"adaptive\":[4],\"activeTabAlwaysVisible\":[4,\"active-tab-always-visible\"],\"tabs\":[32],\"hiddenTabs\":[32],\"setActive\":[64],\"setActiveIndex\":[64],\"updateAdaptiveTabs\":[64]},[[0,\"keydown\",\"onKeydown\"]],{\"activeTab\":[\"onActiveTabChange\"]}],[17,\"cat-pagination\",{\"page\":[1026],\"pageCount\":[2,\"page-count\"],\"activePadding\":[2,\"active-padding\"],\"sidePadding\":[2,\"side-padding\"],\"size\":[1],\"variant\":[1],\"round\":[4],\"compact\":[4],\"iconPrev\":[1,\"icon-prev\"],\"iconNext\":[1,\"icon-next\"]}],[17,\"cat-tag\",{\"requiredMarker\":[1,\"required-marker\"],\"disabled\":[4],\"placeholder\":[1],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"name\":[1],\"labelHidden\":[4,\"label-hidden\"],\"required\":[4],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"value\":[1040],\"clearable\":[4],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"tagCreationChars\":[16,\"tag-creation-chars\"],\"addOnBlur\":[4,\"add-on-blur\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"tags\":[32],\"errorMap\":[32]},[[0,\"keydown\",\"onKeyDown\"]],{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-alert\",{\"color\":[513],\"icon\":[1],\"noIcon\":[4,\"no-icon\"]}],[1,\"cat-badge\",{\"variant\":[513],\"color\":[513],\"size\":[513],\"round\":[516],\"pulse\":[516],\"icon\":[1],\"iconOnly\":[8,\"icon-only\"],\"iconRight\":[4,\"icon-right\"],\"_iconOnly\":[32]},null,{\"iconOnly\":[\"onIconOnlyChanged\"]}],[81,\"cat-textarea\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"disabled\":[4],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"maxLength\":[2,\"max-length\"],\"minLength\":[2,\"min-length\"],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"rows\":[2],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"hasSlottedCounter\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-button-group\",{\"a11yLabel\":[1,\"a11y-label\"]}],[1,\"cat-card\"],[1,\"cat-datepicker-inline\",{\"disabled\":[4],\"max\":[1],\"min\":[1],\"mode\":[1],\"readonly\":[4],\"step\":[2],\"value\":[1025],\"nativePickerAttributes\":[16,\"native-picker-attributes\"]},null,{\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"readonly\":[\"onDisabledChanged\"]}],[1,\"cat-form-group\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"labelSize\":[1,\"label-size\"]},null,{\"requiredMarker\":[\"onRequiredMarkerChanged\"],\"horizontal\":[\"onHorizontalChanged\"]}],[17,\"cat-radio\",{\"checked\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-radio-group\",{\"name\":[1],\"value\":[1032],\"disabled\":[4],\"a11yLabel\":[1,\"a11y-label\"],\"labelLeft\":[4,\"label-left\"]},[[0,\"keydown\",\"onKeydown\"],[0,\"input\",\"onInput\"],[2,\"focus\",\"onFocus\"],[2,\"blur\",\"onBlur\"]],{\"name\":[\"onNameChanged\"],\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"labelLeft\":[\"onLabelLeftChanged\"]}],[1,\"cat-tab\",{\"label\":[513],\"icon\":[513],\"iconOnly\":[520,\"icon-only\"],\"iconRight\":[516,\"icon-right\"],\"url\":[513],\"urlTarget\":[513,\"url-target\"],\"deactivated\":[516],\"noActive\":[516,\"no-active\"],\"sticky\":[516],\"error\":[516],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"]},[[0,\"click\",\"onClick\"]]],[81,\"cat-toggle\",{\"checked\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"noValue\":[8,\"no-value\"],\"resolvedValue\":[1032,\"resolved-value\"],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-tooltip\",{\"content\":[1],\"disabled\":[4],\"placement\":[1],\"round\":[4],\"size\":[1],\"showDelay\":[2,\"show-delay\"],\"hideDelay\":[2,\"hide-delay\"],\"longTouchDuration\":[2,\"long-touch-duration\"],\"open\":[32]},[[8,\"keydown\",\"handleKeyDown\"]]],[17,\"cat-select\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"multiple\":[4],\"debounce\":[2],\"placement\":[1],\"value\":[1025],\"disabled\":[4],\"placeholder\":[1],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"name\":[1],\"labelHidden\":[4,\"label-hidden\"],\"required\":[4],\"clearable\":[4],\"tags\":[4],\"tagHint\":[1,\"tag-hint\"],\"noItems\":[1,\"no-items\"],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"connector\":[32],\"state\":[32],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64],\"connect\":[64]},[[0,\"blur\",\"onBlur\"],[0,\"keydown\",\"onKeyDown\"],[0,\"keyup\",\"onKeyUp\"]],{\"connector\":[\"onConnectorChanged\"],\"value\":[\"onValueChanged\"],\"errors\":[\"onErrorsChanged\"],\"state\":[\"onStateChanged\"]}],[17,\"cat-date-inline\",{\"noClear\":[4,\"no-clear\"],\"identifier\":[1],\"hint\":[4],\"noToday\":[4,\"no-today\"],\"weeks\":[4],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"min\":[1],\"max\":[1],\"range\":[4],\"required\":[4],\"a11yLabel\":[1,\"a11y-label\"],\"requiredMarker\":[1,\"required-marker\"],\"value\":[1025],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"viewDate\":[32],\"select\":[64],\"clear\":[64],\"resetView\":[64],\"doFocus\":[64]},[[0,\"keydown\",\"onKeyDown\"]]],[17,\"cat-avatar\",{\"size\":[1],\"round\":[4],\"label\":[1],\"initials\":[1],\"src\":[1],\"icon\":[1],\"url\":[1],\"urlTarget\":[1,\"url-target\"],\"backgroundImage\":[32]},null,{\"src\":[\"onSrcChanged\"]}],[65,\"cat-checkbox\",{\"checked\":[1028],\"indeterminate\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"noValue\":[8,\"no-value\"],\"resolvedValue\":[1032,\"resolved-value\"],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"requiredMarker\":[1,\"required-marker\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-scrollable\",{\"noShadowX\":[4,\"no-shadow-x\"],\"noShadowY\":[4,\"no-shadow-y\"],\"noOverflowX\":[4,\"no-overflow-x\"],\"noOverflowY\":[4,\"no-overflow-y\"],\"noOverscroll\":[4,\"no-overscroll\"],\"noScrolledInit\":[4,\"no-scrolled-init\"],\"scrolledBuffer\":[2,\"scrolled-buffer\"]}],[1,\"cat-skeleton\",{\"effect\":[1],\"variant\":[1],\"size\":[1],\"lines\":[2]}],[81,\"cat-input\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"togglePassword\":[4,\"toggle-password\"],\"disabled\":[4],\"loading\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[8],\"maxLength\":[2,\"max-length\"],\"min\":[8],\"minLength\":[2,\"min-length\"],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"round\":[4],\"type\":[1],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"timeMaskOptions\":[16,\"time-mask-options\"],\"dateMaskOptions\":[16,\"date-mask-options\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"hasSlottedCounter\":[32],\"isPasswordShown\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-dropdown\",{\"placement\":[1],\"justify\":[4],\"noAutoClose\":[4,\"no-auto-close\"],\"arrowNavigation\":[1,\"arrow-navigation\"],\"noResize\":[4,\"no-resize\"],\"overflow\":[4],\"noInitialFocus\":[4,\"no-initial-focus\"],\"isOpen\":[2052,\"is-open\"],\"noReturnFocus\":[4,\"no-return-focus\"],\"delayedTriggerInit\":[4,\"delayed-trigger-init\"],\"toggle\":[64],\"open\":[64],\"close\":[64]},[[0,\"catClick\",\"clickHandler\"]]],[17,\"cat-button\",{\"variant\":[1],\"color\":[1],\"active\":[4],\"size\":[1],\"name\":[1],\"value\":[1],\"disabled\":[4],\"loading\":[4],\"submit\":[4],\"noEllipsis\":[4,\"no-ellipsis\"],\"round\":[4],\"url\":[1],\"urlTarget\":[1,\"url-target\"],\"icon\":[1],\"iconOnly\":[8,\"icon-only\"],\"iconRight\":[4,\"icon-right\"],\"buttonId\":[1,\"button-id\"],\"a11yLabel\":[1,\"a11y-label\"],\"a11yCurrent\":[1,\"a11y-current\"],\"nativeAttributes\":[16,\"native-attributes\"],\"nativeContentAttributes\":[16,\"native-content-attributes\"],\"testId\":[1,\"test-id\"],\"buttonGroupPosition\":[1,\"button-group-position\"],\"_iconOnly\":[32],\"hasSlottedContent\":[32],\"doFocus\":[64],\"doBlur\":[64],\"doClick\":[64]},[[0,\"click\",\"haltDisabledEvents\"]],{\"iconOnly\":[\"onIconOnlyChanged\"]}],[1,\"cat-spinner\",{\"size\":[1],\"a11yLabel\":[1,\"a11y-label\"],\"value\":[2]}],[1,\"cat-icon\",{\"icon\":[1],\"iconSrc\":[1,\"icon-src\"],\"size\":[1],\"a11yLabel\":[1,\"a11y-label\"]}]]]]"), options);
|
|
9
|
+
return index.bootstrapLazy(JSON.parse("[[\"cat-alert_30.cjs\",[[0,\"cat-select-demo\"],[17,\"cat-date\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"placement\":[1],\"dateMaskOptions\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"min\":[\"onMinChanged\"],\"max\":[\"onMaxChanged\"]}],[17,\"cat-time\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"placement\":[1],\"step\":[2],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"selectionTime\":[32],\"isAm\":[32],\"valueChangedBySelection\":[32],\"select\":[64],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},[[0,\"catOpen\",\"onOpen\"]],{\"min\":[\"onMinChanged\"],\"max\":[\"onMaxChanged\"],\"value\":[\"onValueChanged\"]}],[1,\"cat-datepicker\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"disabled\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[1],\"min\":[1],\"mode\":[1],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"step\":[2],\"attachToElement\":[4,\"attach-to-element\"],\"position\":[1],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"nativePickerAttributes\":[16,\"native-picker-attributes\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]},null,{\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"readonly\":[\"onDisabledChanged\"],\"mode\":[\"onDisabledChanged\"],\"min\":[\"onMinChanged\"],\"max\":[\"onMinChanged\"]}],[17,\"cat-tabs\",{\"activeTab\":[1537,\"active-tab\"],\"tabsAlign\":[1,\"tabs-align\"],\"adaptive\":[4],\"activeTabAlwaysVisible\":[4,\"active-tab-always-visible\"],\"tabs\":[32],\"hiddenTabs\":[32],\"setActive\":[64],\"setActiveIndex\":[64],\"updateAdaptiveTabs\":[64]},[[0,\"keydown\",\"onKeydown\"]],{\"activeTab\":[\"onActiveTabChange\"]}],[17,\"cat-pagination\",{\"page\":[1026],\"pageCount\":[2,\"page-count\"],\"activePadding\":[2,\"active-padding\"],\"sidePadding\":[2,\"side-padding\"],\"size\":[1],\"variant\":[1],\"round\":[4],\"compact\":[4],\"iconPrev\":[1,\"icon-prev\"],\"iconNext\":[1,\"icon-next\"]}],[17,\"cat-tag\",{\"requiredMarker\":[1,\"required-marker\"],\"disabled\":[4],\"placeholder\":[1],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"name\":[1],\"labelHidden\":[4,\"label-hidden\"],\"required\":[4],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"value\":[1040],\"clearable\":[4],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"tagCreationChars\":[16,\"tag-creation-chars\"],\"addOnBlur\":[4,\"add-on-blur\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"tags\":[32],\"errorMap\":[32]},[[0,\"keydown\",\"onKeyDown\"]],{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-alert\",{\"color\":[513],\"icon\":[1],\"noIcon\":[4,\"no-icon\"]}],[1,\"cat-badge\",{\"variant\":[513],\"color\":[513],\"size\":[513],\"round\":[516],\"pulse\":[516],\"icon\":[1],\"iconOnly\":[8,\"icon-only\"],\"iconRight\":[4,\"icon-right\"],\"_iconOnly\":[32]},null,{\"iconOnly\":[\"onIconOnlyChanged\"]}],[81,\"cat-textarea\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"autoComplete\":[1,\"auto-complete\"],\"disabled\":[4],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"maxLength\":[2,\"max-length\"],\"minLength\":[2,\"min-length\"],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"rows\":[2],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"hasSlottedCounter\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-button-group\",{\"a11yLabel\":[1,\"a11y-label\"]}],[1,\"cat-card\"],[1,\"cat-datepicker-inline\",{\"disabled\":[4],\"max\":[1],\"min\":[1],\"mode\":[1],\"readonly\":[4],\"step\":[2],\"value\":[1025],\"nativePickerAttributes\":[16,\"native-picker-attributes\"]},null,{\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"readonly\":[\"onDisabledChanged\"]}],[1,\"cat-form-group\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"labelSize\":[1,\"label-size\"]},null,{\"requiredMarker\":[\"onRequiredMarkerChanged\"],\"horizontal\":[\"onHorizontalChanged\"]}],[17,\"cat-radio\",{\"checked\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-radio-group\",{\"name\":[1],\"value\":[1032],\"disabled\":[4],\"a11yLabel\":[1,\"a11y-label\"],\"labelLeft\":[4,\"label-left\"]},[[0,\"keydown\",\"onKeydown\"],[0,\"input\",\"onInput\"],[2,\"focus\",\"onFocus\"],[2,\"blur\",\"onBlur\"]],{\"name\":[\"onNameChanged\"],\"value\":[\"onValueChanged\"],\"disabled\":[\"onDisabledChanged\"],\"labelLeft\":[\"onLabelLeftChanged\"]}],[1,\"cat-tab\",{\"label\":[513],\"icon\":[513],\"iconOnly\":[520,\"icon-only\"],\"iconRight\":[516,\"icon-right\"],\"url\":[513],\"urlTarget\":[513,\"url-target\"],\"deactivated\":[516],\"noActive\":[516,\"no-active\"],\"sticky\":[516],\"error\":[516],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"]},[[0,\"click\",\"onClick\"]]],[81,\"cat-toggle\",{\"checked\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"noValue\":[8,\"no-value\"],\"resolvedValue\":[1032,\"resolved-value\"],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-tooltip\",{\"content\":[1],\"disabled\":[4],\"placement\":[1],\"round\":[4],\"size\":[1],\"showDelay\":[2,\"show-delay\"],\"hideDelay\":[2,\"hide-delay\"],\"longTouchDuration\":[2,\"long-touch-duration\"],\"open\":[32]},[[8,\"keydown\",\"handleKeyDown\"]]],[17,\"cat-select\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"multiple\":[4],\"debounce\":[2],\"placement\":[1],\"value\":[1025],\"disabled\":[4],\"placeholder\":[1],\"hint\":[1],\"identifier\":[1],\"label\":[1],\"name\":[1],\"labelHidden\":[4,\"label-hidden\"],\"required\":[4],\"clearable\":[4],\"tags\":[4],\"tagHint\":[1,\"tag-hint\"],\"noItems\":[1,\"no-items\"],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"connector\":[32],\"state\":[32],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64],\"connect\":[64]},[[0,\"blur\",\"onBlur\"],[0,\"keydown\",\"onKeyDown\"],[0,\"keyup\",\"onKeyUp\"]],{\"connector\":[\"onConnectorChanged\"],\"value\":[\"onValueChanged\"],\"errors\":[\"onErrorsChanged\"],\"state\":[\"onStateChanged\"]}],[17,\"cat-date-inline\",{\"noClear\":[4,\"no-clear\"],\"identifier\":[1],\"hint\":[4],\"noToday\":[4,\"no-today\"],\"weeks\":[4],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"min\":[1],\"max\":[1],\"range\":[4],\"required\":[4],\"a11yLabel\":[1,\"a11y-label\"],\"requiredMarker\":[1,\"required-marker\"],\"value\":[1025],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"viewDate\":[32],\"select\":[64],\"clear\":[64],\"resetView\":[64],\"doFocus\":[64]},[[0,\"keydown\",\"onKeyDown\"]]],[17,\"cat-avatar\",{\"size\":[1],\"round\":[4],\"label\":[1],\"initials\":[1],\"src\":[1],\"icon\":[1],\"url\":[1],\"urlTarget\":[1,\"url-target\"],\"backgroundImage\":[32]},null,{\"src\":[\"onSrcChanged\"]}],[65,\"cat-checkbox\",{\"checked\":[1028],\"indeterminate\":[1028],\"disabled\":[4],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"name\":[1],\"required\":[4],\"value\":[8],\"noValue\":[8,\"no-value\"],\"resolvedValue\":[1032,\"resolved-value\"],\"hint\":[1],\"labelLeft\":[4,\"label-left\"],\"alignment\":[1],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"requiredMarker\":[1,\"required-marker\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"doFocus\":[64],\"doBlur\":[64]}],[1,\"cat-scrollable\",{\"noShadowX\":[4,\"no-shadow-x\"],\"noShadowY\":[4,\"no-shadow-y\"],\"noOverflowX\":[4,\"no-overflow-x\"],\"noOverflowY\":[4,\"no-overflow-y\"],\"noOverscroll\":[4,\"no-overscroll\"],\"noScrolledInit\":[4,\"no-scrolled-init\"],\"scrolledBuffer\":[2,\"scrolled-buffer\"]}],[1,\"cat-skeleton\",{\"effect\":[1],\"variant\":[1],\"size\":[1],\"lines\":[2]}],[81,\"cat-input\",{\"requiredMarker\":[1,\"required-marker\"],\"horizontal\":[4],\"fallbackHorizontal\":[4,\"fallback-horizontal\"],\"accept\":[1],\"multiple\":[4],\"autoComplete\":[1,\"auto-complete\"],\"clearable\":[4],\"togglePassword\":[4,\"toggle-password\"],\"disabled\":[4],\"loading\":[4],\"hint\":[1],\"icon\":[1],\"iconRight\":[4,\"icon-right\"],\"identifier\":[1],\"label\":[1],\"labelHidden\":[4,\"label-hidden\"],\"max\":[8],\"maxLength\":[2,\"max-length\"],\"min\":[8],\"minLength\":[2,\"min-length\"],\"name\":[1],\"placeholder\":[1],\"textPrefix\":[1,\"text-prefix\"],\"textSuffix\":[1,\"text-suffix\"],\"readonly\":[4],\"required\":[4],\"round\":[4],\"type\":[1],\"value\":[1025],\"errors\":[4],\"errorUpdate\":[8,\"error-update\"],\"nativeAttributes\":[16,\"native-attributes\"],\"testId\":[1,\"test-id\"],\"timeMaskOptions\":[16,\"time-mask-options\"],\"dateMaskOptions\":[16,\"date-mask-options\"],\"hasSlottedLabel\":[32],\"hasSlottedHint\":[32],\"hasSlottedCounter\":[32],\"isPasswordShown\":[32],\"errorMap\":[32],\"doFocus\":[64],\"doBlur\":[64],\"clear\":[64]},null,{\"errors\":[\"onErrorsChanged\"]}],[1,\"cat-dropdown\",{\"placement\":[1],\"justify\":[4],\"noAutoClose\":[4,\"no-auto-close\"],\"arrowNavigation\":[1,\"arrow-navigation\"],\"noResize\":[4,\"no-resize\"],\"overflow\":[4],\"noInitialFocus\":[4,\"no-initial-focus\"],\"isOpen\":[2052,\"is-open\"],\"noReturnFocus\":[4,\"no-return-focus\"],\"delayedTriggerInit\":[4,\"delayed-trigger-init\"],\"toggle\":[64],\"open\":[64],\"close\":[64]},[[0,\"catClick\",\"clickHandler\"]]],[17,\"cat-button\",{\"variant\":[1],\"color\":[1],\"active\":[4],\"size\":[1],\"name\":[1],\"value\":[1],\"disabled\":[4],\"loading\":[4],\"submit\":[4],\"noEllipsis\":[4,\"no-ellipsis\"],\"round\":[4],\"url\":[1],\"urlTarget\":[1,\"url-target\"],\"icon\":[1],\"iconOnly\":[8,\"icon-only\"],\"iconRight\":[4,\"icon-right\"],\"buttonId\":[1,\"button-id\"],\"a11yLabel\":[1,\"a11y-label\"],\"a11yCurrent\":[1,\"a11y-current\"],\"nativeAttributes\":[16,\"native-attributes\"],\"nativeContentAttributes\":[16,\"native-content-attributes\"],\"testId\":[1,\"test-id\"],\"buttonGroupPosition\":[1,\"button-group-position\"],\"_iconOnly\":[32],\"hasSlottedContent\":[32],\"doFocus\":[64],\"doBlur\":[64],\"doClick\":[64]},[[0,\"click\",\"haltDisabledEvents\"]],{\"iconOnly\":[\"onIconOnlyChanged\"]}],[1,\"cat-spinner\",{\"size\":[1],\"a11yLabel\":[1,\"a11y-label\"],\"value\":[2]}],[1,\"cat-icon\",{\"icon\":[1],\"iconSrc\":[1,\"icon-src\"],\"size\":[1],\"a11yLabel\":[1,\"a11y-label\"]}]]]]"), options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -661,6 +661,9 @@ button.cat-link-danger:focus-visible {
|
|
|
661
661
|
.input-wrapper.input-invalid {
|
|
662
662
|
--border-color: var(--cat-danger-bg, 217, 52, 13), 0.2;
|
|
663
663
|
}
|
|
664
|
+
.input-wrapper:has(input[type=file]) {
|
|
665
|
+
padding-left: 0;
|
|
666
|
+
}
|
|
664
667
|
.input-wrapper {
|
|
665
668
|
/* stylelint-disable property-no-vendor-prefix */
|
|
666
669
|
}
|
|
@@ -738,6 +741,14 @@ input.has-clearable.has-toggle-password {
|
|
|
738
741
|
input::placeholder {
|
|
739
742
|
color: rgb(var(--cat-font-color-muted, 81, 92, 108));
|
|
740
743
|
}
|
|
744
|
+
input::file-selector-button {
|
|
745
|
+
background-color: transparent;
|
|
746
|
+
cursor: pointer;
|
|
747
|
+
border: 1px solid var(--cat-border-color-dark, #ccc);
|
|
748
|
+
border-radius: var(--cat-border-radius-m, 0.25rem);
|
|
749
|
+
height: 1.75rem;
|
|
750
|
+
margin: 0 0.75rem 0 0.375rem;
|
|
751
|
+
}
|
|
741
752
|
input {
|
|
742
753
|
/* stylelint-disable property-no-vendor-prefix */
|
|
743
754
|
}
|
|
@@ -777,7 +788,7 @@ input[type=color] {
|
|
|
777
788
|
flex: 0 0 1.5625rem;
|
|
778
789
|
width: 1.5625rem;
|
|
779
790
|
height: 1.5625rem;
|
|
780
|
-
border:
|
|
791
|
+
border: 1px solid var(--cat-border-color-dark, #ccc);
|
|
781
792
|
border-radius: 0.25rem;
|
|
782
793
|
background: none;
|
|
783
794
|
cursor: pointer;
|
|
@@ -134,24 +134,24 @@ export class CatInput {
|
|
|
134
134
|
}
|
|
135
135
|
render() {
|
|
136
136
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
137
|
-
return (h("div", { key: '
|
|
137
|
+
return (h("div", { key: '50c440a0998694c006b5a6cad4125bc395a159f1', class: {
|
|
138
138
|
'input-field': true,
|
|
139
139
|
'input-horizontal': this.horizontal ?? this.fallbackHorizontal ?? false
|
|
140
|
-
} }, h("div", { key: '
|
|
140
|
+
} }, h("div", { key: 'daa77827a09a7a06a5984498ad5537c1e7b07605', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: 'a39c7bd5557d03d0cb92713229da76fcf9c2e4f4', htmlFor: this.id, part: "label" }, h("span", { key: 'bddb726ce5a13891f316cd6961f2313103ffaa06', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: '9d9b6db604192d7da651e84c786eaab140faa951', name: "label" })) || this.label, h("div", { key: 'f59ccad528690950b12a582df7bc3580e40f3a84', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: 'f8d8b6ddd9a3056986bfc9bc2cbc3196c3241891', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '93034a970baf7e474934ba6b5327550678abd096', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")")), (this.maxLength || this.hasSlottedCounter) && (h("div", { key: '458caee7098e89168d779b776030e24be1c8fce0', class: "label-character-count", "aria-hidden": "true" }, this.hasSlottedCounter ? (h("slot", { name: "counter" })) : (`${this.value?.length ?? 0}/${this.maxLength}`)))))))), h("div", { key: 'c8583c36bf7cef298d1d0f50c942f43dbc8d9cab', class: { 'input-color': this.type === 'color', 'input-container': true } }, h("div", { key: '937aacc0c048c44ca710f3b14e71b436ac3d0039', class: "input-outer-wrapper" }, h("div", { key: '02d657ad1dad507dfcd63863a12da02c46ceeb20', class: {
|
|
141
141
|
'input-wrapper': true,
|
|
142
142
|
'input-round': this.round,
|
|
143
143
|
'input-readonly': this.readonly,
|
|
144
144
|
'input-disabled': this.disabled,
|
|
145
145
|
'input-invalid': this.invalid
|
|
146
|
-
}, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { key: '
|
|
146
|
+
}, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { key: 'fa5b35337dda6e3132f392133a914ae43e70c94e', class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (h("cat-icon", { key: '4d06684dc073e4dcc2b1703fa56e7e386901a632', icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), h("div", { key: 'e839a75201951e435a88fd6b740d1143d912c13b', class: {
|
|
147
147
|
'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
|
|
148
148
|
'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value,
|
|
149
149
|
'input-inner-wrapper': true,
|
|
150
150
|
'type-color': this.type === 'color'
|
|
151
|
-
} }, this.type === 'color' && h("span", { key: '
|
|
151
|
+
} }, this.type === 'color' && h("span", { key: '1ba9f12990e0ec1ac114186d9784dbcc9dd57644', class: "color-value" }, this.value ?? '#000000'), h("input", { key: '6e089b3f68e7deb4912f16dd68a49f31821d0bfc', "data-test": this.testId, ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
|
|
152
152
|
'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
|
|
153
153
|
'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value
|
|
154
|
-
}, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.isPasswordShown ? 'text' : this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: '
|
|
154
|
+
}, autocomplete: this.autoComplete, disabled: this.disabled, accept: this.type === 'file' ? this.accept : undefined, multiple: this.type === 'file' ? this.multiple : undefined, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.isPasswordShown ? 'text' : this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: '5462cce12644d0ba36763e3a477c5953283fb884', class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": i18n.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.togglePassword && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: 'd45bc4743ba06802ddf4cfbbd413cad94611bcae', class: "toggle-password", icon: this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show', "icon-only": "true", size: "s", variant: "text", "a11y-label": i18n.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword'), onClick: this.doTogglePassword.bind(this) }))), this.loading && h("cat-spinner", { key: '63ab5d0a0dd36ef44ec8952dbeb09e336af3f231', size: "m", class: "icon-loading" }), !this.invalid && this.icon && this.iconRight && (h("cat-icon", { key: '977d45f4d87510f41642566856fabc36db0727b9', icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && (h("cat-icon", { key: '4a71c080f96ab75de98624d553f159ec19155880', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), this.textSuffix && (h("span", { key: 'cdf4a92c9de5e483b914e7a1f33fab72db57ab0d', class: "text-suffix", part: "suffix" }, this.textSuffix))), h("slot", { key: 'c8e42694679b3d1f0fecbfcaba6fccc9ef18eff0', name: "addon" })), this.hasHint && (h(CatFormHint, { key: 'a5690f41eec951c3d88db93bf5c8527c53756945', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))));
|
|
155
155
|
}
|
|
156
156
|
get hasHint() {
|
|
157
157
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -290,6 +290,44 @@ export class CatInput {
|
|
|
290
290
|
"setter": false,
|
|
291
291
|
"reflect": false
|
|
292
292
|
},
|
|
293
|
+
"accept": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"attribute": "accept",
|
|
296
|
+
"mutable": false,
|
|
297
|
+
"complexType": {
|
|
298
|
+
"original": "string",
|
|
299
|
+
"resolved": "string | undefined",
|
|
300
|
+
"references": {}
|
|
301
|
+
},
|
|
302
|
+
"required": false,
|
|
303
|
+
"optional": true,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": "Defines the file types the file input should accept."
|
|
307
|
+
},
|
|
308
|
+
"getter": false,
|
|
309
|
+
"setter": false,
|
|
310
|
+
"reflect": false
|
|
311
|
+
},
|
|
312
|
+
"multiple": {
|
|
313
|
+
"type": "boolean",
|
|
314
|
+
"attribute": "multiple",
|
|
315
|
+
"mutable": false,
|
|
316
|
+
"complexType": {
|
|
317
|
+
"original": "boolean",
|
|
318
|
+
"resolved": "boolean | undefined",
|
|
319
|
+
"references": {}
|
|
320
|
+
},
|
|
321
|
+
"required": false,
|
|
322
|
+
"optional": true,
|
|
323
|
+
"docs": {
|
|
324
|
+
"tags": [],
|
|
325
|
+
"text": "Whether the input should allow multiple files to be selected."
|
|
326
|
+
},
|
|
327
|
+
"getter": false,
|
|
328
|
+
"setter": false,
|
|
329
|
+
"reflect": false
|
|
330
|
+
},
|
|
293
331
|
"autoComplete": {
|
|
294
332
|
"type": "string",
|
|
295
333
|
"attribute": "auto-complete",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-input.js","sourceRoot":"","sources":["../../../src/components/cat-input/cat-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACxH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAY,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEpD,IAAI,YAAY,GAAG,CAAC,CAAC;AAkBrB;;;;;;;;;;;;GAYG;AASH,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { coerceBoolean, coerceNumber } from '../../utils/coerce';\nimport { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { InputType } from './input-type';\nimport { formatDate, formatTime } from 'cleave-zen';\n\nlet nextUniqueId = 0;\n\ntype TimeUnit = 'h' | 'm' | 's';\ntype TimeFormatType = '12' | '24';\ntype DateUnit = 'Y' | 'y' | 'm' | 'd';\n\nexport interface FormatTimeMaskOptions {\n timePattern?: TimeUnit[];\n timeFormat?: TimeFormatType;\n}\n\nexport interface FormatDateMaskOptions {\n delimiter?: string;\n datePattern?: DateUnit[];\n dateMin?: string;\n dateMax?: string;\n}\n\n/**\n * Inputs are used to allow users to provide text input when the expected input\n * is short. As well as plain text, Input supports various types of text,\n * including passwords and numbers.\n *\n * @slot hint - Optional hint element to be displayed with the input.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @slot counter - Custom counter element to be displayed in the top right corner of the label.\n * @part label - The native label element.\n * @part input - The native input element.\n * @part prefix - The text prefix.\n * @part suffix - The text suffix.\n */\n@Component({\n tag: 'cat-input',\n styleUrl: 'cat-input.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true\n }\n})\nexport class CatInput {\n private readonly _id = `cat-input-${nextUniqueId++}`;\n\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n private errorMapSrc?: ErrorMap | true;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() hasSlottedCounter = false;\n\n @State() isPasswordShown = false;\n\n @State() errorMap?: ErrorMap | true;\n\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal?: boolean;\n\n /**\n * If the horizontal value is not provided, this fallback value is used. Can be set by form-group.\n * @internal\n */\n @Prop() fallbackHorizontal?: boolean;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input should show a password toggle button for password inputs.\n */\n @Prop() togglePassword = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Displays the input in a loading state with a spinner.\n */\n @Prop() loading = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for numeric values.\n */\n @Prop() max?: number | string;\n\n /**\n * A maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * A minimum value for numeric values.\n */\n @Prop() min?: number | string;\n\n /**\n * A minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Use round input edges.\n */\n @Prop() round = false;\n\n /**\n * Type of form control.\n */\n @Prop() type: InputType = 'text';\n\n /**\n * The value of the control.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors change with the given delay in milliseconds or immediately on blur.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * A unique identifier for the underlying native element that is used for\n * testing purposes. The attribute is added as `data-test` attribute and acts\n * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.\n */\n @Prop() testId?: string;\n\n /**\n * Activates cleave-zen time mask on input\n */\n @Prop() timeMaskOptions?: FormatTimeMaskOptions;\n\n /**\n * Activates cleave-zen date mask on input\n */\n @Prop() dateMaskOptions?: FormatDateMaskOptions;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter<string>;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentWillLoad(): void {\n this.onErrorsChanged(this.errors, undefined, false);\n }\n\n componentWillRender(): void {\n this.internals.setFormValue(this.value ?? null);\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n this.hasSlottedCounter = !!this.hostElement.querySelector('[slot=\"counter\"]');\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise<void> {\n // hack to make datepicker inputs focusable. The datepicker hides the input\n // element and dynamically creates a sibling. We need to find the new input\n // element and focus it instead.\n const input = this.input.type === 'hidden' ? this.findSiblingInput(this.input.nextSibling) : this.input;\n input?.focus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise<void> {\n this.input.blur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.value = '';\n this.catChange.emit(this.value);\n }\n\n @Watch('errors')\n onErrorsChanged(newValue?: boolean | string[] | ErrorMap, _oldValue?: unknown, update: boolean = true) {\n if (!coerceBoolean(this.errorUpdate)) {\n this.errorMap = undefined;\n } else {\n this.errorMapSrc = Array.isArray(newValue)\n ? (newValue as string[]).reduce((acc, err) => ({ ...acc, [err]: undefined }), {})\n : newValue || undefined;\n if (update) {\n this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();\n }\n }\n }\n\n render() {\n this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;\n return (\n <div\n class={{\n 'input-field': true,\n 'input-horizontal': this.horizontal ?? this.fallbackHorizontal ?? false\n }}\n >\n <div class={{ 'label-container': true, hidden: this.labelHidden }}>\n {(this.hasSlottedLabel || this.label) && (\n <label htmlFor={this.id} part=\"label\">\n <span class=\"label-wrapper\">\n {(this.hasSlottedLabel && <slot name=\"label\"></slot>) || this.label}\n <div class=\"label-metadata\">\n {!this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (\n <span class=\"label-optional\" aria-hidden=\"true\">\n ({i18n.t('input.optional')})\n </span>\n )}\n {this.required && this.requiredMarker?.startsWith('required') && (\n <span class=\"label-optional\" aria-hidden=\"true\">\n ({i18n.t('input.required')})\n </span>\n )}\n {(this.maxLength || this.hasSlottedCounter) && (\n <div class=\"label-character-count\" aria-hidden=\"true\">\n {this.hasSlottedCounter ? (\n <slot name=\"counter\"></slot>\n ) : (\n `${this.value?.length ?? 0}/${this.maxLength}`\n )}\n </div>\n )}\n </div>\n </span>\n </label>\n )}\n </div>\n <div class={{ 'input-color': this.type === 'color', 'input-container': true }}>\n <div class=\"input-outer-wrapper\">\n <div\n class={{\n 'input-wrapper': true,\n 'input-round': this.round,\n 'input-readonly': this.readonly,\n 'input-disabled': this.disabled,\n 'input-invalid': this.invalid\n }}\n onClick={() => this.input.focus()}\n >\n {this.textPrefix && (\n <span class=\"text-prefix\" part=\"prefix\">\n {this.textPrefix}\n </span>\n )}\n {this.icon && !this.iconRight && (\n <cat-icon icon={this.icon} class=\"icon-prefix\" size=\"l\" onClick={() => this.doFocus()}></cat-icon>\n )}\n <div\n class={{\n 'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,\n 'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value,\n 'input-inner-wrapper': true,\n 'type-color': this.type === 'color'\n }}\n >\n {this.type === 'color' && <span class=\"color-value\">{this.value ?? '#000000'}</span>}\n <input\n data-test={this.testId}\n {...this.nativeAttributes}\n part=\"input\"\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.id}\n class={{\n 'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,\n 'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value\n }}\n autocomplete={this.autoComplete}\n disabled={this.disabled}\n max={this.max}\n maxlength={this.maxLength}\n min={this.min}\n minlength={this.minLength}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n type={this.isPasswordShown ? 'text' : this.type}\n value={this.value}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n ></input>\n {this.clearable && !this.disabled && !this.readonly && this.value && (\n <cat-button\n class=\"clearable\"\n icon=\"$cat:input-close\"\n icon-only=\"true\"\n size=\"s\"\n variant=\"text\"\n a11y-label={i18n.t('input.clear')}\n onClick={this.clear.bind(this)}\n data-dropdown-no-close\n ></cat-button>\n )}\n {this.togglePassword && !this.disabled && !this.readonly && this.value && (\n <cat-button\n class=\"toggle-password\"\n icon={this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show'}\n icon-only=\"true\"\n size=\"s\"\n variant=\"text\"\n a11y-label={i18n.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword')}\n onClick={this.doTogglePassword.bind(this)}\n ></cat-button>\n )}\n </div>\n {this.loading && <cat-spinner size=\"m\" class=\"icon-loading\"></cat-spinner>}\n {!this.invalid && this.icon && this.iconRight && (\n <cat-icon icon={this.icon} class=\"icon-suffix\" size=\"l\" onClick={() => this.doFocus()}></cat-icon>\n )}\n {this.invalid && (\n <cat-icon icon=\"$cat:input-error\" class=\"icon-suffix cat-text-danger\" size=\"l\"></cat-icon>\n )}\n {this.textSuffix && (\n <span class=\"text-suffix\" part=\"suffix\">\n {this.textSuffix}\n </span>\n )}\n </div>\n <slot name=\"addon\"></slot>\n </div>\n {this.hasHint && (\n <CatFormHint\n id={this.id}\n hint={this.hint}\n slottedHint={this.hasSlottedHint && <slot name=\"hint\"></slot>}\n errorMap={this.errorMap}\n />\n )}\n </div>\n </div>\n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint || this.invalid;\n }\n\n private get invalid() {\n return this.errorMap === true || !!Object.keys(this.errorMap || {}).length;\n }\n\n private onInput() {\n let formattedValue = this.input.value;\n if (this.timeMaskOptions) {\n formattedValue = formatTime(this.input.value, this.timeMaskOptions);\n this.input.value = formattedValue;\n }\n if (this.dateMaskOptions) {\n formattedValue = formatDate(this.input.value, this.dateMaskOptions);\n this.input.value = formattedValue;\n }\n this.value = formattedValue;\n this.internals.setFormValue(this.input.value);\n this.catChange.emit(this.value);\n this.showErrorsIfTimeout();\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n if (coerceBoolean(this.errorUpdate)) {\n this.showErrors();\n }\n }\n\n private doTogglePassword() {\n this.isPasswordShown = !this.isPasswordShown;\n }\n\n private showErrors() {\n this.errorMap = this.errorMapSrc;\n }\n\n private errorUpdateTimeoutId?: number;\n private showErrorsIfTimeout() {\n const errorUpdate = coerceNumber(this.errorUpdate, null);\n if (errorUpdate !== null) {\n typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);\n this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);\n return true;\n }\n return false;\n }\n\n private showErrorsIfNoFocus() {\n const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;\n if (!hasFocus) {\n this.showErrors();\n }\n }\n\n private findSiblingInput(node: Node | null): HTMLInputElement | undefined {\n if (node instanceof HTMLInputElement) {\n return node;\n } else if (node?.nextSibling) {\n return this.findSiblingInput(node.nextSibling);\n }\n return undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cat-input.js","sourceRoot":"","sources":["../../../src/components/cat-input/cat-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACxH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAY,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEpD,IAAI,YAAY,GAAG,CAAC,CAAC;AAkBrB;;;;;;;;;;;;GAYG;AASH,MAAM,OAAO,QAAQ;IARrB;QASmB,QAAG,GAAG,aAAa,YAAY,EAAE,EAAE,CAAC;QAW5C,oBAAe,GAAG,KAAK,CAAC;QAExB,mBAAc,GAAG,KAAK,CAAC;QAEvB,sBAAiB,GAAG,KAAK,CAAC;QAE1B,oBAAe,GAAG,KAAK,CAAC;QAMjC;;WAEG;QACK,mBAAc,GAA4E,UAAU,CAAC;QA4B7G;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACK,mBAAc,GAAG,KAAK,CAAC;QAE/B;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAEzB;;WAEG;QACK,YAAO,GAAG,KAAK,CAAC;QAYxB;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAO1B;;WAEG;QACK,UAAK,GAAG,EAAE,CAAC;QAEnB;;WAEG;QACK,gBAAW,GAAG,KAAK,CAAC;QA0C5B;;WAEG;QACK,aAAQ,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { coerceBoolean, coerceNumber } from '../../utils/coerce';\nimport { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { InputType } from './input-type';\nimport { formatDate, formatTime } from 'cleave-zen';\n\nlet nextUniqueId = 0;\n\ntype TimeUnit = 'h' | 'm' | 's';\ntype TimeFormatType = '12' | '24';\ntype DateUnit = 'Y' | 'y' | 'm' | 'd';\n\nexport interface FormatTimeMaskOptions {\n timePattern?: TimeUnit[];\n timeFormat?: TimeFormatType;\n}\n\nexport interface FormatDateMaskOptions {\n delimiter?: string;\n datePattern?: DateUnit[];\n dateMin?: string;\n dateMax?: string;\n}\n\n/**\n * Inputs are used to allow users to provide text input when the expected input\n * is short. As well as plain text, Input supports various types of text,\n * including passwords and numbers.\n *\n * @slot hint - Optional hint element to be displayed with the input.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @slot counter - Custom counter element to be displayed in the top right corner of the label.\n * @part label - The native label element.\n * @part input - The native input element.\n * @part prefix - The text prefix.\n * @part suffix - The text suffix.\n */\n@Component({\n tag: 'cat-input',\n styleUrl: 'cat-input.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true\n }\n})\nexport class CatInput {\n private readonly _id = `cat-input-${nextUniqueId++}`;\n\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n private errorMapSrc?: ErrorMap | true;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() hasSlottedCounter = false;\n\n @State() isPasswordShown = false;\n\n @State() errorMap?: ErrorMap | true;\n\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal?: boolean;\n\n /**\n * If the horizontal value is not provided, this fallback value is used. Can be set by form-group.\n * @internal\n */\n @Prop() fallbackHorizontal?: boolean;\n\n /**\n * Defines the file types the file input should accept.\n */\n @Prop() accept?: string;\n\n /**\n * Whether the input should allow multiple files to be selected.\n */\n @Prop() multiple?: boolean;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input should show a password toggle button for password inputs.\n */\n @Prop() togglePassword = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Displays the input in a loading state with a spinner.\n */\n @Prop() loading = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for numeric values.\n */\n @Prop() max?: number | string;\n\n /**\n * A maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * A minimum value for numeric values.\n */\n @Prop() min?: number | string;\n\n /**\n * A minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Use round input edges.\n */\n @Prop() round = false;\n\n /**\n * Type of form control.\n */\n @Prop() type: InputType = 'text';\n\n /**\n * The value of the control.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors change with the given delay in milliseconds or immediately on blur.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * A unique identifier for the underlying native element that is used for\n * testing purposes. The attribute is added as `data-test` attribute and acts\n * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.\n */\n @Prop() testId?: string;\n\n /**\n * Activates cleave-zen time mask on input\n */\n @Prop() timeMaskOptions?: FormatTimeMaskOptions;\n\n /**\n * Activates cleave-zen date mask on input\n */\n @Prop() dateMaskOptions?: FormatDateMaskOptions;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter<string>;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentWillLoad(): void {\n this.onErrorsChanged(this.errors, undefined, false);\n }\n\n componentWillRender(): void {\n this.internals.setFormValue(this.value ?? null);\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n this.hasSlottedCounter = !!this.hostElement.querySelector('[slot=\"counter\"]');\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise<void> {\n // hack to make datepicker inputs focusable. The datepicker hides the input\n // element and dynamically creates a sibling. We need to find the new input\n // element and focus it instead.\n const input = this.input.type === 'hidden' ? this.findSiblingInput(this.input.nextSibling) : this.input;\n input?.focus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise<void> {\n this.input.blur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.value = '';\n this.catChange.emit(this.value);\n }\n\n @Watch('errors')\n onErrorsChanged(newValue?: boolean | string[] | ErrorMap, _oldValue?: unknown, update: boolean = true) {\n if (!coerceBoolean(this.errorUpdate)) {\n this.errorMap = undefined;\n } else {\n this.errorMapSrc = Array.isArray(newValue)\n ? (newValue as string[]).reduce((acc, err) => ({ ...acc, [err]: undefined }), {})\n : newValue || undefined;\n if (update) {\n this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();\n }\n }\n }\n\n render() {\n this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;\n return (\n <div\n class={{\n 'input-field': true,\n 'input-horizontal': this.horizontal ?? this.fallbackHorizontal ?? false\n }}\n >\n <div class={{ 'label-container': true, hidden: this.labelHidden }}>\n {(this.hasSlottedLabel || this.label) && (\n <label htmlFor={this.id} part=\"label\">\n <span class=\"label-wrapper\">\n {(this.hasSlottedLabel && <slot name=\"label\"></slot>) || this.label}\n <div class=\"label-metadata\">\n {!this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (\n <span class=\"label-optional\" aria-hidden=\"true\">\n ({i18n.t('input.optional')})\n </span>\n )}\n {this.required && this.requiredMarker?.startsWith('required') && (\n <span class=\"label-optional\" aria-hidden=\"true\">\n ({i18n.t('input.required')})\n </span>\n )}\n {(this.maxLength || this.hasSlottedCounter) && (\n <div class=\"label-character-count\" aria-hidden=\"true\">\n {this.hasSlottedCounter ? (\n <slot name=\"counter\"></slot>\n ) : (\n `${this.value?.length ?? 0}/${this.maxLength}`\n )}\n </div>\n )}\n </div>\n </span>\n </label>\n )}\n </div>\n <div class={{ 'input-color': this.type === 'color', 'input-container': true }}>\n <div class=\"input-outer-wrapper\">\n <div\n class={{\n 'input-wrapper': true,\n 'input-round': this.round,\n 'input-readonly': this.readonly,\n 'input-disabled': this.disabled,\n 'input-invalid': this.invalid\n }}\n onClick={() => this.input.focus()}\n >\n {this.textPrefix && (\n <span class=\"text-prefix\" part=\"prefix\">\n {this.textPrefix}\n </span>\n )}\n {this.icon && !this.iconRight && (\n <cat-icon icon={this.icon} class=\"icon-prefix\" size=\"l\" onClick={() => this.doFocus()}></cat-icon>\n )}\n <div\n class={{\n 'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,\n 'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value,\n 'input-inner-wrapper': true,\n 'type-color': this.type === 'color'\n }}\n >\n {this.type === 'color' && <span class=\"color-value\">{this.value ?? '#000000'}</span>}\n <input\n data-test={this.testId}\n {...this.nativeAttributes}\n part=\"input\"\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.id}\n class={{\n 'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,\n 'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value\n }}\n autocomplete={this.autoComplete}\n disabled={this.disabled}\n accept={this.type === 'file' ? this.accept : undefined}\n multiple={this.type === 'file' ? this.multiple : undefined}\n max={this.max}\n maxlength={this.maxLength}\n min={this.min}\n minlength={this.minLength}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n type={this.isPasswordShown ? 'text' : this.type}\n value={this.value}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n ></input>\n {this.clearable && !this.disabled && !this.readonly && this.value && (\n <cat-button\n class=\"clearable\"\n icon=\"$cat:input-close\"\n icon-only=\"true\"\n size=\"s\"\n variant=\"text\"\n a11y-label={i18n.t('input.clear')}\n onClick={this.clear.bind(this)}\n data-dropdown-no-close\n ></cat-button>\n )}\n {this.togglePassword && !this.disabled && !this.readonly && this.value && (\n <cat-button\n class=\"toggle-password\"\n icon={this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show'}\n icon-only=\"true\"\n size=\"s\"\n variant=\"text\"\n a11y-label={i18n.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword')}\n onClick={this.doTogglePassword.bind(this)}\n ></cat-button>\n )}\n </div>\n {this.loading && <cat-spinner size=\"m\" class=\"icon-loading\"></cat-spinner>}\n {!this.invalid && this.icon && this.iconRight && (\n <cat-icon icon={this.icon} class=\"icon-suffix\" size=\"l\" onClick={() => this.doFocus()}></cat-icon>\n )}\n {this.invalid && (\n <cat-icon icon=\"$cat:input-error\" class=\"icon-suffix cat-text-danger\" size=\"l\"></cat-icon>\n )}\n {this.textSuffix && (\n <span class=\"text-suffix\" part=\"suffix\">\n {this.textSuffix}\n </span>\n )}\n </div>\n <slot name=\"addon\"></slot>\n </div>\n {this.hasHint && (\n <CatFormHint\n id={this.id}\n hint={this.hint}\n slottedHint={this.hasSlottedHint && <slot name=\"hint\"></slot>}\n errorMap={this.errorMap}\n />\n )}\n </div>\n </div>\n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint || this.invalid;\n }\n\n private get invalid() {\n return this.errorMap === true || !!Object.keys(this.errorMap || {}).length;\n }\n\n private onInput() {\n let formattedValue = this.input.value;\n if (this.timeMaskOptions) {\n formattedValue = formatTime(this.input.value, this.timeMaskOptions);\n this.input.value = formattedValue;\n }\n if (this.dateMaskOptions) {\n formattedValue = formatDate(this.input.value, this.dateMaskOptions);\n this.input.value = formattedValue;\n }\n this.value = formattedValue;\n this.internals.setFormValue(this.input.value);\n this.catChange.emit(this.value);\n this.showErrorsIfTimeout();\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n if (coerceBoolean(this.errorUpdate)) {\n this.showErrors();\n }\n }\n\n private doTogglePassword() {\n this.isPasswordShown = !this.isPasswordShown;\n }\n\n private showErrors() {\n this.errorMap = this.errorMapSrc;\n }\n\n private errorUpdateTimeoutId?: number;\n private showErrorsIfTimeout() {\n const errorUpdate = coerceNumber(this.errorUpdate, null);\n if (errorUpdate !== null) {\n typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);\n this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);\n return true;\n }\n return false;\n }\n\n private showErrorsIfNoFocus() {\n const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;\n if (!hasFocus) {\n this.showErrors();\n }\n }\n\n private findSiblingInput(node: Node | null): HTMLInputElement | undefined {\n if (node instanceof HTMLInputElement) {\n return node;\n } else if (node?.nextSibling) {\n return this.findSiblingInput(node.nextSibling);\n }\n return undefined;\n }\n}\n"]}
|