@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { newE2EPage } from "@stencil/core/testing";
|
|
2
2
|
describe('cat-avatar', () => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<cat-avatar label="Avatar"></cat-avatar>');
|
|
6
|
+
const element = await page.find('cat-avatar');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=cat-avatar.e2e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-avatar.e2e.js","sourceRoot":"","sources":["../../../src/components/cat-avatar/cat-avatar.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"cat-avatar.e2e.js","sourceRoot":"","sources":["../../../src/components/cat-avatar/cat-avatar.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,0CAA0C,CAAC,CAAC;QAElE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('cat-avatar', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cat-avatar label=\"Avatar\"></cat-avatar>');\n\n const element = await page.find('cat-avatar');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
|
@@ -5,228 +5,228 @@ import loadImg from "../../utils/load-img";
|
|
|
5
5
|
* Avatars are used to represent a person or object.
|
|
6
6
|
*/
|
|
7
7
|
export class CatAvatar {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
onSrcChanged(value) {
|
|
20
|
-
if (value) {
|
|
21
|
-
loadImg(value).then(() => (this.backgroundImage = `url(${value})`), () => (this.backgroundImage = undefined));
|
|
8
|
+
constructor() {
|
|
9
|
+
this.backgroundImage = undefined;
|
|
10
|
+
this.size = 'm';
|
|
11
|
+
this.round = false;
|
|
12
|
+
this.label = '';
|
|
13
|
+
this.initials = undefined;
|
|
14
|
+
this.src = undefined;
|
|
15
|
+
this.icon = undefined;
|
|
16
|
+
this.url = undefined;
|
|
17
|
+
this.urlTarget = undefined;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
onSrcChanged(value) {
|
|
20
|
+
if (value) {
|
|
21
|
+
loadImg(value).then(() => (this.backgroundImage = `url(${value})`), () => (this.backgroundImage = undefined));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this.backgroundImage = undefined;
|
|
25
|
+
}
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.onSrcChanged(this.src);
|
|
29
|
-
}
|
|
30
|
-
componentWillRender() {
|
|
31
|
-
if (!this.label) {
|
|
32
|
-
log.warn('[A11y] Missing ARIA label on avatar', this);
|
|
27
|
+
componentWillLoad() {
|
|
28
|
+
this.onSrcChanged(this.src);
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
componentWillRender() {
|
|
31
|
+
if (!this.label) {
|
|
32
|
+
log.warn('[A11y] Missing ARIA label on avatar', this);
|
|
33
|
+
}
|
|
38
34
|
}
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
render() {
|
|
36
|
+
if (this.url) {
|
|
37
|
+
return (h("a", { href: this.url, target: this.urlTarget, style: this.cssStyle, class: this.cssClass, "aria-label": this.label }, this.content));
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return (h("span", { style: this.cssStyle, class: this.cssClass, "aria-label": this.label }, this.content));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
get content() {
|
|
44
|
+
return !this.backgroundImage
|
|
45
|
+
? [this.icon ? h("cat-icon", { icon: this.icon, size: this.size }) : this.getInitials()]
|
|
46
|
+
: [];
|
|
47
|
+
}
|
|
48
|
+
get cssStyle() {
|
|
49
|
+
return { 'background-image': this.backgroundImage };
|
|
50
|
+
}
|
|
51
|
+
get cssClass() {
|
|
52
|
+
return {
|
|
53
|
+
avatar: true,
|
|
54
|
+
'avatar-round': this.round,
|
|
55
|
+
[`avatar-${this.size}`]: Boolean(this.size)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
getInitials() {
|
|
59
|
+
return (this.initials ??
|
|
60
|
+
(this.label ?? '')
|
|
61
|
+
.split(' ')
|
|
62
|
+
.map(n => n[0])
|
|
63
|
+
.join(''));
|
|
64
|
+
}
|
|
65
|
+
static get is() { return "cat-avatar"; }
|
|
66
|
+
static get encapsulation() { return "shadow"; }
|
|
67
|
+
static get originalStyleUrls() {
|
|
68
|
+
return {
|
|
69
|
+
"$": ["cat-avatar.scss"]
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
static get styleUrls() {
|
|
73
|
+
return {
|
|
74
|
+
"$": ["cat-avatar.css"]
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
static get properties() {
|
|
78
|
+
return {
|
|
79
|
+
"size": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"mutable": false,
|
|
82
|
+
"complexType": {
|
|
83
|
+
"original": "'xs' | 's' | 'm' | 'l' | 'xl'",
|
|
84
|
+
"resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
|
|
85
|
+
"references": {}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": false,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": "The size of the avatar."
|
|
92
|
+
},
|
|
93
|
+
"attribute": "size",
|
|
94
|
+
"reflect": false,
|
|
95
|
+
"defaultValue": "'m'"
|
|
96
|
+
},
|
|
97
|
+
"round": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "boolean",
|
|
102
|
+
"resolved": "boolean",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": "Use round avatar edges."
|
|
110
|
+
},
|
|
111
|
+
"attribute": "round",
|
|
112
|
+
"reflect": false,
|
|
113
|
+
"defaultValue": "false"
|
|
114
|
+
},
|
|
115
|
+
"label": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"mutable": false,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "string",
|
|
120
|
+
"resolved": "string",
|
|
121
|
+
"references": {}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": "The label of the avatar."
|
|
128
|
+
},
|
|
129
|
+
"attribute": "label",
|
|
130
|
+
"reflect": false,
|
|
131
|
+
"defaultValue": "''"
|
|
132
|
+
},
|
|
133
|
+
"initials": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "string",
|
|
138
|
+
"resolved": "string | undefined",
|
|
139
|
+
"references": {}
|
|
140
|
+
},
|
|
141
|
+
"required": false,
|
|
142
|
+
"optional": true,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": "Custom initials for the avatar."
|
|
146
|
+
},
|
|
147
|
+
"attribute": "initials",
|
|
148
|
+
"reflect": false
|
|
149
|
+
},
|
|
150
|
+
"src": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "string",
|
|
155
|
+
"resolved": "string | undefined",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": true,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "An optional avatar image."
|
|
163
|
+
},
|
|
164
|
+
"attribute": "src",
|
|
165
|
+
"reflect": false
|
|
166
|
+
},
|
|
167
|
+
"icon": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "string",
|
|
172
|
+
"resolved": "string | undefined",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": true,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": "An icon to be used instead of the initials."
|
|
180
|
+
},
|
|
181
|
+
"attribute": "icon",
|
|
182
|
+
"reflect": false
|
|
183
|
+
},
|
|
184
|
+
"url": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "string",
|
|
189
|
+
"resolved": "string | undefined",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": true,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": "A destination to link to, rendered in the href attribute of a link."
|
|
197
|
+
},
|
|
198
|
+
"attribute": "url",
|
|
199
|
+
"reflect": false
|
|
200
|
+
},
|
|
201
|
+
"urlTarget": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"mutable": false,
|
|
204
|
+
"complexType": {
|
|
205
|
+
"original": "'_blank' | '_self'",
|
|
206
|
+
"resolved": "\"_blank\" | \"_self\" | undefined",
|
|
207
|
+
"references": {}
|
|
208
|
+
},
|
|
209
|
+
"required": false,
|
|
210
|
+
"optional": true,
|
|
211
|
+
"docs": {
|
|
212
|
+
"tags": [],
|
|
213
|
+
"text": "Specifies where to open the linked document."
|
|
214
|
+
},
|
|
215
|
+
"attribute": "url-target",
|
|
216
|
+
"reflect": false
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
static get states() {
|
|
221
|
+
return {
|
|
222
|
+
"backgroundImage": {}
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
static get watchers() {
|
|
226
|
+
return [{
|
|
227
|
+
"propName": "src",
|
|
228
|
+
"methodName": "onSrcChanged"
|
|
229
|
+
}];
|
|
41
230
|
}
|
|
42
|
-
}
|
|
43
|
-
get content() {
|
|
44
|
-
return !this.backgroundImage
|
|
45
|
-
? [this.icon ? h("cat-icon", { icon: this.icon, size: this.size }) : this.getInitials()]
|
|
46
|
-
: [];
|
|
47
|
-
}
|
|
48
|
-
get cssStyle() {
|
|
49
|
-
return { 'background-image': this.backgroundImage };
|
|
50
|
-
}
|
|
51
|
-
get cssClass() {
|
|
52
|
-
return {
|
|
53
|
-
avatar: true,
|
|
54
|
-
'avatar-round': this.round,
|
|
55
|
-
[`avatar-${this.size}`]: Boolean(this.size)
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
getInitials() {
|
|
59
|
-
return (this.initials ??
|
|
60
|
-
(this.label ?? '')
|
|
61
|
-
.split(' ')
|
|
62
|
-
.map(n => n[0])
|
|
63
|
-
.join(''));
|
|
64
|
-
}
|
|
65
|
-
static get is() { return "cat-avatar"; }
|
|
66
|
-
static get encapsulation() { return "shadow"; }
|
|
67
|
-
static get originalStyleUrls() {
|
|
68
|
-
return {
|
|
69
|
-
"$": ["cat-avatar.scss"]
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
static get styleUrls() {
|
|
73
|
-
return {
|
|
74
|
-
"$": ["cat-avatar.css"]
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
static get properties() {
|
|
78
|
-
return {
|
|
79
|
-
"size": {
|
|
80
|
-
"type": "string",
|
|
81
|
-
"mutable": false,
|
|
82
|
-
"complexType": {
|
|
83
|
-
"original": "'xs' | 's' | 'm' | 'l' | 'xl'",
|
|
84
|
-
"resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
|
|
85
|
-
"references": {}
|
|
86
|
-
},
|
|
87
|
-
"required": false,
|
|
88
|
-
"optional": false,
|
|
89
|
-
"docs": {
|
|
90
|
-
"tags": [],
|
|
91
|
-
"text": "The size of the avatar."
|
|
92
|
-
},
|
|
93
|
-
"attribute": "size",
|
|
94
|
-
"reflect": false,
|
|
95
|
-
"defaultValue": "'m'"
|
|
96
|
-
},
|
|
97
|
-
"round": {
|
|
98
|
-
"type": "boolean",
|
|
99
|
-
"mutable": false,
|
|
100
|
-
"complexType": {
|
|
101
|
-
"original": "boolean",
|
|
102
|
-
"resolved": "boolean",
|
|
103
|
-
"references": {}
|
|
104
|
-
},
|
|
105
|
-
"required": false,
|
|
106
|
-
"optional": false,
|
|
107
|
-
"docs": {
|
|
108
|
-
"tags": [],
|
|
109
|
-
"text": "Use round avatar edges."
|
|
110
|
-
},
|
|
111
|
-
"attribute": "round",
|
|
112
|
-
"reflect": false,
|
|
113
|
-
"defaultValue": "false"
|
|
114
|
-
},
|
|
115
|
-
"label": {
|
|
116
|
-
"type": "string",
|
|
117
|
-
"mutable": false,
|
|
118
|
-
"complexType": {
|
|
119
|
-
"original": "string",
|
|
120
|
-
"resolved": "string",
|
|
121
|
-
"references": {}
|
|
122
|
-
},
|
|
123
|
-
"required": false,
|
|
124
|
-
"optional": false,
|
|
125
|
-
"docs": {
|
|
126
|
-
"tags": [],
|
|
127
|
-
"text": "The label of the avatar."
|
|
128
|
-
},
|
|
129
|
-
"attribute": "label",
|
|
130
|
-
"reflect": false,
|
|
131
|
-
"defaultValue": "''"
|
|
132
|
-
},
|
|
133
|
-
"initials": {
|
|
134
|
-
"type": "string",
|
|
135
|
-
"mutable": false,
|
|
136
|
-
"complexType": {
|
|
137
|
-
"original": "string",
|
|
138
|
-
"resolved": "string | undefined",
|
|
139
|
-
"references": {}
|
|
140
|
-
},
|
|
141
|
-
"required": false,
|
|
142
|
-
"optional": true,
|
|
143
|
-
"docs": {
|
|
144
|
-
"tags": [],
|
|
145
|
-
"text": "Custom initials for the avatar."
|
|
146
|
-
},
|
|
147
|
-
"attribute": "initials",
|
|
148
|
-
"reflect": false
|
|
149
|
-
},
|
|
150
|
-
"src": {
|
|
151
|
-
"type": "string",
|
|
152
|
-
"mutable": false,
|
|
153
|
-
"complexType": {
|
|
154
|
-
"original": "string",
|
|
155
|
-
"resolved": "string | undefined",
|
|
156
|
-
"references": {}
|
|
157
|
-
},
|
|
158
|
-
"required": false,
|
|
159
|
-
"optional": true,
|
|
160
|
-
"docs": {
|
|
161
|
-
"tags": [],
|
|
162
|
-
"text": "An optional avatar image."
|
|
163
|
-
},
|
|
164
|
-
"attribute": "src",
|
|
165
|
-
"reflect": false
|
|
166
|
-
},
|
|
167
|
-
"icon": {
|
|
168
|
-
"type": "string",
|
|
169
|
-
"mutable": false,
|
|
170
|
-
"complexType": {
|
|
171
|
-
"original": "string",
|
|
172
|
-
"resolved": "string | undefined",
|
|
173
|
-
"references": {}
|
|
174
|
-
},
|
|
175
|
-
"required": false,
|
|
176
|
-
"optional": true,
|
|
177
|
-
"docs": {
|
|
178
|
-
"tags": [],
|
|
179
|
-
"text": "An icon to be used instead of the initials."
|
|
180
|
-
},
|
|
181
|
-
"attribute": "icon",
|
|
182
|
-
"reflect": false
|
|
183
|
-
},
|
|
184
|
-
"url": {
|
|
185
|
-
"type": "string",
|
|
186
|
-
"mutable": false,
|
|
187
|
-
"complexType": {
|
|
188
|
-
"original": "string",
|
|
189
|
-
"resolved": "string | undefined",
|
|
190
|
-
"references": {}
|
|
191
|
-
},
|
|
192
|
-
"required": false,
|
|
193
|
-
"optional": true,
|
|
194
|
-
"docs": {
|
|
195
|
-
"tags": [],
|
|
196
|
-
"text": "A destination to link to, rendered in the href attribute of a link."
|
|
197
|
-
},
|
|
198
|
-
"attribute": "url",
|
|
199
|
-
"reflect": false
|
|
200
|
-
},
|
|
201
|
-
"urlTarget": {
|
|
202
|
-
"type": "string",
|
|
203
|
-
"mutable": false,
|
|
204
|
-
"complexType": {
|
|
205
|
-
"original": "'_blank' | '_self'",
|
|
206
|
-
"resolved": "\"_blank\" | \"_self\" | undefined",
|
|
207
|
-
"references": {}
|
|
208
|
-
},
|
|
209
|
-
"required": false,
|
|
210
|
-
"optional": true,
|
|
211
|
-
"docs": {
|
|
212
|
-
"tags": [],
|
|
213
|
-
"text": "Specifies where to open the linked document."
|
|
214
|
-
},
|
|
215
|
-
"attribute": "url-target",
|
|
216
|
-
"reflect": false
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
static get states() {
|
|
221
|
-
return {
|
|
222
|
-
"backgroundImage": {}
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
static get watchers() {
|
|
226
|
-
return [{
|
|
227
|
-
"propName": "src",
|
|
228
|
-
"methodName": "onSrcChanged"
|
|
229
|
-
}];
|
|
230
|
-
}
|
|
231
231
|
}
|
|
232
232
|
//# sourceMappingURL=cat-avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-avatar.js","sourceRoot":"","sources":["../../../src/components/cat-avatar/cat-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAE3C;;GAEG;AAMH,MAAM,OAAO,SAAS;;;
|
|
1
|
+
{"version":3,"file":"cat-avatar.js","sourceRoot":"","sources":["../../../src/components/cat-avatar/cat-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAE3C;;GAEG;AAMH,MAAM,OAAO,SAAS;;;oBAM0B,GAAG;qBAKjC,KAAK;qBAKL,EAAE;;;;;;;IA4BlB,YAAY,CAAC,KAAc;QACzB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CACjB,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,OAAO,KAAK,GAAG,CAAC,EAC9C,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,CACzC,CAAC;SACH;aAAM;YACL,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;SAClC;IACH,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,mBAAmB;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,GAAG,CAAC,IAAI,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC;SACvD;IACH,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,OAAO,CACL,SAAG,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,IAC1G,IAAI,CAAC,OAAO,CACX,CACL,CAAC;SACH;aAAM;YACL,OAAO,CACL,YAAM,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,IACrE,IAAI,CAAC,OAAO,CACR,CACR,CAAC;SACH;IACH,CAAC;IAED,IAAY,OAAO;QACjB,OAAO,CAAC,IAAI,CAAC,eAAe;YAC1B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAa,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YAC5F,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;IAED,IAAY,QAAQ;QAClB,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;IACtD,CAAC;IAED,IAAY,QAAQ;QAClB,OAAO;YACL,MAAM,EAAE,IAAI;YACZ,cAAc,EAAE,IAAI,CAAC,KAAK;YAC1B,CAAC,UAAU,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;SAC5C,CAAC;IACJ,CAAC;IAEO,WAAW;QACjB,OAAO,CACL,IAAI,CAAC,QAAQ;YACb,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;iBACf,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBACd,IAAI,CAAC,EAAE,CAAC,CACZ,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport loadImg from '../../utils/load-img';\n\n/**\n * Avatars are used to represent a person or object.\n */\n@Component({\n tag: 'cat-avatar',\n styleUrl: 'cat-avatar.scss',\n shadow: true\n})\nexport class CatAvatar {\n @State() backgroundImage?: string;\n\n /**\n * The size of the avatar.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round avatar edges.\n */\n @Prop() round = false;\n\n /**\n * The label of the avatar.\n */\n @Prop() label = '';\n\n /**\n * Custom initials for the avatar.\n */\n @Prop() initials?: string;\n\n /**\n * An optional avatar image.\n */\n @Prop() src?: string;\n\n /**\n * An icon to be used instead of the initials.\n */\n @Prop() icon?: string;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n @Watch('src')\n onSrcChanged(value?: string): void {\n if (value) {\n loadImg(value).then(\n () => (this.backgroundImage = `url(${value})`),\n () => (this.backgroundImage = undefined)\n );\n } else {\n this.backgroundImage = undefined;\n }\n }\n\n componentWillLoad(): void {\n this.onSrcChanged(this.src);\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.warn('[A11y] Missing ARIA label on avatar', this);\n }\n }\n\n render() {\n if (this.url) {\n return (\n <a href={this.url} target={this.urlTarget} style={this.cssStyle} class={this.cssClass} aria-label={this.label}>\n {this.content}\n </a>\n );\n } else {\n return (\n <span style={this.cssStyle} class={this.cssClass} aria-label={this.label}>\n {this.content}\n </span>\n );\n }\n }\n\n private get content() {\n return !this.backgroundImage\n ? [this.icon ? <cat-icon icon={this.icon} size={this.size}></cat-icon> : this.getInitials()]\n : [];\n }\n\n private get cssStyle() {\n return { 'background-image': this.backgroundImage };\n }\n\n private get cssClass() {\n return {\n avatar: true,\n 'avatar-round': this.round,\n [`avatar-${this.size}`]: Boolean(this.size)\n };\n }\n\n private getInitials(): string {\n return (\n this.initials ??\n (this.label ?? '')\n .split(' ')\n .map(n => n[0])\n .join('')\n );\n }\n}\n"]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
2
|
import { CatAvatar } from "./cat-avatar";
|
|
3
3
|
describe('cat-avatar', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [CatAvatar],
|
|
7
|
+
html: `<cat-avatar label="My Avatar"></cat-avatar>`
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toEqualHtml(`
|
|
10
10
|
<cat-avatar label="My Avatar">
|
|
11
11
|
<mock:shadow-root>
|
|
12
12
|
<span aria-label="My Avatar" class="avatar avatar-m">MA</span>
|
|
13
13
|
</mock:shadow-root>
|
|
14
14
|
</cat-avatar>
|
|
15
15
|
`);
|
|
16
|
-
|
|
16
|
+
});
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=cat-avatar.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-avatar.spec.js","sourceRoot":"","sources":["../../../src/components/cat-avatar/cat-avatar.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"cat-avatar.spec.js","sourceRoot":"","sources":["../../../src/components/cat-avatar/cat-avatar.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE,6CAA6C;SACpD,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAM7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { CatAvatar } from './cat-avatar';\n\ndescribe('cat-avatar', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CatAvatar],\n html: `<cat-avatar label=\"My Avatar\"></cat-avatar>`\n });\n expect(page.root).toEqualHtml(`\n <cat-avatar label=\"My Avatar\">\n <mock:shadow-root>\n <span aria-label=\"My Avatar\" class=\"avatar avatar-m\">MA</span>\n </mock:shadow-root>\n </cat-avatar>\n `);\n });\n});\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { newE2EPage } from "@stencil/core/testing";
|
|
2
2
|
describe('cat-badge', () => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<cat-badge></cat-badge>');
|
|
6
|
+
const element = await page.find('cat-badge');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=cat-badge.e2e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-badge.e2e.js","sourceRoot":"","sources":["../../../src/components/cat-badge/cat-badge.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"cat-badge.e2e.js","sourceRoot":"","sources":["../../../src/components/cat-badge/cat-badge.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;QAEjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('cat-badge', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cat-badge></cat-badge>');\n\n const element = await page.find('cat-badge');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|