@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,62 +3,62 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
3
3
|
const catSkeletonCss = ":host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]:not(:last-child)){margin-bottom:1rem}:host([variant=body]:not(:last-child)){margin-bottom:2rem}.skeleton{display:block;border-radius:var(--cat-border-radius-m, 0.25rem);background:var(--background)}.skeleton-circle{border-radius:10rem}.skeleton-xs.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-square,.skeleton-xs.skeleton-circle{width:var(--width, 1.5rem);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-head,.skeleton-xs.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xs.skeleton-head{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-xs.skeleton-body{height:calc(0.75rem - 4px);margin:calc((1rem - 0.75rem + 4px) * 0.5) 0}.skeleton-s.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2rem)}.skeleton-s.skeleton-square,.skeleton-s.skeleton-circle{width:var(--width, 2rem);height:var(--height, 2rem)}.skeleton-s.skeleton-head,.skeleton-s.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-s.skeleton-head{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-s.skeleton-body{height:calc(0.875rem - 4px);margin:calc((1.125rem - 0.875rem + 4px) * 0.5) 0}.skeleton-m.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2.5rem)}.skeleton-m.skeleton-square,.skeleton-m.skeleton-circle{width:var(--width, 2.5rem);height:var(--height, 2.5rem)}.skeleton-m.skeleton-head,.skeleton-m.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-m.skeleton-head{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-m.skeleton-body{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-l.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3rem)}.skeleton-l.skeleton-square,.skeleton-l.skeleton-circle{width:var(--width, 3rem);height:var(--height, 3rem)}.skeleton-l.skeleton-head,.skeleton-l.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-l.skeleton-head{height:calc(1.5rem - 4px);margin:calc((1.75rem - 1.5rem + 4px) * 0.5) 0}.skeleton-l.skeleton-body{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-square,.skeleton-xl.skeleton-circle{width:var(--width, 3.5rem);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-head,.skeleton-xl.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xl.skeleton-head{height:calc(1.75rem - 4px);margin:calc((2rem - 1.75rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-body{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-sheen{background:linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);background-size:300% 100%;animation:sheen var(--speed) ease-in-out infinite}.skeleton-pulse{position:relative;overflow:hidden}.skeleton-pulse::before{content:\"\";display:block;position:absolute;width:100%;height:100%;background-color:var(--highlight);animation:var(--speed) ease-in-out 0.5s infinite normal none running pulse;opacity:0}@keyframes sheen{0%{background-position:right}}@keyframes pulse{50%{opacity:1}}";
|
|
4
4
|
|
|
5
5
|
const CatSkeleton = /*@__PURE__*/ proxyCustomElement(class CatSkeleton extends HTMLElement {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return (h(Host, null, Array.from(Array(this.count)).map(() => (h("div", { style: this.style, class: {
|
|
17
|
-
skeleton: true,
|
|
18
|
-
[`skeleton-${this.effect}`]: Boolean(this.effect),
|
|
19
|
-
[`skeleton-${this.variant}`]: Boolean(this.variant),
|
|
20
|
-
[`skeleton-${this.size}`]: Boolean(this.size)
|
|
21
|
-
} })))));
|
|
22
|
-
}
|
|
23
|
-
get count() {
|
|
24
|
-
switch (this.variant) {
|
|
25
|
-
case 'head':
|
|
26
|
-
return Math.max(1, this.lines || 1);
|
|
27
|
-
case 'body':
|
|
28
|
-
return Math.max(1, this.lines || 3);
|
|
29
|
-
default:
|
|
30
|
-
return 1;
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.effect = 'sheen';
|
|
11
|
+
this.variant = 'rectangle';
|
|
12
|
+
this.size = 'm';
|
|
13
|
+
this.lines = undefined;
|
|
31
14
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, null, Array.from(Array(this.count)).map(() => (h("div", { style: this.style, class: {
|
|
17
|
+
skeleton: true,
|
|
18
|
+
[`skeleton-${this.effect}`]: Boolean(this.effect),
|
|
19
|
+
[`skeleton-${this.variant}`]: Boolean(this.variant),
|
|
20
|
+
[`skeleton-${this.size}`]: Boolean(this.size)
|
|
21
|
+
} })))));
|
|
22
|
+
}
|
|
23
|
+
get count() {
|
|
24
|
+
switch (this.variant) {
|
|
25
|
+
case 'head':
|
|
26
|
+
return Math.max(1, this.lines || 1);
|
|
27
|
+
case 'body':
|
|
28
|
+
return Math.max(1, this.lines || 3);
|
|
29
|
+
default:
|
|
30
|
+
return 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
get style() {
|
|
34
|
+
return this.variant === 'head' || this.variant === 'body'
|
|
35
|
+
? {
|
|
36
|
+
'--line-width': `${this.random(50, 100)}%`
|
|
37
|
+
}
|
|
38
|
+
: undefined;
|
|
39
|
+
}
|
|
40
|
+
random(min, max) {
|
|
41
|
+
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
42
|
+
}
|
|
43
|
+
static get style() { return catSkeletonCss; }
|
|
44
44
|
}, [1, "cat-skeleton", {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
"effect": [1],
|
|
46
|
+
"variant": [1],
|
|
47
|
+
"size": [1],
|
|
48
|
+
"lines": [2]
|
|
49
|
+
}]);
|
|
50
50
|
function defineCustomElement() {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
if (typeof customElements === "undefined") {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const components = ["cat-skeleton"];
|
|
55
|
+
components.forEach(tagName => { switch (tagName) {
|
|
56
|
+
case "cat-skeleton":
|
|
57
|
+
if (!customElements.get(tagName)) {
|
|
58
|
+
customElements.define(tagName, CatSkeleton);
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
} });
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export { CatSkeleton as C, defineCustomElement as d };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cat-skeleton2.js","mappings":";;AAAA,MAAM,cAAc,GAAG,g6GAAg6G;;MCU16G,WAAW;;;;;
|
|
1
|
+
{"file":"cat-skeleton2.js","mappings":";;AAAA,MAAM,cAAc,GAAG,g6GAAg6G;;MCU16G,WAAW;;;;;sBAIwB,OAAO;uBAKkB,WAAW;oBAMpC,GAAG;;;IASjD,MAAM;QACJ,QACE,EAAC,IAAI,QACF,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OACjC,WACE,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE;gBACL,QAAQ,EAAE,IAAI;gBACd,CAAC,YAAY,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;gBACjD,CAAC,YAAY,IAAI,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;gBACnD,CAAC,YAAY,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;aAC9C,GACI,CACR,CAAC,CACG,EACP;KACH;IAED,IAAY,KAAK;QACf,QAAQ,IAAI,CAAC,OAAO;YAClB,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;YACtC,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;YACtC;gBACE,OAAO,CAAC,CAAC;SACZ;KACF;IAED,IAAY,KAAK;QACf,OAAO,IAAI,CAAC,OAAO,KAAK,MAAM,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM;cACrD;gBACE,cAAc,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG;aAC3C;cACD,SAAS,CAAC;KACf;IAEO,MAAM,CAAC,GAAW,EAAE,GAAW;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;KAC1D;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/cat-skeleton/cat-skeleton.scss?tag=cat-skeleton&encapsulation=shadow","src/components/cat-skeleton/cat-skeleton.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$skeleton-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n:host {\n /**\n * @prop --background: The background color of the skeleton.\n * @prop --highlight: The highlight color of the skeleton.\n * @prop --speed: The animation speed.\n */\n display: flex;\n flex-direction: column;\n position: relative;\n\n --background: #{cat-token('color.ui.background.skeleton')};\n --highlight: #{cat-token('color.ui.background.skeletonHighlight')};\n --speed: 2s;\n}\n\n:host([variant='square']),\n:host([variant='circle']) {\n display: inline-flex;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host([variant='head']:not(:last-child)) {\n margin-bottom: $cat-head-margin-bottom;\n}\n\n:host([variant='body']:not(:last-child)) {\n margin-bottom: $cat-body-margin-bottom;\n}\n\n.skeleton {\n display: block;\n border-radius: cat-border-radius('m');\n background: var(--background);\n}\n\n.skeleton-circle {\n border-radius: 10rem;\n}\n\n// ----- size\n\n@mixin size($size, $lvl) {\n $-text-offset: 4px;\n .skeleton-#{$size} {\n &.skeleton-rectangle {\n width: var(--width, 100%);\n height: var(--height, map.get($skeleton-sizes, $size));\n }\n\n &.skeleton-square,\n &.skeleton-circle {\n width: var(--width, map.get($skeleton-sizes, $size));\n height: var(--height, map.get($skeleton-sizes, $size));\n }\n\n &.skeleton-head,\n &.skeleton-body {\n width: var(--width, var(--line-width, 100%));\n }\n\n &.skeleton-head {\n height: calc(#{cat-head-font-size($lvl)} - #{$-text-offset});\n margin: calc((#{cat-head-line-height($lvl)} - #{cat-head-font-size($lvl)} + #{$-text-offset}) * 0.5) 0;\n }\n\n &.skeleton-body {\n height: calc(#{cat-body-font-size($size)} - #{$-text-offset});\n margin: calc((#{cat-body-line-height($size)} - #{cat-body-font-size($size)} + #{$-text-offset}) * 0.5) 0;\n }\n }\n}\n\n@include size('xs', 5);\n@include size('s', 4);\n@include size('m', 3);\n@include size('l', 2);\n@include size('xl', 1);\n\n// ----- animation\n\n.skeleton-sheen {\n background: linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%)\n var(--background);\n background-size: 300% 100%;\n animation: sheen var(--speed) ease-in-out infinite;\n}\n\n.skeleton-pulse {\n position: relative;\n overflow: hidden;\n\n &::before {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: var(--highlight);\n animation: var(--speed) ease-in-out 0.5s infinite normal none running pulse;\n opacity: 0;\n }\n}\n\n@keyframes sheen {\n 0% {\n background-position: right;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: 1;\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * Skeletons are used to show where content will eventually be drawn.\n */\n@Component({\n tag: 'cat-skeleton',\n styleUrl: 'cat-skeleton.scss',\n shadow: true\n})\nexport class CatSkeleton {\n /**\n * The animation style of the skeleton.\n */\n @Prop() effect: 'plain' | 'sheen' | 'pulse' = 'sheen';\n\n /**\n * The rendering style of the skeleton.\n */\n @Prop() variant: 'rectangle' | 'square' | 'circle' | 'head' | 'body' = 'rectangle';\n\n /**\n * The size of the skeleton. If the variant is set to \"head\", the size values\n * \"xs\" to \"xl\" translate to the head levels `h1` to `h5`.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The number of text lines to be rendered for \"head\" and \"body\" variants.\n * Defaults to 1 for \"head\" and 3 for \"body\". Will be ignored for other\n * variants.\n */\n @Prop() lines?: number;\n\n render() {\n return (\n <Host>\n {Array.from(Array(this.count)).map(() => (\n <div\n style={this.style}\n class={{\n skeleton: true,\n [`skeleton-${this.effect}`]: Boolean(this.effect),\n [`skeleton-${this.variant}`]: Boolean(this.variant),\n [`skeleton-${this.size}`]: Boolean(this.size)\n }}\n ></div>\n ))}\n </Host>\n );\n }\n\n private get count() {\n switch (this.variant) {\n case 'head':\n return Math.max(1, this.lines || 1);\n case 'body':\n return Math.max(1, this.lines || 3);\n default:\n return 1;\n }\n }\n\n private get style() {\n return this.variant === 'head' || this.variant === 'body'\n ? {\n '--line-width': `${this.random(50, 100)}%`\n }\n : undefined;\n }\n\n private random(min: number, max: number) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }\n}\n"],"version":3}
|
|
@@ -2,8 +2,8 @@ import type { Components, JSX } from "../types/components";
|
|
|
2
2
|
|
|
3
3
|
interface CatSpinner extends Components.CatSpinner, HTMLElement {}
|
|
4
4
|
export const CatSpinner: {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
prototype: CatSpinner;
|
|
6
|
+
new (): CatSpinner;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Used to define this component and all nested components recursively.
|
|
@@ -3,35 +3,35 @@ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/clien
|
|
|
3
3
|
const catSpinnerCss = ":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;width:1em;height:1em}.spinner-xs svg{font-size:0.75rem}.spinner-s svg{font-size:1rem}.spinner-m svg{font-size:1.25rem}.spinner-l svg{font-size:1.5rem}.spinner-xl svg{font-size:1.75rem}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";
|
|
4
4
|
|
|
5
5
|
const CatSpinner = /*@__PURE__*/ proxyCustomElement(class CatSpinner extends HTMLElement {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.size = 'm';
|
|
11
|
+
this.a11yLabel = undefined;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h("span", { "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', class: {
|
|
15
|
+
[`spinner-${this.size}`]: this.size !== 'inline'
|
|
16
|
+
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, h("circle", { cx: "24", cy: "24", r: "21.5" }))));
|
|
17
|
+
}
|
|
18
|
+
static get style() { return catSpinnerCss; }
|
|
19
19
|
}, [1, "cat-spinner", {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
"size": [1],
|
|
21
|
+
"a11yLabel": [1, "a11y-label"]
|
|
22
|
+
}]);
|
|
23
23
|
function defineCustomElement() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
if (typeof customElements === "undefined") {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const components = ["cat-spinner"];
|
|
28
|
+
components.forEach(tagName => { switch (tagName) {
|
|
29
|
+
case "cat-spinner":
|
|
30
|
+
if (!customElements.get(tagName)) {
|
|
31
|
+
customElements.define(tagName, CatSpinner);
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
} });
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export { CatSpinner as C, defineCustomElement as d };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cat-spinner2.js","mappings":";;AAAA,MAAM,aAAa,GAAG,6nBAA6nB;;MCUtoB,UAAU;;;;;
|
|
1
|
+
{"file":"cat-spinner2.js","mappings":";;AAAA,MAAM,aAAa,GAAG,6nBAA6nB;;MCUtoB,UAAU;;;;;oBAIoC,GAAG;;;IAQ5D,MAAM;QACJ,QACE,0BACc,IAAI,CAAC,SAAS,iBACb,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,MAAM,EAC3C,KAAK,EAAE;gBACL,CAAC,WAAW,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,KAAK,QAAQ;aACjD,IAED,WAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,IACzD,cAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,MAAM,GAAU,CACtC,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/cat-spinner/cat-spinner.scss?tag=cat-spinner&encapsulation=shadow","src/components/cat-spinner/cat-spinner.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$spinner-sizes: (\n 'xl': 1.75rem,\n 'l': 1.5rem,\n 'm': 1.25rem,\n 's': 1rem,\n 'xs': 0.75rem\n);\n\n:host {\n display: inline-flex;\n vertical-align: middle;\n @include cat-select(none);\n\n &[hidden] {\n display: none;\n }\n}\n\nspan {\n display: inline-flex;\n}\n\nsvg {\n fill: none;\n stroke: currentColor;\n stroke-dasharray: 135px;\n stroke-dashoffset: 95px;\n stroke-linecap: round;\n stroke-width: 5px;\n transform-origin: center center;\n animation: spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;\n width: 1em;\n height: 1em;\n}\n\n// ----- sizes\n\n@mixin size($size) {\n .spinner-#{$size} svg {\n font-size: map.get($spinner-sizes, $size);\n }\n}\n\n@include size('xs');\n@include size('s');\n@include size('m');\n@include size('l');\n@include size('xl');\n\n// ----- animation\n\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Spinners are used to indicate users that their action is being processed.\n */\n@Component({\n tag: 'cat-spinner',\n styleUrl: 'cat-spinner.scss',\n shadow: true\n})\nexport class CatSpinner {\n /**\n * The size of the spinner.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline' = 'm';\n\n /**\n * Adds accessible label for the spinner that is only shown for screen\n * readers. The `aria-hidden` attribute will be set if no label is present.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n <span\n aria-label={this.a11yLabel}\n aria-hidden={this.a11yLabel ? null : 'true'}\n class={{\n [`spinner-${this.size}`]: this.size !== 'inline'\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\">\n <circle cx=\"24\" cy=\"24\" r=\"21.5\"></circle>\n </svg>\n </span>\n );\n }\n}\n"],"version":3}
|
|
@@ -2,8 +2,8 @@ import type { Components, JSX } from "../types/components";
|
|
|
2
2
|
|
|
3
3
|
interface CatTab extends Components.CatTab, HTMLElement {}
|
|
4
4
|
export const CatTab: {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
prototype: CatTab;
|
|
6
|
+
new (): CatTab;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Used to define this component and all nested components recursively.
|
|
@@ -4,55 +4,57 @@ const catTabCss = ":host{display:block}:host([hidden]){display:none}";
|
|
|
4
4
|
|
|
5
5
|
let nextUniqueId = 0;
|
|
6
6
|
const CatTab$1 = /*@__PURE__*/ proxyCustomElement(class CatTab extends HTMLElement {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
connectedCallback() {
|
|
22
|
-
if (!this.hostElement.id) {
|
|
23
|
-
this.hostElement.id = `cat-tab-${nextUniqueId++}`;
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.catClick = createEvent(this, "catClick", 7);
|
|
12
|
+
this.label = '';
|
|
13
|
+
this.icon = undefined;
|
|
14
|
+
this.iconOnly = false;
|
|
15
|
+
this.iconRight = false;
|
|
16
|
+
this.url = undefined;
|
|
17
|
+
this.urlTarget = undefined;
|
|
18
|
+
this.deactivated = false;
|
|
19
|
+
this.error = false;
|
|
20
|
+
this.nativeAttributes = undefined;
|
|
24
21
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
if (!this.hostElement.id) {
|
|
24
|
+
this.hostElement.id = `cat-tab-${nextUniqueId++}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
onClick(event) {
|
|
28
|
+
this.catClick.emit(event);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return h(Host, null);
|
|
32
|
+
}
|
|
33
|
+
get hostElement() { return this; }
|
|
34
|
+
static get style() { return catTabCss; }
|
|
34
35
|
}, [1, "cat-tab", {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
"label": [513],
|
|
37
|
+
"icon": [513],
|
|
38
|
+
"iconOnly": [520, "icon-only"],
|
|
39
|
+
"iconRight": [516, "icon-right"],
|
|
40
|
+
"url": [513],
|
|
41
|
+
"urlTarget": [513, "url-target"],
|
|
42
|
+
"deactivated": [516],
|
|
43
|
+
"error": [516],
|
|
44
|
+
"nativeAttributes": [16]
|
|
45
|
+
}, [[0, "click", "onClick"]]]);
|
|
44
46
|
function defineCustomElement$1() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
if (typeof customElements === "undefined") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const components = ["cat-tab"];
|
|
51
|
+
components.forEach(tagName => { switch (tagName) {
|
|
52
|
+
case "cat-tab":
|
|
53
|
+
if (!customElements.get(tagName)) {
|
|
54
|
+
customElements.define(tagName, CatTab$1);
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
} });
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
const CatTab = CatTab$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cat-tab.js","mappings":";;AAAA,MAAM,SAAS,GAAG,mDAAmD;;ACGrE,IAAI,YAAY,GAAG,CAAC,CAAC;MAURA,QAAM;;;;;;
|
|
1
|
+
{"file":"cat-tab.js","mappings":";;AAAA,MAAM,SAAS,GAAG,mDAAmD;;ACGrE,IAAI,YAAY,GAAG,CAAC,CAAC;MAURA,QAAM;;;;;;qBAMgB,EAAE;;wBAUuB,KAAK;yBAK1B,KAAK;;;2BAeH,KAAK;qBAOX,KAAK;;;IAYtC,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE;YACxB,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,YAAY,EAAE,EAAE,CAAC;SACnD;KACF;IAGD,OAAO,CAAC,KAAiB;QACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3B;IAED,MAAM;QACJ,OAAO,EAAC,IAAI,OAAQ,CAAC;KACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CatTab"],"sources":["src/components/cat-tab/cat-tab.scss?tag=cat-tab&encapsulation=shadow","src/components/cat-tab/cat-tab.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n","import { Component, h, Prop, Event, EventEmitter, Listen, Host, Element } from '@stencil/core';\nimport { Breakpoint } from '../../utils/breakpoints';\n\nlet nextUniqueId = 0;\n\n/**\n * A single tab inside a tabs component.\n */\n@Component({\n tag: 'cat-tab',\n styleUrl: 'cat-tab.scss',\n shadow: true\n})\nexport class CatTab {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The label of the tab.\n */\n @Prop({ reflect: true }) label = '';\n\n /**\n * The name of an icon to be displayed in the tab.\n */\n @Prop({ reflect: true }) icon?: string;\n\n /**\n * Hide the actual button content and only display the tab.\n */\n @Prop({ reflect: true }) iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop({ reflect: true }) iconRight = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop({ reflect: true }) url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop({ reflect: true }) urlTarget?: '_blank' | '_self';\n\n /**\n * Specifies that the tab should be deactivated.\n */\n @Prop({ reflect: true }) deactivated = false;\n\n /**\n * Specifies that the tab content pane contains an error. This will color\n * the tab in an error state and also switch to an error icon if an icon\n * is specified.\n */\n @Prop({ reflect: true }) error = false;\n\n /**\n * Attributes that will be added to the native HTML button element\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when tab is clicked.\n */\n @Event() catClick!: EventEmitter<MouseEvent>;\n\n connectedCallback() {\n if (!this.hostElement.id) {\n this.hostElement.id = `cat-tab-${nextUniqueId++}`;\n }\n }\n\n @Listen('click')\n onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"],"version":3}
|
|
@@ -2,8 +2,8 @@ import type { Components, JSX } from "../types/components";
|
|
|
2
2
|
|
|
3
3
|
interface CatTabs extends Components.CatTabs, HTMLElement {}
|
|
4
4
|
export const CatTabs: {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
prototype: CatTabs;
|
|
6
|
+
new (): CatTabs;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Used to define this component and all nested components recursively.
|
|
@@ -3,125 +3,132 @@ import { d as defineCustomElement$4 } from './cat-button2.js';
|
|
|
3
3
|
import { d as defineCustomElement$3 } from './cat-icon2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './cat-spinner2.js';
|
|
5
5
|
|
|
6
|
-
const catTabsCss = ":host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color, 235, 236, 240))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab:first-of-type{margin-left:-0.75rem}.cat-tab:last-of-type{margin-right:-0.75rem}.cat-tab::after{opacity:0;content:\"\";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-active::after{opacity:1}";
|
|
6
|
+
const catTabsCss = ":host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color, 235, 236, 240))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab:first-of-type{margin-left:-0.75rem}.cat-tab:last-of-type{margin-right:-0.75rem}.cat-tab::after{opacity:0;content:\"\";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-error{color:rgb(var(--cat-danger-text-active, 174, 42, 10))}.cat-tab.cat-tab-active::after{opacity:1}";
|
|
7
7
|
|
|
8
8
|
const CatTabs$1 = /*@__PURE__*/ proxyCustomElement(class CatTabs extends HTMLElement {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
componentWillLoad() {
|
|
19
|
-
this.syncTabs();
|
|
20
|
-
}
|
|
21
|
-
componentDidLoad() {
|
|
22
|
-
this.mutationObserver = new MutationObserver(mutations => mutations.some(value => value.target.nodeName === 'CAT-TAB') && this.syncTabs());
|
|
23
|
-
this.mutationObserver?.observe(this.hostElement, {
|
|
24
|
-
childList: true,
|
|
25
|
-
attributes: true,
|
|
26
|
-
subtree: true
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
disconnectedCallback() {
|
|
30
|
-
this.mutationObserver?.disconnect();
|
|
31
|
-
}
|
|
32
|
-
onActiveTabChange(id) {
|
|
33
|
-
const index = this.tabs.findIndex(tab => tab.id === id);
|
|
34
|
-
this.catChange.emit({ id, index });
|
|
35
|
-
}
|
|
36
|
-
onKeydown(event) {
|
|
37
|
-
if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key)) {
|
|
38
|
-
const elements = this.hostElement.shadowRoot?.querySelectorAll('cat-button[role="tab"]');
|
|
39
|
-
const targetElements = Array.from(elements ?? []).filter(button => !button.disabled);
|
|
40
|
-
const activeElement = this.hostElement.shadowRoot?.activeElement;
|
|
41
|
-
const activeIdx = activeElement ? targetElements.indexOf(activeElement) : -1;
|
|
42
|
-
const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;
|
|
43
|
-
const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;
|
|
44
|
-
targetElements[targetIdx].doFocus();
|
|
45
|
-
event.preventDefault();
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.catChange = createEvent(this, "catChange", 7);
|
|
14
|
+
this.tabs = [];
|
|
15
|
+
this.activeTab = '';
|
|
16
|
+
this.tabsAlign = 'left';
|
|
46
17
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* Activates the tab with the given id.
|
|
50
|
-
*
|
|
51
|
-
* @param id The tab id.
|
|
52
|
-
*/
|
|
53
|
-
async setActive(id) {
|
|
54
|
-
this.activate(this.tabs.find(tab => tab.id === id));
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Activates the tab with the given index.
|
|
58
|
-
*
|
|
59
|
-
* @param index The tab index.
|
|
60
|
-
*/
|
|
61
|
-
async setActiveIndex(index) {
|
|
62
|
-
this.activate(this.tabs[index]);
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
return (h(Host, null, this.tabs.map((tab) => {
|
|
66
|
-
return (h("cat-button", { buttonId: tab.id, role: "tab", part: "tab", class: {
|
|
67
|
-
'cat-tab': true,
|
|
68
|
-
'cat-tab-active': tab.id === this.activeTab
|
|
69
|
-
}, active: tab.id === this.activeTab, color: tab.id === this.activeTab ? 'primary' : 'secondary', variant: "text", icon: tab.icon, iconOnly: tab.iconOnly, iconRight: tab.iconRight, url: tab.url, disabled: tab.deactivated, urlTarget: tab.urlTarget, onCatClick: () => this.activate(tab), nativeAttributes: { ...tab.nativeAttributes }, nativeContentAttributes: { 'data-text': tab.label }, "data-dropdown-no-close": true }, tab.label));
|
|
70
|
-
})));
|
|
71
|
-
}
|
|
72
|
-
syncTabs() {
|
|
73
|
-
this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));
|
|
74
|
-
this.activeTab = this.activeTab || this.tabs.filter(tab => this.canActivate(tab))[0]?.id;
|
|
75
|
-
}
|
|
76
|
-
canActivate(tab) {
|
|
77
|
-
return !!tab && !tab.deactivated && !tab.url && tab.id !== this.activeTab;
|
|
78
|
-
}
|
|
79
|
-
activate(tab) {
|
|
80
|
-
if (this.canActivate(tab)) {
|
|
81
|
-
this.activeTab = tab.id;
|
|
18
|
+
componentWillLoad() {
|
|
19
|
+
this.syncTabs();
|
|
82
20
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
this.mutationObserver = new MutationObserver(mutations => mutations.some(value => value.target.nodeName === 'CAT-TAB') && this.syncTabs());
|
|
23
|
+
this.mutationObserver?.observe(this.hostElement, {
|
|
24
|
+
childList: true,
|
|
25
|
+
attributes: true,
|
|
26
|
+
subtree: true
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
this.mutationObserver?.disconnect();
|
|
31
|
+
}
|
|
32
|
+
onActiveTabChange(id) {
|
|
33
|
+
const index = this.tabs.findIndex(tab => tab.id === id);
|
|
34
|
+
this.catChange.emit({ id, index });
|
|
35
|
+
}
|
|
36
|
+
onKeydown(event) {
|
|
37
|
+
if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key)) {
|
|
38
|
+
const elements = this.hostElement.shadowRoot?.querySelectorAll('cat-button[role="tab"]');
|
|
39
|
+
const targetElements = Array.from(elements ?? []).filter(button => !button.disabled);
|
|
40
|
+
const activeElement = this.hostElement.shadowRoot?.activeElement;
|
|
41
|
+
const activeIdx = activeElement ? targetElements.indexOf(activeElement) : -1;
|
|
42
|
+
const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;
|
|
43
|
+
const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;
|
|
44
|
+
targetElements[targetIdx].doFocus();
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Activates the tab with the given id.
|
|
50
|
+
*
|
|
51
|
+
* @param id The tab id.
|
|
52
|
+
*/
|
|
53
|
+
async setActive(id) {
|
|
54
|
+
this.activate(this.tabs.find(tab => tab.id === id));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Activates the tab with the given index.
|
|
58
|
+
*
|
|
59
|
+
* @param index The tab index.
|
|
60
|
+
*/
|
|
61
|
+
async setActiveIndex(index) {
|
|
62
|
+
this.activate(this.tabs[index]);
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return (h(Host, null, this.tabs.map((tab) => {
|
|
66
|
+
return (h("cat-button", { buttonId: tab.id, role: "tab", part: "tab", class: {
|
|
67
|
+
'cat-tab': true,
|
|
68
|
+
'cat-tab-active': tab.id === this.activeTab,
|
|
69
|
+
'cat-tab-error': tab.error
|
|
70
|
+
}, active: tab.id === this.activeTab, color: tab.error ? 'danger' : tab.id === this.activeTab ? 'primary' : 'secondary', variant: "text", icon: tab.icon ? (tab.error ? '$cat:input-error' : tab.icon) : undefined, iconOnly: tab.iconOnly, iconRight: tab.iconRight, url: tab.url, disabled: tab.deactivated, urlTarget: tab.urlTarget, onCatClick: () => this.click(tab), nativeAttributes: { ...tab.nativeAttributes }, nativeContentAttributes: { 'data-text': tab.label }, "data-dropdown-no-close": true }, tab.label));
|
|
71
|
+
})));
|
|
72
|
+
}
|
|
73
|
+
syncTabs() {
|
|
74
|
+
this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));
|
|
75
|
+
this.activeTab = this.activeTab || this.tabs.filter(tab => this.canActivate(tab))[0]?.id;
|
|
76
|
+
}
|
|
77
|
+
canActivate(tab) {
|
|
78
|
+
return !!tab && !tab.deactivated && !tab.url && tab.id !== this.activeTab;
|
|
79
|
+
}
|
|
80
|
+
click(tab) {
|
|
81
|
+
if (this.canActivate(tab)) {
|
|
82
|
+
tab.click();
|
|
83
|
+
this.activate(tab);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
activate(tab) {
|
|
87
|
+
if (this.canActivate(tab)) {
|
|
88
|
+
this.activeTab = tab.id;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
get hostElement() { return this; }
|
|
92
|
+
static get watchers() { return {
|
|
93
|
+
"activeTab": ["onActiveTabChange"]
|
|
94
|
+
}; }
|
|
95
|
+
static get style() { return catTabsCss; }
|
|
89
96
|
}, [1, "cat-tabs", {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
"activeTab": [1537, "active-tab"],
|
|
98
|
+
"tabsAlign": [1, "tabs-align"],
|
|
99
|
+
"tabs": [32],
|
|
100
|
+
"setActive": [64],
|
|
101
|
+
"setActiveIndex": [64]
|
|
102
|
+
}, [[0, "keydown", "onKeydown"]], {
|
|
103
|
+
"activeTab": ["onActiveTabChange"]
|
|
104
|
+
}]);
|
|
98
105
|
function defineCustomElement$1() {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
106
|
+
if (typeof customElements === "undefined") {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const components = ["cat-tabs", "cat-button", "cat-icon", "cat-spinner"];
|
|
110
|
+
components.forEach(tagName => { switch (tagName) {
|
|
111
|
+
case "cat-tabs":
|
|
112
|
+
if (!customElements.get(tagName)) {
|
|
113
|
+
customElements.define(tagName, CatTabs$1);
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
case "cat-button":
|
|
117
|
+
if (!customElements.get(tagName)) {
|
|
118
|
+
defineCustomElement$4();
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
case "cat-icon":
|
|
122
|
+
if (!customElements.get(tagName)) {
|
|
123
|
+
defineCustomElement$3();
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
case "cat-spinner":
|
|
127
|
+
if (!customElements.get(tagName)) {
|
|
128
|
+
defineCustomElement$2();
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
} });
|
|
125
132
|
}
|
|
126
133
|
|
|
127
134
|
const CatTabs = CatTabs$1;
|