@haiilo/catalyst 13.0.0 → 13.0.2

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.
Files changed (63) hide show
  1. package/dist/catalyst/catalyst.esm.js +1 -1
  2. package/dist/catalyst/p-bbf8cfa7.entry.js +10 -0
  3. package/dist/catalyst/p-bbf8cfa7.entry.js.map +1 -0
  4. package/dist/catalyst/scss/_snippets/_form-label.scss +4 -0
  5. package/dist/cjs/cat-alert_30.cjs.entry.js +30 -54
  6. package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
  7. package/dist/cjs/catalyst.cjs.js +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/components/cat-checkbox/cat-checkbox.css +5 -0
  10. package/dist/collection/components/cat-date/cat-date.js +27 -10
  11. package/dist/collection/components/cat-date/cat-date.js.map +1 -1
  12. package/dist/collection/components/cat-date-inline/cat-date-inline.css +5 -0
  13. package/dist/collection/components/cat-datepicker/cat-datepicker.js +28 -11
  14. package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
  15. package/dist/collection/components/cat-form-group/cat-form-group.js +3 -3
  16. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  17. package/dist/collection/components/cat-input/cat-input.css +5 -0
  18. package/dist/collection/components/cat-input/cat-input.js +30 -13
  19. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  20. package/dist/collection/components/cat-select/cat-select.css +5 -0
  21. package/dist/collection/components/cat-select/cat-select.js +30 -13
  22. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  23. package/dist/collection/components/cat-tag/cat-tag.css +5 -0
  24. package/dist/collection/components/cat-textarea/cat-textarea.css +5 -0
  25. package/dist/collection/components/cat-textarea/cat-textarea.js +29 -12
  26. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  27. package/dist/collection/components/cat-time/cat-time.js +27 -10
  28. package/dist/collection/components/cat-time/cat-time.js.map +1 -1
  29. package/dist/collection/scss/_snippets/_form-label.scss +4 -0
  30. package/dist/components/cat-checkbox2.js +1 -1
  31. package/dist/components/cat-checkbox2.js.map +1 -1
  32. package/dist/components/cat-date-inline2.js +1 -1
  33. package/dist/components/cat-date-inline2.js.map +1 -1
  34. package/dist/components/cat-date.js +3 -6
  35. package/dist/components/cat-date.js.map +1 -1
  36. package/dist/components/cat-datepicker.js +4 -7
  37. package/dist/components/cat-datepicker.js.map +1 -1
  38. package/dist/components/cat-form-group.js +3 -3
  39. package/dist/components/cat-form-group.js.map +1 -1
  40. package/dist/components/cat-input2.js +7 -10
  41. package/dist/components/cat-input2.js.map +1 -1
  42. package/dist/components/cat-select2.js +7 -10
  43. package/dist/components/cat-select2.js.map +1 -1
  44. package/dist/components/cat-tag.js +1 -1
  45. package/dist/components/cat-tag.js.map +1 -1
  46. package/dist/components/cat-textarea.js +6 -9
  47. package/dist/components/cat-textarea.js.map +1 -1
  48. package/dist/components/cat-time.js +3 -6
  49. package/dist/components/cat-time.js.map +1 -1
  50. package/dist/esm/cat-alert_30.entry.js +30 -54
  51. package/dist/esm/cat-alert_30.entry.js.map +1 -1
  52. package/dist/esm/catalyst.js +1 -1
  53. package/dist/esm/loader.js +1 -1
  54. package/dist/types/components/cat-date/cat-date.d.ts +6 -1
  55. package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +6 -1
  56. package/dist/types/components/cat-input/cat-input.d.ts +6 -1
  57. package/dist/types/components/cat-select/cat-select.d.ts +6 -1
  58. package/dist/types/components/cat-textarea/cat-textarea.d.ts +6 -1
  59. package/dist/types/components/cat-time/cat-time.d.ts +6 -1
  60. package/dist/types/components.d.ts +30 -6
  61. package/package.json +2 -2
  62. package/dist/catalyst/p-02e41ad7.entry.js +0 -10
  63. package/dist/catalyst/p-02e41ad7.entry.js.map +0 -1
@@ -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],\"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],\"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],\"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],\"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],\"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],\"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\"],\"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;
@@ -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],\"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],\"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],\"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],\"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],\"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],\"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\"],\"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;
@@ -92,6 +92,11 @@
92
92
  .select-horizontal .label-wrapper {
93
93
  flex-direction: column;
94
94
  }
95
+ .input-horizontal .label-container,
96
+ .textarea-horizontal .label-container,
97
+ .select-horizontal .label-container {
98
+ flex-shrink: 0;
99
+ }
95
100
  .input-horizontal label,
96
101
  .textarea-horizontal label,
97
102
  .select-horizontal label {
@@ -14,10 +14,6 @@ export class CatDate {
14
14
  * Whether the label need a marker to shown if the input is required or optional.
15
15
  */
16
16
  this.requiredMarker = 'optional';
17
- /**
18
- * Whether the label is on top or left.
19
- */
20
- this.horizontal = false;
21
17
  /**
22
18
  * Hint for form autofill feature.
23
19
  */
@@ -115,14 +111,14 @@ export class CatDate {
115
111
  }
116
112
  render() {
117
113
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
118
- return (h(Host, { key: '38c0f6d0b6edfcd762840f7fedcb47157b0f4a4c' }, h("cat-input", { key: '71a9ebc03ea49b1584b178ad8cb0f61306644e15', class: "cat-date-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, errors: this.errors, errorUpdate: this.errorUpdate, testId: this.testId, nativeAttributes: this.nativeAttributes, value: this.inputValue, dateMaskOptions: this.dateMaskOptions, onCatFocus: e => {
114
+ return (h(Host, { key: '976bd5ab47f91d0fd2558da90110dfe7215708c2' }, h("cat-input", { key: 'd7fc538825bbf227cdac59594f4d9388c6f45af1', class: "cat-date-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal ?? this.fallbackHorizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, errors: this.errors, errorUpdate: this.errorUpdate, testId: this.testId, nativeAttributes: this.nativeAttributes, value: this.inputValue, dateMaskOptions: this.dateMaskOptions, onCatFocus: e => {
119
115
  this.inputFocused = e.target === this.input;
120
116
  e.stopPropagation();
121
117
  this.catFocus.emit(e.detail);
122
118
  }, onCatBlur: e => {
123
119
  e.stopPropagation();
124
120
  this.onInputBlur(e.detail);
125
- } }, h("span", { key: 'ca8eb678246d9047ba2f5e38b0e392333cb20f70', slot: "label" }, this.label, h("span", { key: 'd72fd4de36d76793515480db04b25909b703521e', class: "label-aria" }, " (", this.locale.formatStr, ")")), h("cat-dropdown", { key: 'c58fd79c97821495b73ddef3311235065ff10ce3', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, h("cat-button", { key: 'f0f4b2ff2be00dfba6c93fb0218c35f0361c5c63', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), h("div", { key: 'b5c78f6d0cd4a94af38f3c5d2f7aeceea02eaff5', slot: "content" }, h("cat-date-inline", { key: '71f66a073ba5e5e107defac3771064ac5d48eee9', ref: el => (this.dateInline = el), min: this.min, max: this.max, value: this.value, hint: true, weeks: true, noClear: true, onCatChange: this.onDateChange.bind(this) }))))));
121
+ } }, h("span", { key: 'acde26c15c84b0313e77bb71f2cfa2c4e9e6ed0f', slot: "label" }, this.label, h("span", { key: '4c6df5b6d7e1657eb27b956a206f5edf50984b06', class: "label-aria" }, " (", this.locale.formatStr, ")")), h("cat-dropdown", { key: 'aeb4b595f4b3b76aa38e24932550424c4b079405', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, h("cat-button", { key: 'aa1a08b022ecfa45a6f891c9920279a8c396c515', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), h("div", { key: '7b975f163b67a61cfc5ed146b614ff36c79b51cd', slot: "content" }, h("cat-date-inline", { key: 'a197d8c60a92626960ade852765a29ab737725fd', ref: el => (this.dateInline = el), min: this.min, max: this.max, value: this.value, hint: true, weeks: true, noClear: true, onCatChange: this.onDateChange.bind(this) }))))));
126
122
  }
127
123
  getTriggerA11yLabel() {
128
124
  const date = this.locale.fromLocalISO(this.value);
@@ -230,19 +226,40 @@ export class CatDate {
230
226
  "mutable": false,
231
227
  "complexType": {
232
228
  "original": "boolean",
233
- "resolved": "boolean",
229
+ "resolved": "boolean | undefined",
234
230
  "references": {}
235
231
  },
236
232
  "required": false,
237
- "optional": false,
233
+ "optional": true,
238
234
  "docs": {
239
235
  "tags": [],
240
236
  "text": "Whether the label is on top or left."
241
237
  },
242
238
  "getter": false,
243
239
  "setter": false,
244
- "reflect": false,
245
- "defaultValue": "false"
240
+ "reflect": false
241
+ },
242
+ "fallbackHorizontal": {
243
+ "type": "boolean",
244
+ "attribute": "fallback-horizontal",
245
+ "mutable": false,
246
+ "complexType": {
247
+ "original": "boolean",
248
+ "resolved": "boolean | undefined",
249
+ "references": {}
250
+ },
251
+ "required": false,
252
+ "optional": true,
253
+ "docs": {
254
+ "tags": [{
255
+ "name": "internal",
256
+ "text": undefined
257
+ }],
258
+ "text": "If the horizontal value is not provided, this fallback value is used. Can be set by form-group."
259
+ },
260
+ "getter": false,
261
+ "setter": false,
262
+ "reflect": false
246
263
  },
247
264
  "autoComplete": {
248
265
  "type": "string",
@@ -1 +1 @@
1
- {"version":3,"file":"cat-date.js","sourceRoot":"","sources":["../../../src/components/cat-date/cat-date.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGxE;;GAEG;AAQH,MAAM,OAAO,OAAO;IAPpB;QAQmB,aAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,WAAM,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAG3C,iBAAY,GAAG,KAAK,CAAC;QAM7B;;WAEG;QACK,mBAAc,GAA4E,UAAU,CAAC;QAE7G;;WAEG;QACK,eAAU,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACK,iBAAY,GAAG,KAAK,CAAC;QAE7B;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, Watch, h, State } from '@stencil/core';\nimport { getLocale } from '../cat-date-inline/cat-date-locale';\nimport { clampDate } from '../cat-date-inline/cat-date-math';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { DateUnit, FormatDateOptions } from 'cleave-zen';\n\n/**\n * A date input component to select a date from a calendar in a dropdown.\n */\n@Component({\n tag: 'cat-date',\n styleUrl: 'cat-date.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class CatDate {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n private dateInline?: HTMLCatDateInlineElement;\n private inputFocused = false;\n\n @Element() hostElement!: HTMLElement;\n\n @State() dateMaskOptions?: FormatDateOptions;\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 = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete = 'off';\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = 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 the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\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 * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\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 * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\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 private get inputValue() {\n const [match, year, month, day] = this.value?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n if (match) {\n const date = new Date(Number(year), Number(month) - 1, Number(day));\n const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });\n return format.format(date);\n }\n return '';\n }\n\n componentWillLoad() {\n const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(format) || [];\n this.dateMaskOptions = {\n dateMin: this.min,\n dateMax: this.max,\n delimiter: d1,\n datePattern: [p1 as DateUnit, p2 as DateUnit, p3 as DateUnit]\n };\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 this.input?.doFocus(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?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.input?.clear();\n }\n\n render() {\n this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;\n return (\n <Host>\n <cat-input\n class=\"cat-date-input\"\n ref={el => (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n testId={this.testId}\n nativeAttributes={this.nativeAttributes}\n value={this.inputValue}\n dateMaskOptions={this.dateMaskOptions}\n onCatFocus={e => {\n this.inputFocused = e.target === this.input;\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.onInputBlur(e.detail);\n }}\n >\n <span slot=\"label\">\n {this.label}\n <span class=\"label-aria\"> ({this.locale.formatStr})</span>\n </span>\n <cat-dropdown\n slot=\"addon\"\n placement={this.placement}\n arrowNavigation=\"none\"\n noResize\n onCatOpen={() => this.dateInline?.resetView()}\n >\n <cat-button\n slot=\"trigger\"\n icon=\"$cat:datepicker-calendar\"\n iconOnly\n class=\"cat-date-toggle\"\n disabled={this.disabled}\n a11yLabel={this.getTriggerA11yLabel()}\n ></cat-button>\n <div slot=\"content\">\n <cat-date-inline\n ref={el => (this.dateInline = el as HTMLCatDateInlineElement)}\n min={this.min}\n max={this.max}\n value={this.value}\n hint\n weeks\n noClear\n onCatChange={this.onDateChange.bind(this)}\n ></cat-date-inline>\n </div>\n </cat-dropdown>\n </cat-input>\n </Host>\n );\n }\n\n private getTriggerA11yLabel() {\n const date = this.locale.fromLocalISO(this.value);\n return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;\n }\n\n private onInputBlur(e: FocusEvent) {\n if (!this.input || !this.inputFocused) {\n return;\n }\n this.inputFocused = false;\n const oldValue = this.value;\n const dateParsed = this.parse(this.input.value ?? '');\n const dateMin = this.locale.fromLocalISO(this.min);\n const dateMax = this.locale.fromLocalISO(this.max);\n const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n if (date) {\n this.dateInline?.select(date);\n } else {\n this.dateInline?.clear();\n }\n this.catChange.emit(this.value);\n }\n this.input.value = this.inputValue;\n this.catBlur.emit(e);\n }\n\n private onDateChange(e: CustomEvent<string>) {\n e.stopPropagation();\n const oldValue = this.value;\n const date = e.detail ? this.locale.fromLocalISO(e.detail) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n private parse(value: string) {\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(this.locale.formatStr) || [];\n const formatParts = [p1, p2, p3];\n const parts = value.split(d1).map(s => Number(s || 'x'));\n let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();\n const month = parts[formatParts.indexOf('MM')];\n const day = parts[formatParts.indexOf('DD')];\n if (!Number.isInteger(month) || !Number.isInteger(day)) {\n return null;\n } else if (year < 100) {\n year += year < 50 ? 2000 : 1900;\n }\n return new Date(year, month - 1, day);\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n const oldValue = this.value;\n const oldDate = this.locale.fromLocalISO(oldValue);\n const limitDate = this.locale.fromLocalISO(limit);\n if (!oldDate || !limitDate) {\n return;\n }\n const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);\n const newValue = this.locale.toLocalISO(newDate);\n if (oldValue !== newValue) {\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"cat-date.js","sourceRoot":"","sources":["../../../src/components/cat-date/cat-date.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGxE;;GAEG;AAQH,MAAM,OAAO,OAAO;IAPpB;QAQmB,aAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,WAAM,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAG3C,iBAAY,GAAG,KAAK,CAAC;QAM7B;;WAEG;QACK,mBAAc,GAA4E,UAAU,CAAC;QAa7G;;WAEG;QACK,iBAAY,GAAG,KAAK,CAAC;QAE7B;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAYzB;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAO1B;;WAEG;QACK,UAAK,GAAG,EAAE,CAAC;QAEnB;;WAEG;QACK,gBAAW,GAAG,KAAK,CAAC;QAgC5B;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAEzB;;WAEG;QACK,aAAQ,GAAG,KAAK,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, Watch, h, State } from '@stencil/core';\nimport { getLocale } from '../cat-date-inline/cat-date-locale';\nimport { clampDate } from '../cat-date-inline/cat-date-math';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { DateUnit, FormatDateOptions } from 'cleave-zen';\n\n/**\n * A date input component to select a date from a calendar in a dropdown.\n */\n@Component({\n tag: 'cat-date',\n styleUrl: 'cat-date.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class CatDate {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n private dateInline?: HTMLCatDateInlineElement;\n private inputFocused = false;\n\n @Element() hostElement!: HTMLElement;\n\n @State() dateMaskOptions?: FormatDateOptions;\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 = 'off';\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = 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 the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\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 * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\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 * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\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 private get inputValue() {\n const [match, year, month, day] = this.value?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n if (match) {\n const date = new Date(Number(year), Number(month) - 1, Number(day));\n const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });\n return format.format(date);\n }\n return '';\n }\n\n componentWillLoad() {\n const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(format) || [];\n this.dateMaskOptions = {\n dateMin: this.min,\n dateMax: this.max,\n delimiter: d1,\n datePattern: [p1 as DateUnit, p2 as DateUnit, p3 as DateUnit]\n };\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 this.input?.doFocus(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?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.input?.clear();\n }\n\n render() {\n this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;\n return (\n <Host>\n <cat-input\n class=\"cat-date-input\"\n ref={el => (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal ?? this.fallbackHorizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n testId={this.testId}\n nativeAttributes={this.nativeAttributes}\n value={this.inputValue}\n dateMaskOptions={this.dateMaskOptions}\n onCatFocus={e => {\n this.inputFocused = e.target === this.input;\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.onInputBlur(e.detail);\n }}\n >\n <span slot=\"label\">\n {this.label}\n <span class=\"label-aria\"> ({this.locale.formatStr})</span>\n </span>\n <cat-dropdown\n slot=\"addon\"\n placement={this.placement}\n arrowNavigation=\"none\"\n noResize\n onCatOpen={() => this.dateInline?.resetView()}\n >\n <cat-button\n slot=\"trigger\"\n icon=\"$cat:datepicker-calendar\"\n iconOnly\n class=\"cat-date-toggle\"\n disabled={this.disabled}\n a11yLabel={this.getTriggerA11yLabel()}\n ></cat-button>\n <div slot=\"content\">\n <cat-date-inline\n ref={el => (this.dateInline = el as HTMLCatDateInlineElement)}\n min={this.min}\n max={this.max}\n value={this.value}\n hint\n weeks\n noClear\n onCatChange={this.onDateChange.bind(this)}\n ></cat-date-inline>\n </div>\n </cat-dropdown>\n </cat-input>\n </Host>\n );\n }\n\n private getTriggerA11yLabel() {\n const date = this.locale.fromLocalISO(this.value);\n return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;\n }\n\n private onInputBlur(e: FocusEvent) {\n if (!this.input || !this.inputFocused) {\n return;\n }\n this.inputFocused = false;\n const oldValue = this.value;\n const dateParsed = this.parse(this.input.value ?? '');\n const dateMin = this.locale.fromLocalISO(this.min);\n const dateMax = this.locale.fromLocalISO(this.max);\n const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n if (date) {\n this.dateInline?.select(date);\n } else {\n this.dateInline?.clear();\n }\n this.catChange.emit(this.value);\n }\n this.input.value = this.inputValue;\n this.catBlur.emit(e);\n }\n\n private onDateChange(e: CustomEvent<string>) {\n e.stopPropagation();\n const oldValue = this.value;\n const date = e.detail ? this.locale.fromLocalISO(e.detail) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n private parse(value: string) {\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(this.locale.formatStr) || [];\n const formatParts = [p1, p2, p3];\n const parts = value.split(d1).map(s => Number(s || 'x'));\n let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();\n const month = parts[formatParts.indexOf('MM')];\n const day = parts[formatParts.indexOf('DD')];\n if (!Number.isInteger(month) || !Number.isInteger(day)) {\n return null;\n } else if (year < 100) {\n year += year < 50 ? 2000 : 1900;\n }\n return new Date(year, month - 1, day);\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n const oldValue = this.value;\n const oldDate = this.locale.fromLocalISO(oldValue);\n const limitDate = this.locale.fromLocalISO(limit);\n if (!oldDate || !limitDate) {\n return;\n }\n const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);\n const newValue = this.locale.toLocalISO(newDate);\n if (oldValue !== newValue) {\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n }\n}\n"]}
@@ -72,6 +72,11 @@
72
72
  .select-horizontal .label-wrapper {
73
73
  flex-direction: column;
74
74
  }
75
+ .input-horizontal .label-container,
76
+ .textarea-horizontal .label-container,
77
+ .select-horizontal .label-container {
78
+ flex-shrink: 0;
79
+ }
75
80
  .input-horizontal label,
76
81
  .textarea-horizontal label,
77
82
  .select-horizontal label {
@@ -14,10 +14,6 @@ export class CatDatepickerFlat {
14
14
  * Whether the label need a marker to shown if the input is required or optional.
15
15
  */
16
16
  this.requiredMarker = 'optional';
17
- /**
18
- * Whether the label is on top or left.
19
- */
20
- this.horizontal = false;
21
17
  /**
22
18
  * Hint for form autofill feature.
23
19
  */
@@ -130,7 +126,7 @@ export class CatDatepickerFlat {
130
126
  }
131
127
  render() {
132
128
  return [
133
- h("cat-input", { key: '472e33835c2ac42e3e648d7b4b80551bfad276bb', ref: el => (this._input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: e => {
129
+ h("cat-input", { key: '9e47a3a8ed8daa56c7bb50d226496a90fe5a6fbe', ref: el => (this._input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal ?? this.fallbackHorizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: e => {
134
130
  e.stopPropagation();
135
131
  this.value = e.detail || undefined;
136
132
  }, onCatFocus: e => {
@@ -139,8 +135,8 @@ export class CatDatepickerFlat {
139
135
  }, onCatBlur: e => {
140
136
  e.stopPropagation();
141
137
  this.catBlur.emit(e.detail);
142
- } }, this.hasSlottedLabel && (h("span", { key: '9e883cc02c66b78e8be8221a5632f37b016df965', slot: "label" }, h("slot", { key: '892603e7cb7e645e92503a30f2eb89dc5b2be9bc', name: "label" }))), this.hasSlottedHint && (h("span", { key: 'b5f4e4fad0aca02ab0d9c1a94d4f5e7582634490', slot: "hint" }, h("slot", { key: '4d9184fd37321b6b7709a25a3cee17057b5cfcb7', name: "hint" })))),
143
- h("div", { key: '8eccd0924e6dfcd2fdf2d71feba880ca84d44e87', ref: el => (this._calendarWrapper = el), class: "datepicker-wrapper" })
138
+ } }, this.hasSlottedLabel && (h("span", { key: '9aa4a8f3b357bd599b1c9e0c1241269205140dbc', slot: "label" }, h("slot", { key: '0e9e849371bc530561a2d538f776259b7fc3f44a', name: "label" }))), this.hasSlottedHint && (h("span", { key: 'bd1666fe3725e032ec117ad9cd860e151a89569a', slot: "hint" }, h("slot", { key: 'c75f0b32ab9019912b443205bf34b00371db9e70', name: "hint" })))),
139
+ h("div", { key: '9916d66043f972b18a9d33b37b79fc52cf310542', ref: el => (this._calendarWrapper = el), class: "datepicker-wrapper" })
144
140
  ];
145
141
  }
146
142
  initDatepicker(input) {
@@ -233,19 +229,40 @@ export class CatDatepickerFlat {
233
229
  "mutable": false,
234
230
  "complexType": {
235
231
  "original": "boolean",
236
- "resolved": "boolean",
232
+ "resolved": "boolean | undefined",
237
233
  "references": {}
238
234
  },
239
235
  "required": false,
240
- "optional": false,
236
+ "optional": true,
241
237
  "docs": {
242
238
  "tags": [],
243
239
  "text": "Whether the label is on top or left."
244
240
  },
245
241
  "getter": false,
246
242
  "setter": false,
247
- "reflect": false,
248
- "defaultValue": "false"
243
+ "reflect": false
244
+ },
245
+ "fallbackHorizontal": {
246
+ "type": "boolean",
247
+ "attribute": "fallback-horizontal",
248
+ "mutable": false,
249
+ "complexType": {
250
+ "original": "boolean",
251
+ "resolved": "boolean | undefined",
252
+ "references": {}
253
+ },
254
+ "required": false,
255
+ "optional": true,
256
+ "docs": {
257
+ "tags": [{
258
+ "name": "internal",
259
+ "text": undefined
260
+ }],
261
+ "text": "If the horizontal value is not provided, this fallback value is used. Can be set by form-group."
262
+ },
263
+ "getter": false,
264
+ "setter": false,
265
+ "reflect": false
249
266
  },
250
267
  "autoComplete": {
251
268
  "type": "string",
@@ -1 +1 @@
1
- {"version":3,"file":"cat-datepicker.js","sourceRoot":"","sources":["../../../src/components/cat-datepicker/cat-datepicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAA+B,MAAM,kBAAkB,CAAC;AAQlG,MAAM,OAAO,iBAAiB;IAL9B;QAeW,oBAAe,GAAG,KAAK,CAAC;QAExB,mBAAc,GAAG,KAAK,CAAC;QAEhC;;WAEG;QACK,mBAAc,GAA4E,UAAU,CAAC;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port flatpickr from 'flatpickr';\nimport { findClosest } from '../../utils/find-closest';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { getConfig } from './cat-datepicker.config';\nimport { getFormat } from './cat-datepicker.format';\nimport { getLocale } from './cat-datepicker.locale';\nimport { CatDatepickerMode } from './cat-datepicker.mode';\nimport { autoUpdate, computePosition, flip, Placement, ReferenceElement } from '@floating-ui/dom';\nimport { BaseOptions } from 'flatpickr/dist/types/options';\n\n@Component({\n tag: 'cat-datepicker',\n styleUrl: 'cat-datepicker.scss',\n shadow: true\n})\nexport class CatDatepickerFlat {\n private pickr?: flatpickr.Instance;\n private _input?: HTMLCatInputElement;\n private _calendarWrapper?: HTMLDivElement;\n private get input(): HTMLInputElement | undefined {\n return this._input?.shadowRoot?.querySelector('input') ?? undefined;\n }\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\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 = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete = 'off';\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = 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 as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() min?: string;\n\n /**\n * The mode of the datepicker, to select a date, time, both, a date range or a week number.\n */\n @Prop() mode: CatDatepickerMode = 'date';\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 * The step size to use when changing the time.\n */\n @Prop() step = 5;\n\n /**\n * Instead of body, appends the calendar to the cat-datepicker element instead\n */\n @Prop() attachToElement = false;\n\n /**\n * Where the calendar is rendered relative to the input vertically and horizontally.\n * In the format of \"[vertical] [horizontal]\". Vertical can be auto, above or below (required).\n * Horizontal can be left, center or right.\n * If @attachToElement is passed the value should be in Placement format\n */\n @Prop() position?: BaseOptions['position'] | Placement;\n\n /**\n * The value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z or as a week number string.\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 * Attributes that will be added to the rendered HTML datepicker element.\n */\n @Prop() nativePickerAttributes?: { [key: string]: string };\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 @Watch('value')\n onValueChanged(value: string) {\n if (value) {\n this.pickr?.setDate(value, false);\n if (this.mode !== 'daterange' || value.includes(' - ')) {\n this.catChange.emit(value);\n }\n } else {\n this.pickr?.clear(false);\n this.catChange.emit(undefined);\n }\n }\n\n @Watch('disabled')\n @Watch('readonly')\n @Watch('mode')\n onDisabledChanged() {\n // Dynamically changing config value is not working due to a bug in the\n // library. We thus need to fully recreate the date picker after the value\n // has been updated.\n this.pickr?.destroy();\n this.pickr = undefined;\n setTimeout(() => {\n this.input ? (this.input.disabled = this.disabled) : null;\n this.pickr = this.initDatepicker(this.input);\n });\n }\n\n componentDidLoad() {\n this.pickr = this.initDatepicker(this.input);\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n @Watch('min')\n @Watch('max')\n onMinChanged() {\n this.pickr?.set('minDate', this.min);\n this.pickr?.set('maxDate', this.max);\n if (this.value && !this.pickr?.selectedDates?.length) {\n // Dynamically changing 'minDate' or 'maxDate' does not emit a change if\n // the value is cleared due to an invalid date.\n this.pickr?.clear();\n }\n }\n\n /**\n * Programmatically move focus to the datepicker. 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 this._input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the datepicker. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise<void> {\n this._input?.doBlur();\n }\n\n render() {\n return [\n <cat-input\n ref={el => (this._input = el)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n label={this.label}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n value={this.value}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n onCatChange={e => {\n e.stopPropagation();\n this.value = e.detail || undefined;\n }}\n onCatFocus={e => {\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.catBlur.emit(e.detail);\n }}\n >\n {this.hasSlottedLabel && (\n <span slot=\"label\">\n <slot name=\"label\"></slot>\n </span>\n )}\n {this.hasSlottedHint && (\n <span slot=\"hint\">\n <slot name=\"hint\"></slot>\n </span>\n )}\n </cat-input>,\n <div ref={el => (this._calendarWrapper = el)} class=\"datepicker-wrapper\"></div>\n ];\n }\n\n private initDatepicker(input?: HTMLInputElement): flatpickr.Instance | undefined {\n if (!input) {\n return;\n }\n\n // avoid dropdown closing if datepicker is part of a dropdown\n const withinDropdown = !!findClosest('cat-dropdown', input);\n const nativePickerAttributes: { [key: string]: string } = withinDropdown ? { 'data-dropdown-no-close': '' } : {};\n\n return flatpickr(\n input,\n getConfig({\n locale: getLocale(i18n.getLocale()),\n format: getFormat(i18n.getLocale(), this.mode),\n mode: this.mode,\n min: this.min,\n max: this.max,\n step: this.step,\n disabled: this.disabled,\n readonly: this.readonly,\n appendTo: this.attachToElement ? this._calendarWrapper : undefined,\n nativePickerAttributes: { ...nativePickerAttributes, ...this.nativePickerAttributes },\n // flatpickr has open bug about incorrect positioning when appendTo is used,\n // we have to use custom logic to calculate position\n // https://github.com/flatpickr/flatpickr/issues/1619\n position: this.attachToElement\n ? (flatpickr, positionElement) => {\n this.updatePosition(flatpickr, positionElement);\n }\n : (this.position as BaseOptions['position']) || undefined,\n onReady: (_dates, _dateStr, flatpickr) => {\n autoUpdate(input, flatpickr.calendarContainer, () => this.updatePosition(flatpickr, flatpickr._input));\n },\n applyChange: value => (this.value = value)\n })\n );\n }\n\n private updatePosition(flatpickr: flatpickr.Instance, positionElement: HTMLElement | undefined): void {\n if (positionElement) {\n computePosition(positionElement as ReferenceElement, flatpickr.calendarContainer, {\n strategy: 'fixed',\n placement: (this.position as Placement) || 'bottom-start',\n middleware: [flip()]\n }).then(({ x, y, placement }) => {\n if (flatpickr.calendarContainer) {\n flatpickr.calendarContainer.dataset.placement = placement;\n Object.assign(flatpickr.calendarContainer.style, {\n left: `${x}px`,\n top: `${y}px`,\n position: 'fixed'\n });\n }\n });\n }\n }\n}\n"]}
1
+ {"version":3,"file":"cat-datepicker.js","sourceRoot":"","sources":["../../../src/components/cat-datepicker/cat-datepicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAA+B,MAAM,kBAAkB,CAAC;AAQlG,MAAM,OAAO,iBAAiB;IAL9B;QAeW,oBAAe,GAAG,KAAK,CAAC;QAExB,mBAAc,GAAG,KAAK,CAAC;QAEhC;;WAEG;QACK,mBAAc,GAA4E,UAA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} from '@stencil/core';\nimport flatpickr from 'flatpickr';\nimport { findClosest } from '../../utils/find-closest';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { getConfig } from './cat-datepicker.config';\nimport { getFormat } from './cat-datepicker.format';\nimport { getLocale } from './cat-datepicker.locale';\nimport { CatDatepickerMode } from './cat-datepicker.mode';\nimport { autoUpdate, computePosition, flip, Placement, ReferenceElement } from '@floating-ui/dom';\nimport { BaseOptions } from 'flatpickr/dist/types/options';\n\n@Component({\n tag: 'cat-datepicker',\n styleUrl: 'cat-datepicker.scss',\n shadow: true\n})\nexport class CatDatepickerFlat {\n private pickr?: flatpickr.Instance;\n private _input?: HTMLCatInputElement;\n private _calendarWrapper?: HTMLDivElement;\n private get input(): HTMLInputElement | undefined {\n return this._input?.shadowRoot?.querySelector('input') ?? undefined;\n }\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\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 = 'off';\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = 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 as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() min?: string;\n\n /**\n * The mode of the datepicker, to select a date, time, both, a date range or a week number.\n */\n @Prop() mode: CatDatepickerMode = 'date';\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 * The step size to use when changing the time.\n */\n @Prop() step = 5;\n\n /**\n * Instead of body, appends the calendar to the cat-datepicker element instead\n */\n @Prop() attachToElement = false;\n\n /**\n * Where the calendar is rendered relative to the input vertically and horizontally.\n * In the format of \"[vertical] [horizontal]\". Vertical can be auto, above or below (required).\n * Horizontal can be left, center or right.\n * If @attachToElement is passed the value should be in Placement format\n */\n @Prop() position?: BaseOptions['position'] | Placement;\n\n /**\n * The value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z or as a week number string.\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 * Attributes that will be added to the rendered HTML datepicker element.\n */\n @Prop() nativePickerAttributes?: { [key: string]: string };\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 @Watch('value')\n onValueChanged(value: string) {\n if (value) {\n this.pickr?.setDate(value, false);\n if (this.mode !== 'daterange' || value.includes(' - ')) {\n this.catChange.emit(value);\n }\n } else {\n this.pickr?.clear(false);\n this.catChange.emit(undefined);\n }\n }\n\n @Watch('disabled')\n @Watch('readonly')\n @Watch('mode')\n onDisabledChanged() {\n // Dynamically changing config value is not working due to a bug in the\n // library. We thus need to fully recreate the date picker after the value\n // has been updated.\n this.pickr?.destroy();\n this.pickr = undefined;\n setTimeout(() => {\n this.input ? (this.input.disabled = this.disabled) : null;\n this.pickr = this.initDatepicker(this.input);\n });\n }\n\n componentDidLoad() {\n this.pickr = this.initDatepicker(this.input);\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n @Watch('min')\n @Watch('max')\n onMinChanged() {\n this.pickr?.set('minDate', this.min);\n this.pickr?.set('maxDate', this.max);\n if (this.value && !this.pickr?.selectedDates?.length) {\n // Dynamically changing 'minDate' or 'maxDate' does not emit a change if\n // the value is cleared due to an invalid date.\n this.pickr?.clear();\n }\n }\n\n /**\n * Programmatically move focus to the datepicker. 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 this._input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the datepicker. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise<void> {\n this._input?.doBlur();\n }\n\n render() {\n return [\n <cat-input\n ref={el => (this._input = el)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal ?? this.fallbackHorizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n label={this.label}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n value={this.value}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n onCatChange={e => {\n e.stopPropagation();\n this.value = e.detail || undefined;\n }}\n onCatFocus={e => {\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.catBlur.emit(e.detail);\n }}\n >\n {this.hasSlottedLabel && (\n <span slot=\"label\">\n <slot name=\"label\"></slot>\n </span>\n )}\n {this.hasSlottedHint && (\n <span slot=\"hint\">\n <slot name=\"hint\"></slot>\n </span>\n )}\n </cat-input>,\n <div ref={el => (this._calendarWrapper = el)} class=\"datepicker-wrapper\"></div>\n ];\n }\n\n private initDatepicker(input?: HTMLInputElement): flatpickr.Instance | undefined {\n if (!input) {\n return;\n }\n\n // avoid dropdown closing if datepicker is part of a dropdown\n const withinDropdown = !!findClosest('cat-dropdown', input);\n const nativePickerAttributes: { [key: string]: string } = withinDropdown ? { 'data-dropdown-no-close': '' } : {};\n\n return flatpickr(\n input,\n getConfig({\n locale: getLocale(i18n.getLocale()),\n format: getFormat(i18n.getLocale(), this.mode),\n mode: this.mode,\n min: this.min,\n max: this.max,\n step: this.step,\n disabled: this.disabled,\n readonly: this.readonly,\n appendTo: this.attachToElement ? this._calendarWrapper : undefined,\n nativePickerAttributes: { ...nativePickerAttributes, ...this.nativePickerAttributes },\n // flatpickr has open bug about incorrect positioning when appendTo is used,\n // we have to use custom logic to calculate position\n // https://github.com/flatpickr/flatpickr/issues/1619\n position: this.attachToElement\n ? (flatpickr, positionElement) => {\n this.updatePosition(flatpickr, positionElement);\n }\n : (this.position as BaseOptions['position']) || undefined,\n onReady: (_dates, _dateStr, flatpickr) => {\n autoUpdate(input, flatpickr.calendarContainer, () => this.updatePosition(flatpickr, flatpickr._input));\n },\n applyChange: value => (this.value = value)\n })\n );\n }\n\n private updatePosition(flatpickr: flatpickr.Instance, positionElement: HTMLElement | undefined): void {\n if (positionElement) {\n computePosition(positionElement as ReferenceElement, flatpickr.calendarContainer, {\n strategy: 'fixed',\n placement: (this.position as Placement) || 'bottom-start',\n middleware: [flip()]\n }).then(({ x, y, placement }) => {\n if (flatpickr.calendarContainer) {\n flatpickr.calendarContainer.dataset.placement = placement;\n Object.assign(flatpickr.calendarContainer.style, {\n left: `${x}px`,\n top: `${y}px`,\n position: 'fixed'\n });\n }\n });\n }\n }\n}\n"]}
@@ -24,14 +24,14 @@ export class CatFormGroup {
24
24
  }
25
25
  onHorizontalChanged(newHorizontal) {
26
26
  this.formElements.forEach(element => {
27
- element.horizontal = element.horizontal ?? newHorizontal;
27
+ element.fallbackHorizontal = newHorizontal;
28
28
  });
29
29
  }
30
30
  render() {
31
- return (h(Host, { key: 'db0a498ef54f74b0db89f17ba628626576fe4410', style: { '--label-size': this.labelSize } }, h("slot", { key: '28391f2acbd06baca30aaebb57e6bd3d20ab6532', onSlotchange: this.onSlotChange.bind(this) })));
31
+ return (h(Host, { key: 'd9cf4d831edfd4ec8813ba2df5f4a4928408966d', style: { '--label-size': this.labelSize } }, h("slot", { key: 'bca4d87e0a954bc3f227dc230a66fdcc4cdd4015', onSlotchange: this.onSlotChange.bind(this) })));
32
32
  }
33
33
  onSlotChange() {
34
- this.formElements = Array.from(this.hostElement.querySelectorAll('cat-input, cat-textarea, cat-select, cat-datepicker'));
34
+ this.formElements = Array.from(this.hostElement.querySelectorAll('cat-input, cat-textarea, cat-select, cat-datepicker, cat-date, cat-time'));
35
35
  this.onRequiredMarkerChanged(this.requiredMarker);
36
36
  this.onHorizontalChanged(this.horizontal);
37
37
  }