@haiilo/catalyst 0.5.6 → 0.5.7
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/assets/fonts/AzeretMono-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Bold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Italic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Medium.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Black.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Black.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Hairline.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Hairline.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Heavy.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Heavy.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Light.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Light.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-LightItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-LightItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Medium.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Medium.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Semibold.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Semibold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Thin.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Thin.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff2 +0 -0
- package/dist/catalyst/catalyst.css +1 -0
- package/dist/catalyst/catalyst.esm.js +2 -0
- package/dist/catalyst/catalyst.esm.js.map +1 -0
- package/dist/catalyst/index.cdn.js +21 -0
- package/dist/catalyst/index.esm.js +2 -0
- package/dist/catalyst/index.esm.js.map +1 -0
- package/dist/catalyst/p-9a3c2375.js +2 -0
- package/dist/catalyst/p-9a3c2375.js.map +1 -0
- package/dist/catalyst/p-a6b8ebe9.entry.js +10 -0
- package/dist/catalyst/p-a6b8ebe9.entry.js.map +1 -0
- package/dist/catalyst/p-bfc656ca.js +2 -0
- package/dist/catalyst/p-bfc656ca.js.map +1 -0
- package/dist/catalyst/p-e82b63e9.js +2 -0
- package/dist/catalyst/p-e82b63e9.js.map +1 -0
- package/dist/cjs/app-globals-2a30d681.js +256 -0
- package/dist/cjs/app-globals-2a30d681.js.map +1 -0
- package/dist/cjs/cat-alert_15.cjs.entry.js +4651 -0
- package/dist/cjs/cat-alert_15.cjs.entry.js.map +1 -0
- package/dist/cjs/cat-icon-registry-b3a95a6b.js +442 -0
- package/dist/cjs/cat-icon-registry-b3a95a6b.js.map +1 -0
- package/dist/cjs/catalyst.cjs.js +24 -0
- package/dist/cjs/catalyst.cjs.js.map +1 -0
- package/dist/cjs/index-5d72f0e4.js +1347 -0
- package/dist/cjs/index-5d72f0e4.js.map +1 -0
- package/dist/cjs/index.cjs.js +12 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +26 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/assets/fonts/AzeretMono-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Bold.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Italic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Medium.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Black.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Black.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-BlackItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-BlackItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Hairline.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Hairline.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-HairlineItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Heavy.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Heavy.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-HeavyItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Light.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Light.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-LightItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-LightItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Medium.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Medium.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-MediumItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-MediumItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Semibold.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Semibold.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Thin.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Thin.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-ThinItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-ThinItalic.woff2 +0 -0
- package/dist/collection/collection-manifest.json +27 -0
- package/dist/collection/components/cat-alert/cat-alert.css +61 -0
- package/dist/collection/components/cat-alert/cat-alert.js +61 -0
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -0
- package/dist/collection/components/cat-badge/cat-badge.css +154 -0
- package/dist/collection/components/cat-badge/cat-badge.js +143 -0
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -0
- package/dist/collection/components/cat-button/cat-button.css +333 -0
- package/dist/collection/components/cat-button/cat-button.js +615 -0
- package/dist/collection/components/cat-button/cat-button.js.map +1 -0
- package/dist/collection/components/cat-card/cat-card.css +24 -0
- package/dist/collection/components/cat-card/cat-card.js +20 -0
- package/dist/collection/components/cat-card/cat-card.js.map +1 -0
- package/dist/collection/components/cat-checkbox/cat-checkbox.css +105 -0
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +314 -0
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -0
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js +70 -0
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js +55 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon.css +50 -0
- package/dist/collection/components/cat-icon/cat-icon.js +91 -0
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -0
- package/dist/collection/components/cat-input/cat-input.css +131 -0
- package/dist/collection/components/cat-input/cat-input.js +606 -0
- package/dist/collection/components/cat-input/cat-input.js.map +1 -0
- package/dist/collection/components/cat-menu/cat-menu.css +34 -0
- package/dist/collection/components/cat-menu/cat-menu.js +184 -0
- package/dist/collection/components/cat-menu/cat-menu.js.map +1 -0
- package/dist/collection/components/cat-radio/cat-radio.css +84 -0
- package/dist/collection/components/cat-radio/cat-radio.js +283 -0
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.css +69 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +311 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.css +177 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +131 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -0
- package/dist/collection/components/cat-spinner/cat-spinner.css +63 -0
- package/dist/collection/components/cat-spinner/cat-spinner.js +65 -0
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -0
- package/dist/collection/components/cat-textarea/cat-textarea.css +72 -0
- package/dist/collection/components/cat-textarea/cat-textarea.js +393 -0
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -0
- package/dist/collection/components/cat-toggle/cat-toggle.css +93 -0
- package/dist/collection/components/cat-toggle/cat-toggle.js +283 -0
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.css +41 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +254 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -0
- package/dist/collection/index.cdn.js +21 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/init.js +17 -0
- package/dist/collection/init.js.map +1 -0
- package/dist/collection/utils/breakpoints.js +12 -0
- package/dist/collection/utils/breakpoints.js.map +1 -0
- package/dist/collection/utils/first-tabbable.js +6 -0
- package/dist/collection/utils/first-tabbable.js.map +1 -0
- package/dist/collection/utils/is-touch-screen.js +3 -0
- package/dist/collection/utils/is-touch-screen.js.map +1 -0
- package/dist/collection/utils/media-matcher.js +55 -0
- package/dist/collection/utils/media-matcher.js.map +1 -0
- package/dist/collection/utils/platform.js +50 -0
- package/dist/collection/utils/platform.js.map +1 -0
- package/dist/components/cat-alert.d.ts +11 -0
- package/dist/components/cat-alert.js +53 -0
- package/dist/components/cat-alert.js.map +1 -0
- package/dist/components/cat-badge.d.ts +11 -0
- package/dist/components/cat-badge.js +68 -0
- package/dist/components/cat-badge.js.map +1 -0
- package/dist/components/cat-button.d.ts +11 -0
- package/dist/components/cat-button.js +8 -0
- package/dist/components/cat-button.js.map +1 -0
- package/dist/components/cat-button2.js +346 -0
- package/dist/components/cat-button2.js.map +1 -0
- package/dist/components/cat-card.d.ts +11 -0
- package/dist/components/cat-card.js +35 -0
- package/dist/components/cat-card.js.map +1 -0
- package/dist/components/cat-checkbox.d.ts +11 -0
- package/dist/components/cat-checkbox.js +103 -0
- package/dist/components/cat-checkbox.js.map +1 -0
- package/dist/components/cat-i18n-registry.js +74 -0
- package/dist/components/cat-i18n-registry.js.map +1 -0
- package/dist/components/cat-icon-registry.js +59 -0
- package/dist/components/cat-icon-registry.js.map +1 -0
- package/dist/components/cat-icon.d.ts +11 -0
- package/dist/components/cat-icon.js +8 -0
- package/dist/components/cat-icon.js.map +1 -0
- package/dist/components/cat-icon2.js +49 -0
- package/dist/components/cat-icon2.js.map +1 -0
- package/dist/components/cat-input.d.ts +11 -0
- package/dist/components/cat-input.js +172 -0
- package/dist/components/cat-input.js.map +1 -0
- package/dist/components/cat-menu.d.ts +11 -0
- package/dist/components/cat-menu.js +870 -0
- package/dist/components/cat-menu.js.map +1 -0
- package/dist/components/cat-radio.d.ts +11 -0
- package/dist/components/cat-radio.js +93 -0
- package/dist/components/cat-radio.js.map +1 -0
- package/dist/components/cat-scrollable.d.ts +11 -0
- package/dist/components/cat-scrollable.js +1362 -0
- package/dist/components/cat-scrollable.js.map +1 -0
- package/dist/components/cat-skeleton.d.ts +11 -0
- package/dist/components/cat-skeleton.js +78 -0
- package/dist/components/cat-skeleton.js.map +1 -0
- package/dist/components/cat-spinner.d.ts +11 -0
- package/dist/components/cat-spinner.js +8 -0
- package/dist/components/cat-spinner.js.map +1 -0
- package/dist/components/cat-spinner2.js +41 -0
- package/dist/components/cat-spinner2.js.map +1 -0
- package/dist/components/cat-textarea.d.ts +11 -0
- package/dist/components/cat-textarea.js +119 -0
- package/dist/components/cat-textarea.js.map +1 -0
- package/dist/components/cat-toggle.d.ts +11 -0
- package/dist/components/cat-toggle.js +93 -0
- package/dist/components/cat-toggle.js.map +1 -0
- package/dist/components/cat-tooltip.d.ts +11 -0
- package/dist/components/cat-tooltip.js +154 -0
- package/dist/components/cat-tooltip.js.map +1 -0
- package/dist/components/first-tabbable.js +1495 -0
- package/dist/components/first-tabbable.js.map +1 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +258 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/loglevel.js +315 -0
- package/dist/components/loglevel.js.map +1 -0
- package/dist/esm/app-globals-77cd8c8e.js +254 -0
- package/dist/esm/app-globals-77cd8c8e.js.map +1 -0
- package/dist/esm/cat-alert_15.entry.js +4633 -0
- package/dist/esm/cat-alert_15.entry.js.map +1 -0
- package/dist/esm/cat-icon-registry-a7acd6f7.js +438 -0
- package/dist/esm/cat-icon-registry-a7acd6f7.js.map +1 -0
- package/dist/esm/catalyst.js +22 -0
- package/dist/esm/catalyst.js.map +1 -0
- package/dist/esm/index-fd12be19.js +1320 -0
- package/dist/esm/index-fd12be19.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +22 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/cat-alert/cat-alert.d.ts +14 -0
- package/dist/types/components/cat-badge/cat-badge.d.ts +29 -0
- package/dist/types/components/cat-button/cat-button.d.ts +134 -0
- package/dist/types/components/cat-card/cat-card.d.ts +7 -0
- package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +69 -0
- package/dist/types/components/cat-i18n/cat-i18n-registry.d.ts +18 -0
- package/dist/types/components/cat-icon/cat-icon-registry.d.ts +15 -0
- package/dist/types/components/cat-icon/cat-icon.d.ts +23 -0
- package/dist/types/components/cat-input/cat-input.d.ts +130 -0
- package/dist/types/components/cat-menu/cat-menu.d.ts +31 -0
- package/dist/types/components/cat-radio/cat-radio.d.ts +63 -0
- package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +52 -0
- package/dist/types/components/cat-skeleton/cat-skeleton.d.ts +28 -0
- package/dist/types/components/cat-spinner/cat-spinner.d.ts +15 -0
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +85 -0
- package/dist/types/components/cat-toggle/cat-toggle.d.ts +64 -0
- package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +46 -0
- package/dist/types/components.d.ts +1167 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/init.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/breakpoints.d.ts +7 -0
- package/dist/types/utils/first-tabbable.d.ts +4 -0
- package/dist/types/utils/is-touch-screen.d.ts +2 -0
- package/dist/types/utils/media-matcher.d.ts +13 -0
- package/dist/types/utils/platform.d.ts +18 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cat-tooltip.js","sourceRoot":"","sources":["../../../src/components/cat-tooltip/cat-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAa,MAAM,kBAAkB,CAAC;AACxF,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,aAAa,MAAM,4BAA4B,CAAC;AAGvD,IAAI,YAAY,GAAG,CAAC,CAAC;AAOrB,MAAM,OAAO,UAAU;EALvB;IAOmB,OAAE,GAAG,eAAe,YAAY,EAAE,EAAE,CAAC;IAQtD;;OAEG;I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M,CAAC,UAAU,CAAC,GAAG,EAAE;;MACxC,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;MACtB,MAAA,IAAI,CAAC,OAAO,0CAAE,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;EACrB,CAAC;EAEO,YAAY;IAClB,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;;MACxC,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,EAAE,CAAC;MACrB,MAAA,IAAI,CAAC,OAAO,0CAAE,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;EACrB,CAAC;EAEO,kBAAkB;IACxB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;;MACzC,MAAA,IAAI,CAAC,OAAO,0CAAE,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;EAC7B,CAAC;EAEO,gBAAgB;;IACtB,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvC,MAAA,IAAI,CAAC,OAAO,0CAAE,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;EACjD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzIuB,iBAAM,GAAG,CAAE,CAAA","sourcesContent":["import { Component, h, Host, Listen, Prop } from '@stencil/core';\nimport { autoUpdate, computePosition, flip, offset, Placement } from '@floating-ui/dom';\nimport isTouchScreen from '../../utils/is-touch-screen';\nimport firstTabbable from '../../utils/first-tabbable';\nimport { FocusableElement } from 'tabbable';\n\nlet nextUniqueId = 0;\n\n@Component({\n tag: 'cat-tooltip',\n styleUrl: 'cat-tooltip.scss',\n shadow: true\n})\nexport class CatTooltip {\n private static readonly OFFSET = 4;\n private readonly id = `cat-tooltip-${nextUniqueId++}`;\n private tooltip?: HTMLElement;\n private triggerElement?: HTMLElement;\n private trigger?: FocusableElement;\n private showTimeout?: number;\n private hideTimeout?: number;\n private touchTimeout?: number;\n\n /**\n * The content of the tooltip.\n */\n @Prop() content = '';\n\n /**\n * Specifies that the tooltip should be disabled. A disabled tooltip is unusable,\n * and invisible. Corresponds with the native HTML disabled attribute.\n */\n @Prop() disabled = false;\n\n /**\n * The placement of the tooltip.\n */\n @Prop() placement: Placement = 'top';\n\n /**\n * The delay time for showing tooltip in ms.\n */\n @Prop() showDelay = 500;\n\n /**\n * The delay time for hiding tooltip in ms.\n */\n @Prop() hideDelay = 0;\n\n /**\n * The duration of tap to show the tooltip.\n */\n @Prop() longTouchDuration = 1000;\n\n @Listen('keydown')\n handleKeyDown({ key }: KeyboardEvent) {\n key === 'Escape' && this.hideListener();\n }\n\n componentDidLoad(): void {\n this.trigger = firstTabbable(this.triggerElement) || this.triggerElement;\n if (!this.isTabbable) {\n this.trigger?.setAttribute('tabindex', '0');\n }\n if (this.trigger && this.tooltip) {\n autoUpdate(this.trigger, this.tooltip, () => this.update());\n }\n\n if (isTouchScreen) {\n this.trigger?.addEventListener('touchstart', this.touchStartListener.bind(this));\n this.trigger?.addEventListener('touchend', this.touchEndListener.bind(this));\n } else {\n this.trigger?.addEventListener('focusin', this.showListener.bind(this));\n this.trigger?.addEventListener('focusout', this.hideListener.bind(this));\n this.trigger?.addEventListener('mouseenter', this.showListener.bind(this));\n this.trigger?.addEventListener('mouseleave', this.hideListener.bind(this));\n }\n }\n\n disconnectedCallback(): void {\n if (isTouchScreen) {\n this.trigger?.removeEventListener('touchstart', this.touchStartListener.bind(this));\n this.trigger?.removeEventListener('touchend', this.touchEndListener.bind(this));\n } else {\n this.trigger?.removeEventListener('mouseenter', this.showListener.bind(this));\n this.trigger?.removeEventListener('mouseleave', this.hideListener.bind(this));\n this.trigger?.removeEventListener('focusin', this.showListener.bind(this));\n this.trigger?.removeEventListener('focusout', this.hideListener.bind(this));\n }\n }\n\n render() {\n return (\n <Host>\n <div ref={el => (this.triggerElement = el)} aria-describedby={this.id} class=\"tooltip-trigger\">\n <slot />\n </div>\n {this.content && !this.disabled && (\n <div ref={el => (this.tooltip = el)} id={this.id} class=\"tooltip\">\n {this.content}\n </div>\n )}\n </Host>\n );\n }\n\n private get isTabbable() {\n return firstTabbable(this.trigger);\n }\n\n private update() {\n if (this.trigger && this.tooltip) {\n computePosition(this.trigger, this.tooltip, {\n placement: this.placement,\n middleware: [offset(CatTooltip.OFFSET), flip()]\n }).then(({ x, y }) => {\n if (this.tooltip) {\n Object.assign(this.tooltip.style, {\n left: `${Math.max(0, x)}px`,\n top: `${y}px`\n });\n }\n });\n }\n }\n\n private showListener() {\n window.clearTimeout(this.hideTimeout);\n this.showTimeout = window.setTimeout(() => {\n this.trigger?.focus();\n this.tooltip?.classList.add('tooltip-show');\n }, this.showDelay);\n }\n\n private hideListener() {\n window.clearTimeout(this.showTimeout);\n this.hideTimeout = window.setTimeout(() => {\n this.trigger?.blur();\n this.tooltip?.classList.remove('tooltip-show');\n }, this.hideDelay);\n }\n\n private touchStartListener() {\n this.touchTimeout = window.setTimeout(() => {\n this.tooltip?.classList.add('tooltip-show');\n }, this.longTouchDuration);\n }\n\n private touchEndListener() {\n window.clearTimeout(this.touchTimeout);\n this.tooltip?.classList.remove('tooltip-show');\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(function (doc) {
|
|
2
|
+
var scriptElm = doc.scripts[doc.scripts.length - 1];
|
|
3
|
+
var warn = ['Discouraged script use, please remove: ' + scriptElm.outerHTML];
|
|
4
|
+
|
|
5
|
+
warn.push('To improve performance it is recommended to set the script in the head as follows:');
|
|
6
|
+
|
|
7
|
+
var parts = scriptElm.src.split('/');
|
|
8
|
+
parts.pop();
|
|
9
|
+
// add subfolder(s) here
|
|
10
|
+
// parts.push('...');
|
|
11
|
+
var url = parts.join('/');
|
|
12
|
+
|
|
13
|
+
scriptElm = doc.createElement('script');
|
|
14
|
+
scriptElm.setAttribute('type', 'module');
|
|
15
|
+
scriptElm.src = url + '/catalyst.esm.js';
|
|
16
|
+
warn.push(scriptElm.outerHTML);
|
|
17
|
+
scriptElm.setAttribute('data-stencil-namespace', 'catalyst');
|
|
18
|
+
doc.head.appendChild(scriptElm);
|
|
19
|
+
|
|
20
|
+
console.warn(warn.join('\n'));
|
|
21
|
+
})(document);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC","sourcesContent":["export { Components, JSX } from './components';\nexport { CatI18nRegistry } from './components/cat-i18n/cat-i18n-registry';\nexport { CatIconRegistry } from './components/cat-icon/cat-icon-registry';\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ci } from '@haiilo/catalyst-icons';
|
|
2
|
+
import { CatI18nRegistry } from './components/cat-i18n/cat-i18n-registry';
|
|
3
|
+
import { CatIconRegistry } from './components/cat-icon/cat-icon-registry';
|
|
4
|
+
function registerIcons() {
|
|
5
|
+
CatIconRegistry.getInstance().addIcons(ci);
|
|
6
|
+
}
|
|
7
|
+
function registerTranslations() {
|
|
8
|
+
CatI18nRegistry.getInstance().addMessages('en', {
|
|
9
|
+
'input.clear': 'Clear',
|
|
10
|
+
'input.optional': 'Optional'
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export default function () {
|
|
14
|
+
registerIcons();
|
|
15
|
+
registerTranslations();
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE1E,SAAS,aAAa;EACpB,eAAe,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,oBAAoB;EAC3B,eAAe,CAAC,WAAW,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE;IAC9C,aAAa,EAAE,OAAO;IACtB,gBAAgB,EAAE,UAAU;GAC7B,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,OAAO;EACZ,aAAa,EAAE,CAAC;EAChB,oBAAoB,EAAE,CAAC;AACzB,CAAC","sourcesContent":["import { ci } from '@haiilo/catalyst-icons';\nimport { CatI18nRegistry } from './components/cat-i18n/cat-i18n-registry';\nimport { CatIconRegistry } from './components/cat-icon/cat-icon-registry';\n\nfunction registerIcons() {\n CatIconRegistry.getInstance().addIcons(ci);\n}\n\nfunction registerTranslations() {\n CatI18nRegistry.getInstance().addMessages('en', {\n 'input.clear': 'Clear',\n 'input.optional': 'Optional'\n });\n}\n\nexport default function () {\n registerIcons();\n registerTranslations();\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const _breakpoints = ['xs', 's', 'm', 'l', 'xl'];
|
|
2
|
+
export const Breakpoints = {
|
|
3
|
+
xs: '(max-width: 539.98px)',
|
|
4
|
+
s: '(max-width: 767.98px)',
|
|
5
|
+
m: '(max-width: 991.98px)',
|
|
6
|
+
l: '(max-width: 1199.98px)',
|
|
7
|
+
xl: '(max-width: 1399.98px)'
|
|
8
|
+
};
|
|
9
|
+
export function isBreakpoint(value) {
|
|
10
|
+
return typeof value === 'string' && _breakpoints.includes(value);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints.js","sourceRoot":"","sources":["../../src/utils/breakpoints.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAU,CAAC;AAI1D,MAAM,CAAC,MAAM,WAAW,GAA2C;EACjE,EAAE,EAAE,uBAAuB;EAC3B,CAAC,EAAE,uBAAuB;EAC1B,CAAC,EAAE,uBAAuB;EAC1B,CAAC,EAAE,wBAAwB;EAC3B,EAAE,EAAE,wBAAwB;CAC7B,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,KAAc;EACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAmB,CAAC,CAAC;AACjF,CAAC","sourcesContent":["const _breakpoints = ['xs', 's', 'm', 'l', 'xl'] as const;\n\nexport type Breakpoint = typeof _breakpoints[number];\n\nexport const Breakpoints: { [breakpoint in Breakpoint]: string } = {\n xs: '(max-width: 539.98px)',\n s: '(max-width: 767.98px)',\n m: '(max-width: 991.98px)',\n l: '(max-width: 1199.98px)',\n xl: '(max-width: 1399.98px)'\n};\n\nexport function isBreakpoint(value: unknown): value is Breakpoint {\n return typeof value === 'string' && _breakpoints.includes(value as Breakpoint);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first-tabbable.js","sourceRoot":"","sources":["../../src/utils/first-tabbable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAItD,MAAM,aAAa,GAAG,CAAC,SAAqB,EAAgC,EAAE;EAC5E,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;AACzG,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { FocusableElement, tabbable } from 'tabbable';\n\ntype Container = Element | FocusableElement | null;\n\nconst firstTabbable = (container?: Container): FocusableElement | undefined => {\n return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();\n};\n\nexport default firstTabbable;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-touch-screen.js","sourceRoot":"","sources":["../../src/utils/is-touch-screen.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,cAAc,IAAI,MAAM,IAAI,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC;AAE/E,eAAe,aAAa,CAAC","sourcesContent":["const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n\nexport default isTouchDevice;\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import log from 'loglevel';
|
|
2
|
+
import { Platform } from './platform';
|
|
3
|
+
// https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts
|
|
4
|
+
/** Global registry for all dynamically-created, injected media queries. */
|
|
5
|
+
const mediaQueriesForWebkitCompatibility = new Set();
|
|
6
|
+
/** Style tag that holds all of the dynamically-created media queries. */
|
|
7
|
+
let mediaQueryStyleNode;
|
|
8
|
+
/** A utility for calling matchMedia queries. */
|
|
9
|
+
export class MediaMatcher {
|
|
10
|
+
constructor() {
|
|
11
|
+
this._platform = new Platform();
|
|
12
|
+
this._matchMedia = window.matchMedia.bind(window);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Evaluates the given media query and returns the native MediaQueryList from which results
|
|
16
|
+
* can be retrieved.
|
|
17
|
+
* Confirms the layout engine will trigger for the selector query provided and returns the
|
|
18
|
+
* MediaQueryList for the query provided.
|
|
19
|
+
*/
|
|
20
|
+
matchMedia(query) {
|
|
21
|
+
if (this._platform.WEBKIT || this._platform.BLINK) {
|
|
22
|
+
createEmptyStyleRule(query);
|
|
23
|
+
}
|
|
24
|
+
return this._matchMedia(query);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Creates an empty stylesheet that is used to work around browser inconsistencies related to
|
|
29
|
+
* `matchMedia`. At the time of writing, it handles the following cases:
|
|
30
|
+
* 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`
|
|
31
|
+
* to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.
|
|
32
|
+
* 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules
|
|
33
|
+
* inside the `@media` match existing elements on the page. We work around it by having one rule
|
|
34
|
+
* targeting the `body`. See https://github.com/angular/components/issues/23546.
|
|
35
|
+
*/
|
|
36
|
+
function createEmptyStyleRule(query) {
|
|
37
|
+
if (mediaQueriesForWebkitCompatibility.has(query)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
if (!mediaQueryStyleNode) {
|
|
42
|
+
mediaQueryStyleNode = document.createElement('style');
|
|
43
|
+
mediaQueryStyleNode.setAttribute('type', 'text/css');
|
|
44
|
+
document.head.appendChild(mediaQueryStyleNode);
|
|
45
|
+
}
|
|
46
|
+
if (mediaQueryStyleNode.sheet) {
|
|
47
|
+
mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);
|
|
48
|
+
mediaQueriesForWebkitCompatibility.add(query);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
log.error(e);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=media-matcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-matcher.js","sourceRoot":"","sources":["../../src/utils/media-matcher.ts"],"names":[],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V,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;GACd;AACH,CAAC","sourcesContent":["import log from 'loglevel';\nimport { Platform } from './platform';\n\n// https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set<string> = new Set<string>();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\nexport class MediaMatcher {\n private _platform;\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor() {\n this._platform = new Platform();\n this._matchMedia = window.matchMedia.bind(window);\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n log.error(e);\n }\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// https://github.com/angular/components/blob/master/src/cdk/platform/platform.ts
|
|
2
|
+
// Whether the current platform supports the V8 Break Iterator. The V8 check
|
|
3
|
+
// is necessary to detect all Blink based browsers.
|
|
4
|
+
let hasV8BreakIterator;
|
|
5
|
+
// We need a try/catch around the reference to `Intl`, because accessing it in some cases can
|
|
6
|
+
// cause IE to throw. These cases are tied to particular versions of Windows and can happen if
|
|
7
|
+
// the consumer is providing a polyfilled `Map`. See:
|
|
8
|
+
// https://github.com/Microsoft/ChakraCore/issues/3189
|
|
9
|
+
// https://github.com/angular/components/issues/15687
|
|
10
|
+
try {
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
+
hasV8BreakIterator = typeof Intl !== 'undefined' && Intl.v8BreakIterator;
|
|
13
|
+
}
|
|
14
|
+
catch (_a) {
|
|
15
|
+
hasV8BreakIterator = false;
|
|
16
|
+
}
|
|
17
|
+
export class Platform {
|
|
18
|
+
constructor() {
|
|
19
|
+
/** Whether the current browser is Microsoft Edge. */
|
|
20
|
+
this.EDGE = /(edge)/i.test(navigator.userAgent);
|
|
21
|
+
/** Whether the current rendering engine is Microsoft Trident. */
|
|
22
|
+
this.TRIDENT = /(msie|trident)/i.test(navigator.userAgent);
|
|
23
|
+
// EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.
|
|
24
|
+
/** Whether the current rendering engine is Blink. */
|
|
25
|
+
this.BLINK =
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
!!(window.chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;
|
|
28
|
+
// Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to
|
|
29
|
+
// ensure that Webkit runs standalone and is not used as another engine's base.
|
|
30
|
+
/** Whether the current rendering engine is WebKit. */
|
|
31
|
+
this.WEBKIT = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;
|
|
32
|
+
/** Whether the current platform is Apple iOS. */
|
|
33
|
+
this.IOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);
|
|
34
|
+
// It's difficult to detect the plain Gecko engine, because most of the browsers identify
|
|
35
|
+
// them self as Gecko-like browsers and modify the userAgent's according to that.
|
|
36
|
+
// Since we only cover one explicit Firefox case, we can simply check for Firefox
|
|
37
|
+
// instead of having an unstable check for Gecko.
|
|
38
|
+
/** Whether the current browser is Firefox. */
|
|
39
|
+
this.FIREFOX = /(firefox|minefield)/i.test(navigator.userAgent);
|
|
40
|
+
/** Whether the current platform is Android. */
|
|
41
|
+
// Trident on mobile adds the android platform to the userAgent to trick detections.
|
|
42
|
+
this.ANDROID = /android/i.test(navigator.userAgent) && !this.TRIDENT;
|
|
43
|
+
// Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake
|
|
44
|
+
// this and just place the Safari keyword in the userAgent. To be more safe about Safari every
|
|
45
|
+
// Safari browser should also use Webkit as its layout engine.
|
|
46
|
+
/** Whether the current browser is Safari. */
|
|
47
|
+
this.SAFARI = /safari/i.test(navigator.userAgent) && this.WEBKIT;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF,4EAA4E;AAC5E,mDAAmD;AACnD,IAAI,kBAA2B,CAAC;AAEhC,6FAA6F;AAC7F,8FAA8F;AAC9F,qDAAqD;AACrD,sDAAsD;AACtD,qDAAqD;AACrD,IAAI;EACF,8DAA8D;EAC9D,kBAAkB,GAAG,OAAO,IAAI,KAAK,WAAW,IAAK,IAAY,CAAC,eAAe,CAAC;CACnF;AAAC,WAAM;EACN,kBAAkB,GAAG,KAAK,CAAC;CAC5B;AAED,MAAM,OAAO,QAAQ;EA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k/platform/platform.ts\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\nexport class Platform {\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !!((window as any).chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CatAlert extends Components.CatAlert, HTMLElement {}
|
|
4
|
+
export const CatAlert: {
|
|
5
|
+
prototype: CatAlert;
|
|
6
|
+
new (): CatAlert;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const catAlertCss = ":host{display:block;margin-bottom:1rem}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host([hidden]){display:none}.alert{font:inherit;color:rgb(var(--text));background-color:rgba(var(--bg), 0.1);box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);border-radius:0.25rem;padding:0.75rem 1rem}::slotted(:last-child){margin-bottom:0 !important}.alert-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.alert-secondary{--bg:105, 118, 135;--text:0, 0, 0;--border:105, 118, 135}.alert-success{--bg:0, 132, 88;--text:0, 132, 88;--border:0, 132, 88}.alert-warning{--bg:255, 206, 128;--text:159, 97, 0;--border:159, 97, 0}.alert-danger{--bg:217, 52, 13;--text:217, 52, 13;--border:217, 52, 13}";
|
|
4
|
+
|
|
5
|
+
const CatAlert$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* The color palette of the alert.
|
|
12
|
+
*/
|
|
13
|
+
this.color = 'primary';
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, { tabindex: "0", role: this.role }, h("div", { part: "alert", class: {
|
|
17
|
+
alert: true,
|
|
18
|
+
[`alert-${this.color}`]: Boolean(this.color)
|
|
19
|
+
} }, h("slot", null))));
|
|
20
|
+
}
|
|
21
|
+
get role() {
|
|
22
|
+
switch (this.color) {
|
|
23
|
+
case 'danger':
|
|
24
|
+
case 'warning':
|
|
25
|
+
return 'alert';
|
|
26
|
+
default:
|
|
27
|
+
return 'status';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static get style() { return catAlertCss; }
|
|
31
|
+
}, [1, "cat-alert", {
|
|
32
|
+
"color": [1]
|
|
33
|
+
}]);
|
|
34
|
+
function defineCustomElement$1() {
|
|
35
|
+
if (typeof customElements === "undefined") {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const components = ["cat-alert"];
|
|
39
|
+
components.forEach(tagName => { switch (tagName) {
|
|
40
|
+
case "cat-alert":
|
|
41
|
+
if (!customElements.get(tagName)) {
|
|
42
|
+
customElements.define(tagName, CatAlert$1);
|
|
43
|
+
}
|
|
44
|
+
break;
|
|
45
|
+
} });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const CatAlert = CatAlert$1;
|
|
49
|
+
const defineCustomElement = defineCustomElement$1;
|
|
50
|
+
|
|
51
|
+
export { CatAlert, defineCustomElement };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=cat-alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-alert.js","mappings":";;AAAA,MAAM,WAAW,GAAG,q0BAAq0B;;MCa50BA,UAAQ;EALrB;;;;;;;IASU,UAAK,GAA+D,SAAS,CAAC;GA2BvF;EAzBC,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAChC,WACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;OAC7C,IAED,eAAa,CACT,CACD,EACP;GACH;EAED,IAAY,IAAI;IACd,QAAQ,IAAI,CAAC,KAAK;MAChB,KAAK,QAAQ,CAAC;MACd,KAAK,SAAS;QACZ,OAAO,OAAO,CAAC;MACjB;QACE,OAAO,QAAQ,CAAC;KACnB;GACF;;;;;;;;;;;;;;;;;;;;;;;;","names":["CatAlert"],"sources":["./src/components/cat-alert/cat-alert.scss?tag=cat-alert&encapsulation=shadow","./src/components/cat-alert/cat-alert.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n margin-bottom: $cat-body-margin-bottom;\n}\n\n:host(:focus-visible) {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.alert {\n font: inherit;\n color: cat-token-wrap(var(--text));\n background-color: cat-token-wrap(var(--bg), $alpha: 0.1);\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--border), $alpha: 0.2);\n border-radius: cat-border-radius('m');\n padding: 0.75rem 1rem;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n// ----- theme\n\n@mixin theme($theme) {\n .alert-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --border: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --border: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n/**\n * Informs user about important changes or conditions in the interface. Use this\n * component if you need to capture user’s attention in a prominent way.\n *\n * @part alert - The alert element.\n */\n@Component({\n tag: 'cat-alert',\n styleUrl: 'cat-alert.scss',\n shadow: true\n})\nexport class CatAlert {\n /**\n * The color palette of the alert.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n render() {\n return (\n <Host tabindex=\"0\" role={this.role}>\n <div\n part=\"alert\"\n class={{\n alert: true,\n [`alert-${this.color}`]: Boolean(this.color)\n }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n\n private get role() {\n switch (this.color) {\n case 'danger':\n case 'warning':\n return 'alert';\n default:\n return 'status';\n }\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CatBadge extends Components.CatBadge, HTMLElement {}
|
|
4
|
+
export const CatBadge: {
|
|
5
|
+
prototype: CatBadge;
|
|
6
|
+
new (): CatBadge;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const catBadgeCss = ":host{display:inline-flex;max-width:100%;vertical-align:baseline}:host([hidden]){display:none}.badge{font:inherit;flex:1 1 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:0.125rem;text-decoration:none;width:100%;box-sizing:border-box;line-height:1;white-space:nowrap}.badge slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.badge-round{border-radius:10rem}.badge-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.badge-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}.badge-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.badge-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--border:105, 118, 135}.badge-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--border:0, 132, 88}.badge-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--border:159, 97, 0}.badge-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--border:217, 52, 13}.badge-xs{height:0.75rem;min-width:0.75rem;font-size:0.75rem;padding:0 0.1875rem}.badge-s{height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}.badge-m{height:1.25rem;min-width:1.25rem;font-size:0.75rem;padding:0 0.3125rem}.badge-l{height:1.5rem;min-width:1.5rem;font-size:0.875rem;padding:0 0.375rem}.badge-xl{height:1.75rem;min-width:1.75rem;font-size:0.9375rem;padding:0 0.4375rem}.badge-pulse.badge-filled{animation:1.5s ease 0s infinite normal none running pulse}.badge-pulse.badge-outlined{animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--border), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--border), 0.2)}}";
|
|
4
|
+
|
|
5
|
+
const CatBadge$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* The rendering style of the badge.
|
|
12
|
+
*/
|
|
13
|
+
this.variant = 'filled';
|
|
14
|
+
/**
|
|
15
|
+
* The color palette of the badge.
|
|
16
|
+
*/
|
|
17
|
+
this.color = 'primary';
|
|
18
|
+
/**
|
|
19
|
+
* The size of the badge.
|
|
20
|
+
*/
|
|
21
|
+
this.size = 'm';
|
|
22
|
+
/**
|
|
23
|
+
* Use round badge edges.
|
|
24
|
+
*/
|
|
25
|
+
this.round = false;
|
|
26
|
+
/**
|
|
27
|
+
* Draw attention to the badge with a subtle animation.
|
|
28
|
+
*/
|
|
29
|
+
this.pulse = false;
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return (h("span", { part: "badge", class: {
|
|
33
|
+
badge: true,
|
|
34
|
+
'badge-round': this.round,
|
|
35
|
+
'badge-pulse': this.pulse,
|
|
36
|
+
[`badge-${this.variant}`]: Boolean(this.variant),
|
|
37
|
+
[`badge-${this.color}`]: Boolean(this.color),
|
|
38
|
+
[`badge-${this.size}`]: Boolean(this.size)
|
|
39
|
+
} }, h("slot", null)));
|
|
40
|
+
}
|
|
41
|
+
static get style() { return catBadgeCss; }
|
|
42
|
+
}, [1, "cat-badge", {
|
|
43
|
+
"variant": [1],
|
|
44
|
+
"color": [1],
|
|
45
|
+
"size": [1],
|
|
46
|
+
"round": [4],
|
|
47
|
+
"pulse": [4]
|
|
48
|
+
}]);
|
|
49
|
+
function defineCustomElement$1() {
|
|
50
|
+
if (typeof customElements === "undefined") {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const components = ["cat-badge"];
|
|
54
|
+
components.forEach(tagName => { switch (tagName) {
|
|
55
|
+
case "cat-badge":
|
|
56
|
+
if (!customElements.get(tagName)) {
|
|
57
|
+
customElements.define(tagName, CatBadge$1);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
} });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const CatBadge = CatBadge$1;
|
|
64
|
+
const defineCustomElement = defineCustomElement$1;
|
|
65
|
+
|
|
66
|
+
export { CatBadge, defineCustomElement };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=cat-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-badge.js","mappings":";;AAAA,MAAM,WAAW,GAAG,+qEAA+qE;;MCatrEA,UAAQ;EALrB;;;;;;;IASU,YAAO,GAA0B,QAAQ,CAAC;;;;IAK1C,UAAK,GAA+D,SAAS,CAAC;;;;IAK9E,SAAI,GAAkC,GAAG,CAAC;;;;IAK1C,UAAK,GAAG,KAAK,CAAC;;;;IAKd,UAAK,GAAG,KAAK,CAAC;GAmBvB;EAjBC,MAAM;IACJ,QACE,YACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,aAAa,EAAE,IAAI,CAAC,KAAK;QACzB,aAAa,EAAE,IAAI,CAAC,KAAK;QACzB,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAChD,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5C,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;OAC3C,IAED,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CatBadge"],"sources":["./src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","./src/components/cat-badge/cat-badge.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.badge {\n font: inherit;\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('s');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n line-height: 1;\n white-space: nowrap;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n.badge-round {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n.badge-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--border), $alpha: 0.2);\n\n.badge-outlined {\n background-color: cat-token('color.ui.background.body');\n box-shadow: $-outline;\n color: cat-token-wrap(var(--text));\n}\n\n@mixin theme($theme) {\n .badge-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --border: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --border: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .badge-#{$size} {\n height: cat-size($size) * 0.5;\n min-width: cat-size($size) * 0.5;\n font-size: cat-body-font-size($fontSize);\n padding: 0 cat-size($size) * 0.125;\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 'xs');\n@include size('m', 'xs');\n@include size('l', 's');\n@include size('xl', 'm');\n\n// ----- pulse\n\n$-pulse-0: 0 0 0 0 cat-token-wrap(var(--bg));\n$-pulse-70: transparent 0 0 0 0.5rem;\n$-pulse-100: transparent 0 0 0 0;\n\n.badge-pulse {\n &.badge-filled {\n animation: 1.5s ease 0s infinite normal none running pulse;\n }\n\n &.badge-outlined {\n animation: 1.5s ease 0s infinite normal none running pulse-outlined;\n }\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: $-pulse-0;\n }\n\n 70% {\n box-shadow: $-pulse-70;\n }\n\n 100% {\n box-shadow: $-pulse-100;\n }\n}\n\n@keyframes pulse-outlined {\n 0% {\n box-shadow: $-pulse-0, $-outline;\n }\n\n 70% {\n box-shadow: $-pulse-70, $-outline;\n }\n\n 100% {\n box-shadow: $-pulse-100, $-outline;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n *\n * @part badge - The badge element.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n /**\n * The rendering style of the badge.\n */\n @Prop() variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop() round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop() pulse = false;\n\n render() {\n return (\n <span\n part=\"badge\"\n class={{\n badge: true,\n 'badge-round': this.round,\n 'badge-pulse': this.pulse,\n [`badge-${this.variant}`]: Boolean(this.variant),\n [`badge-${this.color}`]: Boolean(this.color),\n [`badge-${this.size}`]: Boolean(this.size)\n }}\n >\n <slot></slot>\n </span>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CatButton extends Components.CatButton, HTMLElement {}
|
|
4
|
+
export const CatButton: {
|
|
5
|
+
prototype: CatButton;
|
|
6
|
+
new (): CatButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-button.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|