@haiilo/catalyst 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.css +4 -9
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js +2 -2
- package/dist/catalyst/{p-85d057f0.js → p-6ae13953.js} +1 -1
- package/dist/catalyst/p-6cd4fa1e.js +3 -0
- package/dist/catalyst/p-6cd4fa1e.js.map +1 -0
- package/dist/catalyst/p-a05fbea3.entry.js +10 -0
- package/dist/catalyst/p-a05fbea3.entry.js.map +1 -0
- package/dist/catalyst/scss/core/_dialog.scss +1 -1
- package/dist/catalyst/scss/core/_form.scss +2 -1
- package/dist/catalyst/scss/core/_typography.scss +1 -7
- package/dist/cjs/cat-alert_26.cjs.entry.js +3899 -3883
- package/dist/cjs/cat-alert_26.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +3 -3
- package/dist/cjs/catalyst.cjs.js.map +1 -1
- package/dist/cjs/{index-1e7eef7e.js → index-eb056d5e.js} +51 -13
- package/dist/cjs/index-eb056d5e.js.map +1 -0
- package/dist/cjs/index.cjs.js +73 -73
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{of-395b2f57.js → of-2b7161d2.js} +155 -155
- package/dist/cjs/of-2b7161d2.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cat-alert/cat-alert.e2e.js +7 -7
- package/dist/collection/components/cat-alert/cat-alert.e2e.js.map +1 -1
- package/dist/collection/components/cat-alert/cat-alert.js +98 -98
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
- package/dist/collection/components/cat-alert/cat-alert.spec.js +7 -7
- package/dist/collection/components/cat-alert/cat-alert.spec.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.e2e.js +6 -6
- package/dist/collection/components/cat-avatar/cat-avatar.e2e.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.js +218 -218
- package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.spec.js +7 -7
- package/dist/collection/components/cat-avatar/cat-avatar.spec.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.e2e.js +6 -6
- package/dist/collection/components/cat-badge/cat-badge.e2e.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.js +117 -117
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.spec.js +7 -7
- package/dist/collection/components/cat-badge/cat-badge.spec.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.css +2 -1
- package/dist/collection/components/cat-button/cat-button.e2e.js +6 -6
- package/dist/collection/components/cat-button/cat-button.e2e.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.js +693 -693
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.spec.js +7 -7
- package/dist/collection/components/cat-button/cat-button.spec.js.map +1 -1
- package/dist/collection/components/cat-button-group/cat-button-group.e2e.js +6 -6
- package/dist/collection/components/cat-button-group/cat-button-group.e2e.js.map +1 -1
- package/dist/collection/components/cat-button-group/cat-button-group.js +47 -47
- package/dist/collection/components/cat-button-group/cat-button-group.js.map +1 -1
- package/dist/collection/components/cat-button-group/cat-button-group.spec.js +7 -7
- package/dist/collection/components/cat-button-group/cat-button-group.spec.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.e2e.js +6 -6
- package/dist/collection/components/cat-card/cat-card.e2e.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.js +15 -15
- package/dist/collection/components/cat-card/cat-card.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.spec.js +7 -7
- package/dist/collection/components/cat-card/cat-card.spec.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.css +2 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js +6 -6
- package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +441 -441
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js +7 -7
- package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.config.js +62 -62
- package/dist/collection/components/cat-datepicker/cat-datepicker.config.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js +7 -7
- package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.format.js +20 -20
- package/dist/collection/components/cat-datepicker/cat-datepicker.format.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.js +720 -707
- package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.locale.js +39 -39
- package/dist/collection/components/cat-datepicker/cat-datepicker.locale.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js +7 -7
- package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js +7 -7
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +244 -244
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js +7 -7
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js +6 -6
- package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +300 -300
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js +7 -7
- package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.e2e.js +6 -6
- package/dist/collection/components/cat-form-group/cat-form-group.e2e.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.js +107 -107
- package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.spec.js +7 -7
- package/dist/collection/components/cat-form-group/cat-form-group.spec.js.map +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.js +9 -9
- package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js +7 -7
- package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js.map +1 -1
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js +71 -71
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -1
- package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js +3 -3
- package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.js +77 -77
- package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.spec.js +3 -3
- package/dist/collection/components/cat-icon/cat-icon-registry.spec.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.e2e.js +7 -7
- package/dist/collection/components/cat-icon/cat-icon.e2e.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.js +97 -97
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.spec.js +7 -7
- package/dist/collection/components/cat-icon/cat-icon.spec.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.e2e.js +7 -7
- package/dist/collection/components/cat-input/cat-input.e2e.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.js +768 -768
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.spec.js +7 -7
- package/dist/collection/components/cat-input/cat-input.spec.js.map +1 -1
- package/dist/collection/components/cat-notification/cat-notification.js +59 -59
- package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
- package/dist/collection/components/cat-notification/cat-notification.spec.js +3 -3
- package/dist/collection/components/cat-notification/cat-notification.spec.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.e2e.js +10 -10
- package/dist/collection/components/cat-pagination/cat-pagination.e2e.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.js +274 -274
- package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.spec.js +7 -7
- package/dist/collection/components/cat-pagination/cat-pagination.spec.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.e2e.js +6 -6
- package/dist/collection/components/cat-radio/cat-radio.e2e.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.js +378 -378
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.spec.js +7 -7
- package/dist/collection/components/cat-radio/cat-radio.spec.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js +6 -6
- package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +278 -278
- package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js +7 -7
- package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js +6 -6
- package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +287 -287
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js +7 -7
- package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.e2e.js +10 -10
- package/dist/collection/components/cat-select/cat-select.e2e.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.js +1143 -1143
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.spec.js +7 -7
- package/dist/collection/components/cat-select/cat-select.spec.js.map +1 -1
- package/dist/collection/components/cat-select/connectors.js +13 -13
- package/dist/collection/components/cat-select/connectors.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +1379 -1379
- package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js +6 -6
- package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +120 -120
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js +7 -7
- package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.e2e.js +6 -6
- package/dist/collection/components/cat-spinner/cat-spinner.e2e.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js +60 -60
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.spec.js +7 -7
- package/dist/collection/components/cat-spinner/cat-spinner.spec.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.e2e.js +6 -6
- package/dist/collection/components/cat-tab/cat-tab.e2e.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.js +230 -211
- package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.spec.js +7 -7
- package/dist/collection/components/cat-tab/cat-tab.spec.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.css +3 -0
- package/dist/collection/components/cat-tabs/cat-tabs.e2e.js +6 -6
- package/dist/collection/components/cat-tabs/cat-tabs.e2e.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +222 -215
- package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.spec.js +7 -7
- package/dist/collection/components/cat-tabs/cat-tabs.spec.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.e2e.js +7 -7
- package/dist/collection/components/cat-textarea/cat-textarea.e2e.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +586 -586
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.spec.js +7 -7
- package/dist/collection/components/cat-textarea/cat-textarea.spec.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.e2e.js +6 -6
- package/dist/collection/components/cat-toggle/cat-toggle.e2e.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +421 -421
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.spec.js +7 -7
- package/dist/collection/components/cat-toggle/cat-toggle.spec.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.css +3 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js +6 -6
- package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +297 -296
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js +12 -8
- package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js.map +1 -1
- package/dist/collection/scss/core/_dialog.scss +1 -1
- package/dist/collection/scss/core/_form.scss +2 -1
- package/dist/collection/scss/core/_typography.scss +1 -7
- package/dist/collection/utils/breakpoints.js +6 -6
- package/dist/collection/utils/breakpoints.js.map +1 -1
- package/dist/collection/utils/coerce.js +3 -3
- package/dist/collection/utils/coerce.js.map +1 -1
- package/dist/collection/utils/find-closest.js +6 -6
- package/dist/collection/utils/find-closest.js.map +1 -1
- package/dist/collection/utils/first-tabbable.js +1 -1
- package/dist/collection/utils/first-tabbable.js.map +1 -1
- package/dist/collection/utils/load-img.js +6 -6
- package/dist/collection/utils/load-img.js.map +1 -1
- package/dist/collection/utils/media-matcher.js +30 -30
- package/dist/collection/utils/media-matcher.js.map +1 -1
- package/dist/collection/utils/media-matcher.spec.js +32 -32
- package/dist/collection/utils/media-matcher.spec.js.map +1 -1
- package/dist/collection/utils/platform.js +34 -34
- package/dist/collection/utils/platform.js.map +1 -1
- package/dist/collection/utils/setDefault.js +4 -4
- package/dist/collection/utils/setDefault.js.map +1 -1
- package/dist/components/cat-alert.d.ts +2 -2
- package/dist/components/cat-alert.js +56 -56
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-avatar.d.ts +2 -2
- package/dist/components/cat-avatar2.js +93 -93
- package/dist/components/cat-avatar2.js.map +1 -1
- package/dist/components/cat-badge.d.ts +2 -2
- package/dist/components/cat-badge.js +32 -32
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button-group.d.ts +2 -2
- package/dist/components/cat-button-group.js +31 -31
- package/dist/components/cat-button-group.js.map +1 -1
- package/dist/components/cat-button.d.ts +2 -2
- package/dist/components/cat-button2.js +277 -277
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-card.d.ts +2 -2
- package/dist/components/cat-card.js +20 -20
- package/dist/components/cat-card.js.map +1 -1
- package/dist/components/cat-checkbox.d.ts +2 -2
- package/dist/components/cat-checkbox2.js +108 -108
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-datepicker-inline.d.ts +2 -2
- package/dist/components/cat-datepicker-inline.js +89 -89
- package/dist/components/cat-datepicker-inline.js.map +1 -1
- package/dist/components/cat-datepicker.d.ts +2 -2
- package/dist/components/cat-datepicker.js +203 -194
- package/dist/components/cat-datepicker.js.map +1 -1
- package/dist/components/cat-datepicker.locale.js +121 -121
- package/dist/components/cat-datepicker.locale.js.map +1 -1
- package/dist/components/cat-dropdown.d.ts +2 -2
- package/dist/components/cat-dropdown2.js +177 -177
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-form-group.d.ts +2 -2
- package/dist/components/cat-form-group.js +55 -55
- package/dist/components/cat-form-group.js.map +1 -1
- package/dist/components/cat-form-hint.js +9 -9
- package/dist/components/cat-form-hint.js.map +1 -1
- package/dist/components/cat-i18n-registry.js +71 -71
- package/dist/components/cat-i18n-registry.js.map +1 -1
- package/dist/components/cat-icon-registry.js +77 -77
- package/dist/components/cat-icon-registry.js.map +1 -1
- package/dist/components/cat-icon.d.ts +2 -2
- package/dist/components/cat-icon2.js +32 -32
- package/dist/components/cat-icon2.js.map +1 -1
- package/dist/components/cat-input.d.ts +2 -2
- package/dist/components/cat-input2.js +219 -219
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-pagination.d.ts +2 -2
- package/dist/components/cat-pagination.js +103 -103
- package/dist/components/cat-pagination.js.map +1 -1
- package/dist/components/cat-radio-group.d.ts +2 -2
- package/dist/components/cat-radio-group.js +113 -113
- package/dist/components/cat-radio-group.js.map +1 -1
- package/dist/components/cat-radio.d.ts +2 -2
- package/dist/components/cat-radio.js +93 -93
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-scrollable.d.ts +2 -2
- package/dist/components/cat-scrollable2.js +118 -118
- package/dist/components/cat-scrollable2.js.map +1 -1
- package/dist/components/cat-select-demo.d.ts +2 -2
- package/dist/components/cat-select-demo.js +1438 -1438
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/components/cat-select.d.ts +2 -2
- package/dist/components/cat-select2.js +666 -666
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-skeleton.d.ts +2 -2
- package/dist/components/cat-skeleton2.js +53 -53
- package/dist/components/cat-skeleton2.js.map +1 -1
- package/dist/components/cat-spinner.d.ts +2 -2
- package/dist/components/cat-spinner2.js +27 -27
- package/dist/components/cat-spinner2.js.map +1 -1
- package/dist/components/cat-tab.d.ts +2 -2
- package/dist/components/cat-tab.js +48 -46
- package/dist/components/cat-tab.js.map +1 -1
- package/dist/components/cat-tabs.d.ts +2 -2
- package/dist/components/cat-tabs.js +120 -113
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-textarea.d.ts +2 -2
- package/dist/components/cat-textarea.js +178 -178
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-toggle.d.ts +2 -2
- package/dist/components/cat-toggle.js +104 -104
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/cat-tooltip.d.ts +2 -2
- package/dist/components/cat-tooltip.js +144 -143
- package/dist/components/cat-tooltip.js.map +1 -1
- package/dist/components/coerce.js +3 -3
- package/dist/components/coerce.js.map +1 -1
- package/dist/components/index.js +72 -72
- package/dist/components/index.js.map +1 -1
- package/dist/esm/cat-alert_26.entry.js +3899 -3883
- package/dist/esm/cat-alert_26.entry.js.map +1 -1
- package/dist/esm/catalyst.js +4 -4
- package/dist/esm/catalyst.js.map +1 -1
- package/dist/esm/{index-30a221a3.js → index-acddba36.js} +51 -13
- package/dist/esm/index-acddba36.js.map +1 -0
- package/dist/esm/index.js +74 -74
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{of-04d3d9e1.js → of-4f92b30b.js} +155 -155
- package/dist/esm/of-4f92b30b.js.map +1 -0
- package/dist/types/components/cat-alert/cat-alert.d.ts +17 -17
- package/dist/types/components/cat-avatar/cat-avatar.d.ts +41 -41
- package/dist/types/components/cat-badge/cat-badge.d.ts +22 -22
- package/dist/types/components/cat-button/cat-button.d.ts +151 -151
- package/dist/types/components/cat-button-group/cat-button-group.d.ts +9 -9
- package/dist/types/components/cat-card/cat-card.d.ts +1 -1
- package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +97 -97
- package/dist/types/components/cat-datepicker/cat-datepicker.config.d.ts +12 -12
- package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +153 -149
- package/dist/types/components/cat-datepicker-inline/cat-datepicker-inline.d.ts +45 -45
- package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +49 -49
- package/dist/types/components/cat-form-group/cat-form-group.d.ts +23 -23
- package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +6 -6
- package/dist/types/components/cat-i18n/cat-i18n-registry.d.ts +17 -17
- package/dist/types/components/cat-icon/cat-icon-registry.d.ts +12 -12
- package/dist/types/components/cat-icon/cat-icon.d.ts +18 -18
- package/dist/types/components/cat-input/cat-input.d.ts +167 -167
- package/dist/types/components/cat-notification/cat-notification.d.ts +31 -31
- package/dist/types/components/cat-pagination/cat-pagination.d.ts +52 -52
- package/dist/types/components/cat-radio/cat-radio.d.ts +83 -83
- package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +49 -49
- package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +49 -49
- package/dist/types/components/cat-select/cat-select.d.ts +221 -221
- package/dist/types/components/cat-select/connectors.d.ts +5 -5
- package/dist/types/components/cat-select-demo/cat-select-demo.d.ts +11 -11
- package/dist/types/components/cat-skeleton/cat-skeleton.d.ts +23 -23
- package/dist/types/components/cat-spinner/cat-spinner.d.ts +10 -10
- package/dist/types/components/cat-tab/cat-tab.d.ts +48 -42
- package/dist/types/components/cat-tabs/cat-tabs.d.ts +40 -39
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +131 -131
- package/dist/types/components/cat-toggle/cat-toggle.d.ts +93 -93
- package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +64 -64
- package/dist/types/components.d.ts +10 -2
- package/dist/types/stencil-public-runtime.d.ts +8 -0
- package/dist/types/utils/breakpoints.d.ts +1 -1
- package/dist/types/utils/media-matcher.d.ts +10 -10
- package/dist/types/utils/platform.d.ts +16 -16
- package/dist/types/utils/setDefault.d.ts +2 -2
- package/package.json +18 -18
- package/dist/catalyst/p-1bd44896.js +0 -3
- package/dist/catalyst/p-1bd44896.js.map +0 -1
- package/dist/catalyst/p-dc953306.entry.js +0 -10
- package/dist/catalyst/p-dc953306.entry.js.map +0 -1
- package/dist/cjs/index-1e7eef7e.js.map +0 -1
- package/dist/cjs/of-395b2f57.js.map +0 -1
- package/dist/esm/index-30a221a3.js.map +0 -1
- package/dist/esm/of-04d3d9e1.js.map +0 -1
- /package/dist/catalyst/{p-85d057f0.js.map → p-6ae13953.js.map} +0 -0
|
@@ -3,291 +3,291 @@ import { h } from "@stencil/core";
|
|
|
3
3
|
* A group of radio buttons.
|
|
4
4
|
*/
|
|
5
5
|
export class CatRadioGroup {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
onNameChanged(newName) {
|
|
15
|
-
this.catRadioGroup.forEach(catRadio => (catRadio.name = newName));
|
|
16
|
-
}
|
|
17
|
-
onValueChanged(newValue) {
|
|
18
|
-
this.catRadioGroup.forEach(catRadio => (catRadio.checked = catRadio.value === newValue));
|
|
19
|
-
this.updateTabIndex();
|
|
20
|
-
}
|
|
21
|
-
onDisabledChanged(disabled) {
|
|
22
|
-
this.catRadioGroup.forEach(catRadio => (catRadio.disabled = catRadio.disabled || disabled));
|
|
23
|
-
}
|
|
24
|
-
onLabelLeftChanged(labelLeft) {
|
|
25
|
-
this.catRadioGroup.forEach(catRadio => (catRadio.labelLeft = catRadio.labelLeft || labelLeft));
|
|
26
|
-
}
|
|
27
|
-
componentDidLoad() {
|
|
28
|
-
this.init();
|
|
29
|
-
this.mutationObserver = new MutationObserver(mutations => mutations.some(value => value.target.nodeName === 'CAT-RADIO') && this.init());
|
|
30
|
-
this.mutationObserver?.observe(this.hostElement, {
|
|
31
|
-
childList: true,
|
|
32
|
-
attributes: true,
|
|
33
|
-
subtree: true
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
disconnectedCallback() {
|
|
37
|
-
this.mutationObserver?.disconnect();
|
|
38
|
-
}
|
|
39
|
-
onKeydown(event) {
|
|
40
|
-
if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key) && this.catRadioGroup.length) {
|
|
41
|
-
const targetElements = this.catRadioGroup.filter(catRadio => !catRadio.disabled);
|
|
42
|
-
const activeElement = document.activeElement;
|
|
43
|
-
const activeIdx = this.catRadioGroup.findIndex(catRadio => catRadio === activeElement);
|
|
44
|
-
const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;
|
|
45
|
-
const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;
|
|
46
|
-
targetElements[targetIdx].doFocus();
|
|
47
|
-
targetElements[targetIdx].shadowRoot?.querySelector('input')?.click();
|
|
48
|
-
this.updateTabIndex();
|
|
49
|
-
event.preventDefault();
|
|
6
|
+
constructor() {
|
|
7
|
+
this.catRadioGroup = [];
|
|
8
|
+
this.name = undefined;
|
|
9
|
+
this.value = undefined;
|
|
10
|
+
this.disabled = false;
|
|
11
|
+
this.a11yLabel = undefined;
|
|
12
|
+
this.labelLeft = false;
|
|
50
13
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const radio = this.catRadioGroup.find(radio => radio === event.target);
|
|
54
|
-
if (radio?.localName === 'cat-radio') {
|
|
55
|
-
this.value = radio?.checked ? radio?.value : undefined;
|
|
56
|
-
this.catChange.emit(this.value);
|
|
14
|
+
onNameChanged(newName) {
|
|
15
|
+
this.catRadioGroup.forEach(catRadio => (catRadio.name = newName));
|
|
57
16
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
this.catBlur.emit(event);
|
|
17
|
+
onValueChanged(newValue) {
|
|
18
|
+
this.catRadioGroup.forEach(catRadio => (catRadio.checked = catRadio.value === newValue));
|
|
19
|
+
this.updateTabIndex();
|
|
62
20
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (!event.relatedTarget) {
|
|
66
|
-
this.catBlur.emit(event);
|
|
21
|
+
onDisabledChanged(disabled) {
|
|
22
|
+
this.catRadioGroup.forEach(catRadio => (catRadio.disabled = catRadio.disabled || disabled));
|
|
67
23
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return (h("div", { role: "radiogroup", "aria-label": this.a11yLabel }, h("slot", null)));
|
|
71
|
-
}
|
|
72
|
-
init() {
|
|
73
|
-
this.catRadioGroup = Array.from(this.hostElement.querySelectorAll(`cat-radio`));
|
|
74
|
-
this.onNameChanged(this.name);
|
|
75
|
-
this.onValueChanged(this.value);
|
|
76
|
-
this.onDisabledChanged(this.disabled);
|
|
77
|
-
this.onLabelLeftChanged(this.labelLeft);
|
|
78
|
-
}
|
|
79
|
-
updateTabIndex() {
|
|
80
|
-
if (this.catRadioGroup.length) {
|
|
81
|
-
this.catRadioGroup.forEach(value => value.shadowRoot?.querySelector('input')?.setAttribute('tabindex', '-1'));
|
|
82
|
-
const checkedRadioIndex = this.catRadioGroup.findIndex(value => value.checked);
|
|
83
|
-
this.catRadioGroup[checkedRadioIndex >= 0 ? checkedRadioIndex : 0].shadowRoot
|
|
84
|
-
?.querySelector('input')
|
|
85
|
-
?.setAttribute('tabindex', '0');
|
|
24
|
+
onLabelLeftChanged(labelLeft) {
|
|
25
|
+
this.catRadioGroup.forEach(catRadio => (catRadio.labelLeft = catRadio.labelLeft || labelLeft));
|
|
86
26
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"required": false,
|
|
111
|
-
"optional": true,
|
|
112
|
-
"docs": {
|
|
113
|
-
"tags": [],
|
|
114
|
-
"text": "The name of the radio group component."
|
|
115
|
-
},
|
|
116
|
-
"attribute": "name",
|
|
117
|
-
"reflect": false
|
|
118
|
-
},
|
|
119
|
-
"value": {
|
|
120
|
-
"type": "string",
|
|
121
|
-
"mutable": true,
|
|
122
|
-
"complexType": {
|
|
123
|
-
"original": "string",
|
|
124
|
-
"resolved": "string | undefined",
|
|
125
|
-
"references": {}
|
|
126
|
-
},
|
|
127
|
-
"required": false,
|
|
128
|
-
"optional": true,
|
|
129
|
-
"docs": {
|
|
130
|
-
"tags": [],
|
|
131
|
-
"text": "The value of the radio group."
|
|
132
|
-
},
|
|
133
|
-
"attribute": "value",
|
|
134
|
-
"reflect": false
|
|
135
|
-
},
|
|
136
|
-
"disabled": {
|
|
137
|
-
"type": "boolean",
|
|
138
|
-
"mutable": false,
|
|
139
|
-
"complexType": {
|
|
140
|
-
"original": "boolean",
|
|
141
|
-
"resolved": "boolean",
|
|
142
|
-
"references": {}
|
|
143
|
-
},
|
|
144
|
-
"required": false,
|
|
145
|
-
"optional": false,
|
|
146
|
-
"docs": {
|
|
147
|
-
"tags": [],
|
|
148
|
-
"text": "Whether this radio group is disabled."
|
|
149
|
-
},
|
|
150
|
-
"attribute": "disabled",
|
|
151
|
-
"reflect": false,
|
|
152
|
-
"defaultValue": "false"
|
|
153
|
-
},
|
|
154
|
-
"a11yLabel": {
|
|
155
|
-
"type": "string",
|
|
156
|
-
"mutable": false,
|
|
157
|
-
"complexType": {
|
|
158
|
-
"original": "string",
|
|
159
|
-
"resolved": "string | undefined",
|
|
160
|
-
"references": {}
|
|
161
|
-
},
|
|
162
|
-
"required": false,
|
|
163
|
-
"optional": true,
|
|
164
|
-
"docs": {
|
|
165
|
-
"tags": [],
|
|
166
|
-
"text": "Adds an accessible label for the radio group that\nit is only shown in assistive technologies, like screen readers."
|
|
167
|
-
},
|
|
168
|
-
"attribute": "a11y-label",
|
|
169
|
-
"reflect": false
|
|
170
|
-
},
|
|
171
|
-
"labelLeft": {
|
|
172
|
-
"type": "boolean",
|
|
173
|
-
"mutable": false,
|
|
174
|
-
"complexType": {
|
|
175
|
-
"original": "boolean",
|
|
176
|
-
"resolved": "boolean",
|
|
177
|
-
"references": {}
|
|
178
|
-
},
|
|
179
|
-
"required": false,
|
|
180
|
-
"optional": false,
|
|
181
|
-
"docs": {
|
|
182
|
-
"tags": [],
|
|
183
|
-
"text": "Whether the label of the radios should appear to the left of them."
|
|
184
|
-
},
|
|
185
|
-
"attribute": "label-left",
|
|
186
|
-
"reflect": false,
|
|
187
|
-
"defaultValue": "false"
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
static get events() {
|
|
192
|
-
return [{
|
|
193
|
-
"method": "catChange",
|
|
194
|
-
"name": "catChange",
|
|
195
|
-
"bubbles": true,
|
|
196
|
-
"cancelable": true,
|
|
197
|
-
"composed": true,
|
|
198
|
-
"docs": {
|
|
199
|
-
"tags": [],
|
|
200
|
-
"text": "Emitted when the value is changed."
|
|
201
|
-
},
|
|
202
|
-
"complexType": {
|
|
203
|
-
"original": "boolean | string",
|
|
204
|
-
"resolved": "boolean | string",
|
|
205
|
-
"references": {}
|
|
27
|
+
componentDidLoad() {
|
|
28
|
+
this.init();
|
|
29
|
+
this.mutationObserver = new MutationObserver(mutations => mutations.some(value => value.target.nodeName === 'CAT-RADIO') && this.init());
|
|
30
|
+
this.mutationObserver?.observe(this.hostElement, {
|
|
31
|
+
childList: true,
|
|
32
|
+
attributes: true,
|
|
33
|
+
subtree: true
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
this.mutationObserver?.disconnect();
|
|
38
|
+
}
|
|
39
|
+
onKeydown(event) {
|
|
40
|
+
if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key) && this.catRadioGroup.length) {
|
|
41
|
+
const targetElements = this.catRadioGroup.filter(catRadio => !catRadio.disabled);
|
|
42
|
+
const activeElement = document.activeElement;
|
|
43
|
+
const activeIdx = this.catRadioGroup.findIndex(catRadio => catRadio === activeElement);
|
|
44
|
+
const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;
|
|
45
|
+
const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;
|
|
46
|
+
targetElements[targetIdx].doFocus();
|
|
47
|
+
targetElements[targetIdx].shadowRoot?.querySelector('input')?.click();
|
|
48
|
+
this.updateTabIndex();
|
|
49
|
+
event.preventDefault();
|
|
206
50
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
"docs": {
|
|
214
|
-
"tags": [],
|
|
215
|
-
"text": "Emitted when the radio group received focus."
|
|
216
|
-
},
|
|
217
|
-
"complexType": {
|
|
218
|
-
"original": "FocusEvent",
|
|
219
|
-
"resolved": "FocusEvent",
|
|
220
|
-
"references": {
|
|
221
|
-
"FocusEvent": {
|
|
222
|
-
"location": "global",
|
|
223
|
-
"id": "global::FocusEvent"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
51
|
+
}
|
|
52
|
+
onInput(event) {
|
|
53
|
+
const radio = this.catRadioGroup.find(radio => radio === event.target);
|
|
54
|
+
if (radio?.localName === 'cat-radio') {
|
|
55
|
+
this.value = radio?.checked ? radio?.value : undefined;
|
|
56
|
+
this.catChange.emit(this.value);
|
|
226
57
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
58
|
+
}
|
|
59
|
+
onFocus(event) {
|
|
60
|
+
if (!event.relatedTarget) {
|
|
61
|
+
this.catBlur.emit(event);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
onBlur(event) {
|
|
65
|
+
if (!event.relatedTarget) {
|
|
66
|
+
this.catBlur.emit(event);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
return (h("div", { role: "radiogroup", "aria-label": this.a11yLabel }, h("slot", null)));
|
|
71
|
+
}
|
|
72
|
+
init() {
|
|
73
|
+
this.catRadioGroup = Array.from(this.hostElement.querySelectorAll(`cat-radio`));
|
|
74
|
+
this.onNameChanged(this.name);
|
|
75
|
+
this.onValueChanged(this.value);
|
|
76
|
+
this.onDisabledChanged(this.disabled);
|
|
77
|
+
this.onLabelLeftChanged(this.labelLeft);
|
|
78
|
+
}
|
|
79
|
+
updateTabIndex() {
|
|
80
|
+
if (this.catRadioGroup.length) {
|
|
81
|
+
this.catRadioGroup.forEach(value => value.shadowRoot?.querySelector('input')?.setAttribute('tabindex', '-1'));
|
|
82
|
+
const checkedRadioIndex = this.catRadioGroup.findIndex(value => value.checked);
|
|
83
|
+
this.catRadioGroup[checkedRadioIndex >= 0 ? checkedRadioIndex : 0].shadowRoot
|
|
84
|
+
?.querySelector('input')
|
|
85
|
+
?.setAttribute('tabindex', '0');
|
|
246
86
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
87
|
+
}
|
|
88
|
+
static get is() { return "cat-radio-group"; }
|
|
89
|
+
static get encapsulation() { return "shadow"; }
|
|
90
|
+
static get originalStyleUrls() {
|
|
91
|
+
return {
|
|
92
|
+
"$": ["cat-radio-group.scss"]
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
static get styleUrls() {
|
|
96
|
+
return {
|
|
97
|
+
"$": ["cat-radio-group.css"]
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
static get properties() {
|
|
101
|
+
return {
|
|
102
|
+
"name": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "string",
|
|
107
|
+
"resolved": "string | undefined",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": true,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": "The name of the radio group component."
|
|
115
|
+
},
|
|
116
|
+
"attribute": "name",
|
|
117
|
+
"reflect": false
|
|
118
|
+
},
|
|
119
|
+
"value": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": true,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "string",
|
|
124
|
+
"resolved": "string | undefined",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": true,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "The value of the radio group."
|
|
132
|
+
},
|
|
133
|
+
"attribute": "value",
|
|
134
|
+
"reflect": false
|
|
135
|
+
},
|
|
136
|
+
"disabled": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "boolean",
|
|
141
|
+
"resolved": "boolean",
|
|
142
|
+
"references": {}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": false,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": "Whether this radio group is disabled."
|
|
149
|
+
},
|
|
150
|
+
"attribute": "disabled",
|
|
151
|
+
"reflect": false,
|
|
152
|
+
"defaultValue": "false"
|
|
153
|
+
},
|
|
154
|
+
"a11yLabel": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "string",
|
|
159
|
+
"resolved": "string | undefined",
|
|
160
|
+
"references": {}
|
|
161
|
+
},
|
|
162
|
+
"required": false,
|
|
163
|
+
"optional": true,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": "Adds an accessible label for the radio group that\nit is only shown in assistive technologies, like screen readers."
|
|
167
|
+
},
|
|
168
|
+
"attribute": "a11y-label",
|
|
169
|
+
"reflect": false
|
|
170
|
+
},
|
|
171
|
+
"labelLeft": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "boolean",
|
|
176
|
+
"resolved": "boolean",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "Whether the label of the radios should appear to the left of them."
|
|
184
|
+
},
|
|
185
|
+
"attribute": "label-left",
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"defaultValue": "false"
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
static get events() {
|
|
192
|
+
return [{
|
|
193
|
+
"method": "catChange",
|
|
194
|
+
"name": "catChange",
|
|
195
|
+
"bubbles": true,
|
|
196
|
+
"cancelable": true,
|
|
197
|
+
"composed": true,
|
|
198
|
+
"docs": {
|
|
199
|
+
"tags": [],
|
|
200
|
+
"text": "Emitted when the value is changed."
|
|
201
|
+
},
|
|
202
|
+
"complexType": {
|
|
203
|
+
"original": "boolean | string",
|
|
204
|
+
"resolved": "boolean | string",
|
|
205
|
+
"references": {}
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
"method": "catFocus",
|
|
209
|
+
"name": "catFocus",
|
|
210
|
+
"bubbles": true,
|
|
211
|
+
"cancelable": true,
|
|
212
|
+
"composed": true,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": "Emitted when the radio group received focus."
|
|
216
|
+
},
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "FocusEvent",
|
|
219
|
+
"resolved": "FocusEvent",
|
|
220
|
+
"references": {
|
|
221
|
+
"FocusEvent": {
|
|
222
|
+
"location": "global",
|
|
223
|
+
"id": "global::FocusEvent"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
"method": "catBlur",
|
|
229
|
+
"name": "catBlur",
|
|
230
|
+
"bubbles": true,
|
|
231
|
+
"cancelable": true,
|
|
232
|
+
"composed": true,
|
|
233
|
+
"docs": {
|
|
234
|
+
"tags": [],
|
|
235
|
+
"text": "Emitted when the radio group loses focus."
|
|
236
|
+
},
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "FocusEvent",
|
|
239
|
+
"resolved": "FocusEvent",
|
|
240
|
+
"references": {
|
|
241
|
+
"FocusEvent": {
|
|
242
|
+
"location": "global",
|
|
243
|
+
"id": "global::FocusEvent"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}];
|
|
248
|
+
}
|
|
249
|
+
static get elementRef() { return "hostElement"; }
|
|
250
|
+
static get watchers() {
|
|
251
|
+
return [{
|
|
252
|
+
"propName": "name",
|
|
253
|
+
"methodName": "onNameChanged"
|
|
254
|
+
}, {
|
|
255
|
+
"propName": "value",
|
|
256
|
+
"methodName": "onValueChanged"
|
|
257
|
+
}, {
|
|
258
|
+
"propName": "disabled",
|
|
259
|
+
"methodName": "onDisabledChanged"
|
|
260
|
+
}, {
|
|
261
|
+
"propName": "labelLeft",
|
|
262
|
+
"methodName": "onLabelLeftChanged"
|
|
263
|
+
}];
|
|
264
|
+
}
|
|
265
|
+
static get listeners() {
|
|
266
|
+
return [{
|
|
267
|
+
"name": "keydown",
|
|
268
|
+
"method": "onKeydown",
|
|
269
|
+
"target": undefined,
|
|
270
|
+
"capture": false,
|
|
271
|
+
"passive": false
|
|
272
|
+
}, {
|
|
273
|
+
"name": "input",
|
|
274
|
+
"method": "onInput",
|
|
275
|
+
"target": undefined,
|
|
276
|
+
"capture": false,
|
|
277
|
+
"passive": false
|
|
278
|
+
}, {
|
|
279
|
+
"name": "focus",
|
|
280
|
+
"method": "onFocus",
|
|
281
|
+
"target": undefined,
|
|
282
|
+
"capture": true,
|
|
283
|
+
"passive": false
|
|
284
|
+
}, {
|
|
285
|
+
"name": "blur",
|
|
286
|
+
"method": "onBlur",
|
|
287
|
+
"target": undefined,
|
|
288
|
+
"capture": true,
|
|
289
|
+
"passive": false
|
|
290
|
+
}];
|
|
291
|
+
}
|
|
292
292
|
}
|
|
293
293
|
//# sourceMappingURL=cat-radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-radio-group.js","sourceRoot":"","sources":["../../../src/components/cat-radio-group/cat-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhG;;GAEG;AAMH,MAAM,OAAO,aAAa;;
|
|
1
|
+
{"version":3,"file":"cat-radio-group.js","sourceRoot":"","sources":["../../../src/components/c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AC,CAAC;QACtC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAEO,cAAc;QACpB,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;YAC7B,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;YAC9G,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC/E,IAAI,CAAC,aAAa,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU;gBAC3E,EAAE,aAAa,CAAC,OAAO,CAAC;gBACxB,EAAE,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;SACnC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Prop, Watch } from '@stencil/core';\n\n/**\n * A group of radio buttons.\n */\n@Component({\n tag: 'cat-radio-group',\n styleUrl: 'cat-radio-group.scss',\n shadow: true\n})\nexport class CatRadioGroup {\n private catRadioGroup: HTMLCatRadioElement[] = [];\n private mutationObserver?: MutationObserver;\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * The name of the radio group component.\n */\n @Prop() name?: string;\n\n /**\n * The value of the radio group.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Whether this radio group is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Adds an accessible label for the radio group that\n * it is only shown in assistive technologies, like screen readers.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n /**\n * Whether the label of the radios should appear to the left of them.\n */\n @Prop() labelLeft = false;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter<boolean | string>;\n\n /**\n * Emitted when the radio group received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the radio group loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n @Watch('name')\n onNameChanged(newName?: string) {\n this.catRadioGroup.forEach(catRadio => (catRadio.name = newName));\n }\n\n @Watch('value')\n onValueChanged(newValue?: string) {\n this.catRadioGroup.forEach(catRadio => (catRadio.checked = catRadio.value === newValue));\n this.updateTabIndex();\n }\n\n @Watch('disabled')\n onDisabledChanged(disabled: boolean) {\n this.catRadioGroup.forEach(catRadio => (catRadio.disabled = catRadio.disabled || disabled));\n }\n\n @Watch('labelLeft')\n onLabelLeftChanged(labelLeft: boolean) {\n this.catRadioGroup.forEach(catRadio => (catRadio.labelLeft = catRadio.labelLeft || labelLeft));\n }\n\n componentDidLoad(): void {\n this.init();\n this.mutationObserver = new MutationObserver(\n mutations => mutations.some(value => value.target.nodeName === 'CAT-RADIO') && this.init()\n );\n this.mutationObserver?.observe(this.hostElement, {\n childList: true,\n attributes: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n }\n\n @Listen('keydown')\n onKeydown(event: KeyboardEvent): void {\n if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key) && this.catRadioGroup.length) {\n const targetElements = this.catRadioGroup.filter(catRadio => !catRadio.disabled);\n const activeElement = document.activeElement as HTMLCatRadioElement;\n const activeIdx = this.catRadioGroup.findIndex(catRadio => catRadio === activeElement);\n const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;\n const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;\n targetElements[targetIdx].doFocus();\n targetElements[targetIdx].shadowRoot?.querySelector('input')?.click();\n this.updateTabIndex();\n event.preventDefault();\n }\n }\n\n @Listen('input')\n onInput(event: MouseEvent): void {\n const radio = this.catRadioGroup.find(radio => radio === event.target);\n if (radio?.localName === 'cat-radio') {\n this.value = radio?.checked ? radio?.value : undefined;\n this.catChange.emit(this.value);\n }\n }\n\n @Listen('focus', { capture: true })\n onFocus(event: FocusEvent): void {\n if (!event.relatedTarget) {\n this.catBlur.emit(event);\n }\n }\n\n @Listen('blur', { capture: true })\n onBlur(event: FocusEvent): void {\n if (!event.relatedTarget) {\n this.catBlur.emit(event);\n }\n }\n\n render() {\n return (\n <div role=\"radiogroup\" aria-label={this.a11yLabel}>\n <slot></slot>\n </div>\n );\n }\n\n private init() {\n this.catRadioGroup = Array.from(this.hostElement.querySelectorAll(`cat-radio`));\n this.onNameChanged(this.name);\n this.onValueChanged(this.value);\n this.onDisabledChanged(this.disabled);\n this.onLabelLeftChanged(this.labelLeft);\n }\n\n private updateTabIndex() {\n if (this.catRadioGroup.length) {\n this.catRadioGroup.forEach(value => value.shadowRoot?.querySelector('input')?.setAttribute('tabindex', '-1'));\n const checkedRadioIndex = this.catRadioGroup.findIndex(value => value.checked);\n this.catRadioGroup[checkedRadioIndex >= 0 ? checkedRadioIndex : 0].shadowRoot\n ?.querySelector('input')\n ?.setAttribute('tabindex', '0');\n }\n }\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
2
|
import { CatRadioGroup } from "./cat-radio-group";
|
|
3
3
|
describe('cat-radio-group', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [CatRadioGroup],
|
|
7
|
+
html: `<cat-radio-group></cat-radio-group>`
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toEqualHtml(`
|
|
10
10
|
<cat-radio-group>
|
|
11
11
|
<mock:shadow-root>
|
|
12
12
|
<div role="radiogroup">
|
|
@@ -15,6 +15,6 @@ describe('cat-radio-group', () => {
|
|
|
15
15
|
</mock:shadow-root>
|
|
16
16
|
</cat-radio-group>
|
|
17
17
|
`);
|
|
18
|
-
|
|
18
|
+
});
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=cat-radio-group.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-radio-group.spec.js","sourceRoot":"","sources":["../../../src/components/cat-radio-group/cat-radio-group.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"cat-radio-group.spec.js","sourceRoot":"","sources":["../../../src/components/cat-radio-group/cat-radio-group.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,aAAa,CAAC;YAC3B,IAAI,EAAE,qCAAqC;SAC5C,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;KAQ7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { CatRadioGroup } from './cat-radio-group';\n\ndescribe('cat-radio-group', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CatRadioGroup],\n html: `<cat-radio-group></cat-radio-group>`\n });\n expect(page.root).toEqualHtml(`\n <cat-radio-group>\n <mock:shadow-root>\n <div role=\"radiogroup\">\n <slot></slot>\n </div>\n </mock:shadow-root>\n </cat-radio-group>\n `);\n });\n});\n"]}
|