@haiilo/catalyst 0.3.1 → 0.5.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/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 -1
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js +1 -1
- package/dist/catalyst/p-23d54bc6.js +2 -0
- package/dist/catalyst/p-23d54bc6.js.map +1 -0
- package/dist/catalyst/p-84693f87.entry.js +24 -0
- package/dist/catalyst/p-84693f87.entry.js.map +1 -0
- package/dist/catalyst/p-8f5cfa78.js +2 -0
- package/dist/catalyst/p-8f5cfa78.js.map +1 -0
- package/dist/catalyst/{p-ed826597.js → p-fa7da4c6.js} +2 -2
- package/dist/catalyst/p-fa7da4c6.js.map +1 -0
- package/dist/cjs/{app-globals-7f2b1f8e.js → app-globals-50e7504d.js} +9 -2
- package/dist/cjs/app-globals-50e7504d.js.map +1 -0
- package/dist/cjs/{cat-alert_8.cjs.entry.js → cat-alert_15.cjs.entry.js} +602 -400
- package/dist/cjs/cat-alert_15.cjs.entry.js.map +1 -0
- package/dist/cjs/cat-icon-registry-6895750f.js +441 -0
- package/dist/cjs/cat-icon-registry-6895750f.js.map +1 -0
- package/dist/cjs/catalyst.cjs.js +4 -4
- package/dist/cjs/{index-c0881ae0.js → index-2db8e23d.js} +1 -2
- package/dist/cjs/index-2db8e23d.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +4 -4
- 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 +8 -1
- package/dist/collection/components/cat-alert/cat-alert.css +11 -6
- package/dist/collection/components/cat-alert/cat-alert.js +19 -8
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.css +17 -17
- package/dist/collection/components/cat-badge/cat-badge.js +9 -8
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.css +18 -8
- package/dist/collection/components/cat-button/cat-button.js +32 -8
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.css +25 -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 +69 -0
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js +14 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.css +5 -5
- package/dist/collection/components/cat-icon/cat-icon.js +3 -2
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
- 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 +2 -1
- package/dist/collection/components/cat-menu/cat-menu.js +3 -5
- package/dist/collection/components/cat-menu/cat-menu.js.map +1 -1
- 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.js +4 -2
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.css +30 -30
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +4 -4
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.css +7 -7
- package/dist/collection/components/cat-spinner/cat-spinner.js +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.css +74 -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.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/init.js +9 -1
- package/dist/collection/init.js.map +1 -1
- 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/components/cat-alert.js +15 -6
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-badge.js +7 -7
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button.js +1 -647
- package/dist/components/cat-button.js.map +1 -1
- 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 +73 -0
- package/dist/components/cat-i18n-registry.js.map +1 -0
- package/dist/components/cat-icon-registry.js +15 -1
- package/dist/components/cat-icon-registry.js.map +1 -1
- package/dist/components/cat-icon2.js +3 -2
- package/dist/components/cat-icon2.js.map +1 -1
- 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.js +12 -1520
- package/dist/components/cat-menu.js.map +1 -1
- 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.js +1 -2
- package/dist/components/cat-scrollable.js.map +1 -1
- package/dist/components/cat-skeleton.js +5 -5
- package/dist/components/cat-skeleton.js.map +1 -1
- package/dist/components/cat-spinner2.js +2 -2
- package/dist/components/cat-spinner2.js.map +1 -1
- 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 +1496 -0
- package/dist/components/first-tabbable.js.map +1 -0
- package/dist/components/index.js +9 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/loglevel.js +315 -0
- package/dist/components/loglevel.js.map +1 -0
- package/dist/esm/{app-globals-8af9b2cf.js → app-globals-6906ac5c.js} +9 -2
- package/dist/esm/app-globals-6906ac5c.js.map +1 -0
- package/dist/esm/{cat-alert_8.entry.js → cat-alert_15.entry.js} +594 -399
- package/dist/esm/cat-alert_15.entry.js.map +1 -0
- package/dist/esm/cat-icon-registry-77963c26.js +437 -0
- package/dist/esm/cat-icon-registry-77963c26.js.map +1 -0
- package/dist/esm/catalyst.js +4 -4
- package/dist/esm/{index-0ff35bca.js → index-1f3ca03b.js} +2 -2
- package/dist/esm/index-1f3ca03b.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/types/components/cat-alert/cat-alert.d.ts +4 -2
- package/dist/types/components/cat-badge/cat-badge.d.ts +3 -2
- package/dist/types/components/cat-button/cat-button.d.ts +8 -3
- 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 +4 -4
- package/dist/types/components/cat-icon/cat-icon.d.ts +1 -1
- package/dist/types/components/cat-input/cat-input.d.ts +130 -0
- package/dist/types/components/cat-menu/cat-menu.d.ts +0 -1
- package/dist/types/components/cat-radio/cat-radio.d.ts +63 -0
- package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +3 -1
- 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 +680 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/first-tabbable.d.ts +4 -0
- package/dist/types/utils/is-touch-screen.d.ts +2 -0
- package/package.json +9 -7
- package/dist/catalyst/p-31b500c7.entry.js +0 -10
- package/dist/catalyst/p-31b500c7.entry.js.map +0 -1
- package/dist/catalyst/p-ed826597.js.map +0 -1
- package/dist/catalyst/p-ef0a8ae9.js +0 -2
- package/dist/catalyst/p-ef0a8ae9.js.map +0 -1
- package/dist/catalyst/p-f151cb13.js +0 -2
- package/dist/catalyst/p-f151cb13.js.map +0 -1
- package/dist/cjs/app-globals-7f2b1f8e.js.map +0 -1
- package/dist/cjs/cat-alert_8.cjs.entry.js.map +0 -1
- package/dist/cjs/cat-icon-registry-850c538c.js +0 -47
- package/dist/cjs/cat-icon-registry-850c538c.js.map +0 -1
- package/dist/cjs/index-c0881ae0.js.map +0 -1
- package/dist/collection/utils/utils.js +0 -4
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/esm/app-globals-8af9b2cf.js.map +0 -1
- package/dist/esm/cat-alert_8.entry.js.map +0 -1
- package/dist/esm/cat-icon-registry-59da2e37.js +0 -45
- package/dist/esm/cat-icon-registry-59da2e37.js.map +0 -1
- package/dist/esm/index-0ff35bca.js.map +0 -1
- package/dist/types/utils/utils.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-skeleton.js","sourceRoot":"","sources":["../../../src/components/cat-skeleton/cat-skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEzD;;GAEG;AAMH,MAAM,OAAO,WAAW;EALxB;IAME;;OAEG;IACK,WAAM,GAAgC,OAAO,CAAC;IAEtD;;OAEG;IACK,YAAO,GAAwD,WAAW,CAAC;IAEnF;;;OAGG;IACK,SAAI,GAAkC,GAAG,CAAC;GAiDnD;EAxCC,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,QACF,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CACvC,WACE,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE;QACL,
|
|
1
|
+
{"version":3,"file":"cat-skeleton.js","sourceRoot":"","sources":["../../../src/components/cat-skeleton/cat-skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEzD;;GAEG;AAMH,MAAM,OAAO,WAAW;EALxB;IAME;;OAEG;IACK,WAAM,GAAgC,OAAO,CAAC;IAEtD;;OAEG;IACK,YAAO,GAAwD,WAAW,CAAC;IAEnF;;;OAGG;IACK,SAAI,GAAkC,GAAG,CAAC;GAiDnD;EAxCC,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,QACF,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAA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;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * Skeletons are used to show where content will eventually be drawn.\n */\n@Component({\n tag: 'cat-skeleton',\n styleUrl: 'cat-skeleton.scss',\n shadow: true\n})\nexport class CatSkeleton {\n /**\n * The animation style of the skeleton.\n */\n @Prop() effect: 'plain' | 'sheen' | 'pulse' = 'sheen';\n\n /**\n * The rendering style of the skeleton.\n */\n @Prop() variant: 'rectangle' | 'square' | 'circle' | 'head' | 'body' = 'rectangle';\n\n /**\n * The size of the skeleton. If the variant is set to \"head\", the size values\n * \"xs\" to \"xl\" translate to the head levels `h1` to `h5`.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The number of text lines to be rendered for \"head\" and \"body\" variants.\n * Defaults to 1 for \"head\" and 3 for \"body\". Will be ignored for other\n * variants.\n */\n @Prop() lines?: number;\n\n render() {\n return (\n <Host>\n {Array.from(Array(this.count)).map(() => (\n <div\n style={this.style}\n class={{\n skeleton: true,\n [`skeleton-${this.effect}`]: Boolean(this.effect),\n [`skeleton-${this.variant}`]: Boolean(this.variant),\n [`skeleton-${this.size}`]: Boolean(this.size)\n }}\n ></div>\n ))}\n </Host>\n );\n }\n\n private get count() {\n switch (this.variant) {\n case 'head':\n return Math.max(1, this.lines || 1);\n case 'body':\n return Math.max(1, this.lines || 3);\n default:\n return 1;\n }\n }\n\n private get style() {\n return this.variant === 'head' || this.variant === 'body'\n ? {\n '--line-width': `${this.random(50, 100)}%`\n }\n : undefined;\n }\n\n private random(min: number, max: number) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }\n}\n"]}
|
|
@@ -28,32 +28,32 @@ svg {
|
|
|
28
28
|
stroke-linecap: round;
|
|
29
29
|
stroke-width: 5px;
|
|
30
30
|
transform-origin: center center;
|
|
31
|
-
animation:
|
|
31
|
+
animation: spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;
|
|
32
32
|
width: 1em;
|
|
33
33
|
height: 1em;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
36
|
+
.spinner-xs svg {
|
|
37
37
|
font-size: 0.75rem;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.
|
|
40
|
+
.spinner-s svg {
|
|
41
41
|
font-size: 1rem;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.
|
|
44
|
+
.spinner-m svg {
|
|
45
45
|
font-size: 1.25rem;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.
|
|
48
|
+
.spinner-l svg {
|
|
49
49
|
font-size: 1.5rem;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.
|
|
52
|
+
.spinner-xl svg {
|
|
53
53
|
font-size: 1.75rem;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
@keyframes
|
|
56
|
+
@keyframes spin {
|
|
57
57
|
from {
|
|
58
58
|
transform: rotate(0deg);
|
|
59
59
|
}
|
|
@@ -11,7 +11,7 @@ export class CatSpinner {
|
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
13
|
return (h("span", { "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', class: {
|
|
14
|
-
[`
|
|
14
|
+
[`spinner-${this.size}`]: this.size !== 'inline'
|
|
15
15
|
} },
|
|
16
16
|
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" },
|
|
17
17
|
h("circle", { cx: "24", cy: "24", r: "21.5" }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-spinner.js","sourceRoot":"","sources":["../../../src/components/cat-spinner/cat-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AAMH,MAAM,OAAO,UAAU;EALvB;IAME;;OAEG;IACK,SAAI,GAA6C,GAAG,CAAC;GAuB9D;EAfC,MAAM;IACJ,OAAO,CACL,0BACc,IAAI,CAAC,SAAS,iBACb,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAC3C,KAAK,EAAE;QACL,CAAC,
|
|
1
|
+
{"version":3,"file":"cat-spinner.js","sourceRoot":"","sources":["../../../src/components/cat-spinner/cat-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AAMH,MAAM,OAAO,UAAU;EALvB;IAME;;OAEG;IACK,SAAI,GAA6C,GAAG,CAAC;GAuB9D;EAfC,MAAM;IACJ,OAAO,CACL,0BACc,IAAI,CAAC,SAAS,iBACb,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAC3C,KAAK,EAAE;QACL,CAAC,WAAW,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;OACjD;MAED,WAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW;QACzD,cAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,MAAM,GAAU,CACtC,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Spinners are used to indicate users that their action is being processed.\n */\n@Component({\n tag: 'cat-spinner',\n styleUrl: 'cat-spinner.scss',\n shadow: true\n})\nexport class CatSpinner {\n /**\n * The size of the spinner.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline' = 'm';\n\n /**\n * Adds accessible label for the spinner that is only shown for screen\n * readers. The `aria-hidden` attribute will be set if no label is present.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n <span\n aria-label={this.a11yLabel}\n aria-hidden={this.a11yLabel ? null : 'true'}\n class={{\n [`spinner-${this.size}`]: this.size !== 'inline'\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\">\n <circle cx=\"24\" cy=\"24\" r=\"21.5\"></circle>\n </svg>\n </span>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated file. Do not edit directly.
|
|
3
|
+
*/
|
|
4
|
+
/* stylelint-disable value-keyword-case */
|
|
5
|
+
/* stylelint-enable value-keyword-case */
|
|
6
|
+
:host {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 0.5rem;
|
|
10
|
+
font-size: 0.9375rem;
|
|
11
|
+
line-height: 1.25rem;
|
|
12
|
+
margin-bottom: 1rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([hidden]) {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
label {
|
|
20
|
+
display: block;
|
|
21
|
+
align-self: flex-start;
|
|
22
|
+
}
|
|
23
|
+
label.hidden {
|
|
24
|
+
position: absolute !important;
|
|
25
|
+
width: 1px !important;
|
|
26
|
+
height: 1px !important;
|
|
27
|
+
padding: 0 !important;
|
|
28
|
+
margin: -1px !important;
|
|
29
|
+
overflow: hidden !important;
|
|
30
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
31
|
+
white-space: nowrap !important;
|
|
32
|
+
border: 0 !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.input-optional {
|
|
36
|
+
margin-left: 0.25rem;
|
|
37
|
+
font-size: 0.75rem;
|
|
38
|
+
line-height: 1rem;
|
|
39
|
+
color: rgb(var(--cat-font-color-muted, 105, 118, 135));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
textarea {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0.625rem 0.75rem;
|
|
45
|
+
width: 100%;
|
|
46
|
+
min-height: 2.5rem;
|
|
47
|
+
font: inherit;
|
|
48
|
+
background: white;
|
|
49
|
+
border-radius: 0.25rem;
|
|
50
|
+
border: none;
|
|
51
|
+
box-shadow: 0 0 0 1px #d7dbe0;
|
|
52
|
+
transition: box-shadow 0.13s linear;
|
|
53
|
+
}
|
|
54
|
+
textarea:disabled {
|
|
55
|
+
background: #f8f8fb;
|
|
56
|
+
cursor: not-allowed;
|
|
57
|
+
color: rgb(var(--cat-font-color-muted, 105, 118, 135));
|
|
58
|
+
resize: none;
|
|
59
|
+
}
|
|
60
|
+
textarea:hover:not(:disabled) {
|
|
61
|
+
box-shadow: 0 0 0 2px #d7dbe0;
|
|
62
|
+
}
|
|
63
|
+
textarea:focus {
|
|
64
|
+
outline: 2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));
|
|
65
|
+
}
|
|
66
|
+
textarea::placeholder {
|
|
67
|
+
color: rgb(var(--cat-font-color-muted, 105, 118, 135));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.input-hint {
|
|
71
|
+
font-size: 0.875rem;
|
|
72
|
+
line-height: 1rem;
|
|
73
|
+
margin: 0;
|
|
74
|
+
}
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { Component, Event, h, Host, Method, Prop } from '@stencil/core';
|
|
2
|
+
import log from 'loglevel';
|
|
3
|
+
import autosize from 'autosize';
|
|
4
|
+
let nextUniqueId = 0;
|
|
5
|
+
/**
|
|
6
|
+
* Textarea specifies a control that allows user to write text over multiple
|
|
7
|
+
* rows. Used when the expected user input is long. For shorter input, use the
|
|
8
|
+
* input component.
|
|
9
|
+
*
|
|
10
|
+
* @part label - The label content.
|
|
11
|
+
*/
|
|
12
|
+
export class CatTextarea {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.id = `cat-textarea-${nextUniqueId++}`;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the textarea is disabled.
|
|
17
|
+
*/
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
/**
|
|
20
|
+
* The label for the textarea.
|
|
21
|
+
*/
|
|
22
|
+
this.label = '';
|
|
23
|
+
/**
|
|
24
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
25
|
+
*/
|
|
26
|
+
this.labelHidden = false;
|
|
27
|
+
/**
|
|
28
|
+
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
29
|
+
*/
|
|
30
|
+
this.name = '';
|
|
31
|
+
/**
|
|
32
|
+
* The value is not editable.
|
|
33
|
+
*/
|
|
34
|
+
this.readonly = false;
|
|
35
|
+
/**
|
|
36
|
+
* A value is required or must be check for the form to be submittable.
|
|
37
|
+
*/
|
|
38
|
+
this.required = false;
|
|
39
|
+
/**
|
|
40
|
+
* Specifies the initial number of lines in the textarea.
|
|
41
|
+
*/
|
|
42
|
+
this.rows = 3;
|
|
43
|
+
}
|
|
44
|
+
componentWillRender() {
|
|
45
|
+
if (!this.label) {
|
|
46
|
+
log.error('[A11y] Missing ARIA label on textarea', this);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
componentDidLoad() {
|
|
50
|
+
autosize(this.textarea);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Sets focus on the textarea. Use this method instead of `textarea.focus()`.
|
|
54
|
+
*
|
|
55
|
+
* @param options An optional object providing options to control aspects of
|
|
56
|
+
* the focusing process.
|
|
57
|
+
*/
|
|
58
|
+
async setFocus(options) {
|
|
59
|
+
this.textarea.focus(options);
|
|
60
|
+
}
|
|
61
|
+
// /**
|
|
62
|
+
// * Clear the input.
|
|
63
|
+
// */
|
|
64
|
+
// @Method()
|
|
65
|
+
// async clear(): Promise<void> {
|
|
66
|
+
// this.inputValue = '';
|
|
67
|
+
// }
|
|
68
|
+
render() {
|
|
69
|
+
return (h(Host, null,
|
|
70
|
+
this.label && (h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } },
|
|
71
|
+
h("span", { part: "label" },
|
|
72
|
+
this.label,
|
|
73
|
+
!this.required && (h("span", { class: "input-optional", "aria-hidden": "true" }, "(Optional)"))))),
|
|
74
|
+
h("textarea", { ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, maxlength: this.maxLength, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }),
|
|
75
|
+
this.hint && h("p", { class: "input-hint" }, this.hint)));
|
|
76
|
+
}
|
|
77
|
+
onInput(event) {
|
|
78
|
+
// this.inputValue = πthis.input.value;
|
|
79
|
+
this.catChange.emit(event);
|
|
80
|
+
}
|
|
81
|
+
onFocus(event) {
|
|
82
|
+
this.catFocus.emit(event);
|
|
83
|
+
}
|
|
84
|
+
onBlur(event) {
|
|
85
|
+
this.catBlur.emit(event);
|
|
86
|
+
}
|
|
87
|
+
static get is() { return "cat-textarea"; }
|
|
88
|
+
static get encapsulation() { return "shadow"; }
|
|
89
|
+
static get originalStyleUrls() { return {
|
|
90
|
+
"$": ["cat-textarea.scss"]
|
|
91
|
+
}; }
|
|
92
|
+
static get styleUrls() { return {
|
|
93
|
+
"$": ["cat-textarea.css"]
|
|
94
|
+
}; }
|
|
95
|
+
static get properties() { return {
|
|
96
|
+
"disabled": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"mutable": false,
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "boolean",
|
|
101
|
+
"resolved": "boolean",
|
|
102
|
+
"references": {}
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"optional": false,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": "Whether the textarea is disabled."
|
|
109
|
+
},
|
|
110
|
+
"attribute": "disabled",
|
|
111
|
+
"reflect": false,
|
|
112
|
+
"defaultValue": "false"
|
|
113
|
+
},
|
|
114
|
+
"hint": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "string",
|
|
119
|
+
"resolved": "string | undefined",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": true,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": "Optional hint text to be displayed with the textarea."
|
|
127
|
+
},
|
|
128
|
+
"attribute": "hint",
|
|
129
|
+
"reflect": false
|
|
130
|
+
},
|
|
131
|
+
"label": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "string",
|
|
136
|
+
"resolved": "string",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": "The label for the textarea."
|
|
144
|
+
},
|
|
145
|
+
"attribute": "label",
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"defaultValue": "''"
|
|
148
|
+
},
|
|
149
|
+
"labelHidden": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"mutable": false,
|
|
152
|
+
"complexType": {
|
|
153
|
+
"original": "boolean",
|
|
154
|
+
"resolved": "boolean",
|
|
155
|
+
"references": {}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": "Visually hide the label, but still show it to assistive technologies like screen readers."
|
|
162
|
+
},
|
|
163
|
+
"attribute": "label-hidden",
|
|
164
|
+
"reflect": false,
|
|
165
|
+
"defaultValue": "false"
|
|
166
|
+
},
|
|
167
|
+
"maxLength": {
|
|
168
|
+
"type": "number",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "number",
|
|
172
|
+
"resolved": "number | undefined",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": true,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": "A maximum length (number of characters) for textual values."
|
|
180
|
+
},
|
|
181
|
+
"attribute": "max-length",
|
|
182
|
+
"reflect": false
|
|
183
|
+
},
|
|
184
|
+
"minLength": {
|
|
185
|
+
"type": "number",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "number",
|
|
189
|
+
"resolved": "number | undefined",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": true,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": "A minimum length (number of characters) for textual values."
|
|
197
|
+
},
|
|
198
|
+
"attribute": "min-length",
|
|
199
|
+
"reflect": false
|
|
200
|
+
},
|
|
201
|
+
"name": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"mutable": false,
|
|
204
|
+
"complexType": {
|
|
205
|
+
"original": "string",
|
|
206
|
+
"resolved": "string",
|
|
207
|
+
"references": {}
|
|
208
|
+
},
|
|
209
|
+
"required": false,
|
|
210
|
+
"optional": false,
|
|
211
|
+
"docs": {
|
|
212
|
+
"tags": [],
|
|
213
|
+
"text": "The name of the form control. Submitted with the form as part of a name/value pair."
|
|
214
|
+
},
|
|
215
|
+
"attribute": "name",
|
|
216
|
+
"reflect": false,
|
|
217
|
+
"defaultValue": "''"
|
|
218
|
+
},
|
|
219
|
+
"placeholder": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"mutable": false,
|
|
222
|
+
"complexType": {
|
|
223
|
+
"original": "string",
|
|
224
|
+
"resolved": "string | undefined",
|
|
225
|
+
"references": {}
|
|
226
|
+
},
|
|
227
|
+
"required": false,
|
|
228
|
+
"optional": true,
|
|
229
|
+
"docs": {
|
|
230
|
+
"tags": [],
|
|
231
|
+
"text": "The placeholder text to display within the input."
|
|
232
|
+
},
|
|
233
|
+
"attribute": "placeholder",
|
|
234
|
+
"reflect": false
|
|
235
|
+
},
|
|
236
|
+
"readonly": {
|
|
237
|
+
"type": "boolean",
|
|
238
|
+
"mutable": false,
|
|
239
|
+
"complexType": {
|
|
240
|
+
"original": "boolean",
|
|
241
|
+
"resolved": "boolean",
|
|
242
|
+
"references": {}
|
|
243
|
+
},
|
|
244
|
+
"required": false,
|
|
245
|
+
"optional": false,
|
|
246
|
+
"docs": {
|
|
247
|
+
"tags": [],
|
|
248
|
+
"text": "The value is not editable."
|
|
249
|
+
},
|
|
250
|
+
"attribute": "readonly",
|
|
251
|
+
"reflect": false,
|
|
252
|
+
"defaultValue": "false"
|
|
253
|
+
},
|
|
254
|
+
"required": {
|
|
255
|
+
"type": "boolean",
|
|
256
|
+
"mutable": false,
|
|
257
|
+
"complexType": {
|
|
258
|
+
"original": "boolean",
|
|
259
|
+
"resolved": "boolean",
|
|
260
|
+
"references": {}
|
|
261
|
+
},
|
|
262
|
+
"required": false,
|
|
263
|
+
"optional": false,
|
|
264
|
+
"docs": {
|
|
265
|
+
"tags": [],
|
|
266
|
+
"text": "A value is required or must be check for the form to be submittable."
|
|
267
|
+
},
|
|
268
|
+
"attribute": "required",
|
|
269
|
+
"reflect": false,
|
|
270
|
+
"defaultValue": "false"
|
|
271
|
+
},
|
|
272
|
+
"rows": {
|
|
273
|
+
"type": "number",
|
|
274
|
+
"mutable": false,
|
|
275
|
+
"complexType": {
|
|
276
|
+
"original": "number",
|
|
277
|
+
"resolved": "number",
|
|
278
|
+
"references": {}
|
|
279
|
+
},
|
|
280
|
+
"required": false,
|
|
281
|
+
"optional": false,
|
|
282
|
+
"docs": {
|
|
283
|
+
"tags": [],
|
|
284
|
+
"text": "Specifies the initial number of lines in the textarea."
|
|
285
|
+
},
|
|
286
|
+
"attribute": "rows",
|
|
287
|
+
"reflect": false,
|
|
288
|
+
"defaultValue": "3"
|
|
289
|
+
},
|
|
290
|
+
"value": {
|
|
291
|
+
"type": "any",
|
|
292
|
+
"mutable": false,
|
|
293
|
+
"complexType": {
|
|
294
|
+
"original": "string | number",
|
|
295
|
+
"resolved": "number | string | undefined",
|
|
296
|
+
"references": {}
|
|
297
|
+
},
|
|
298
|
+
"required": false,
|
|
299
|
+
"optional": true,
|
|
300
|
+
"docs": {
|
|
301
|
+
"tags": [],
|
|
302
|
+
"text": "The initial value of the control."
|
|
303
|
+
},
|
|
304
|
+
"attribute": "value",
|
|
305
|
+
"reflect": false
|
|
306
|
+
}
|
|
307
|
+
}; }
|
|
308
|
+
static get events() { return [{
|
|
309
|
+
"method": "catChange",
|
|
310
|
+
"name": "catChange",
|
|
311
|
+
"bubbles": true,
|
|
312
|
+
"cancelable": true,
|
|
313
|
+
"composed": true,
|
|
314
|
+
"docs": {
|
|
315
|
+
"tags": [],
|
|
316
|
+
"text": "Emitted when the value is changed."
|
|
317
|
+
},
|
|
318
|
+
"complexType": {
|
|
319
|
+
"original": "any",
|
|
320
|
+
"resolved": "any",
|
|
321
|
+
"references": {}
|
|
322
|
+
}
|
|
323
|
+
}, {
|
|
324
|
+
"method": "catFocus",
|
|
325
|
+
"name": "catFocus",
|
|
326
|
+
"bubbles": true,
|
|
327
|
+
"cancelable": true,
|
|
328
|
+
"composed": true,
|
|
329
|
+
"docs": {
|
|
330
|
+
"tags": [],
|
|
331
|
+
"text": "Emitted when the textarea received focus."
|
|
332
|
+
},
|
|
333
|
+
"complexType": {
|
|
334
|
+
"original": "FocusEvent",
|
|
335
|
+
"resolved": "FocusEvent",
|
|
336
|
+
"references": {
|
|
337
|
+
"FocusEvent": {
|
|
338
|
+
"location": "global"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}, {
|
|
343
|
+
"method": "catBlur",
|
|
344
|
+
"name": "catBlur",
|
|
345
|
+
"bubbles": true,
|
|
346
|
+
"cancelable": true,
|
|
347
|
+
"composed": true,
|
|
348
|
+
"docs": {
|
|
349
|
+
"tags": [],
|
|
350
|
+
"text": "Emitted when the textarea loses focus."
|
|
351
|
+
},
|
|
352
|
+
"complexType": {
|
|
353
|
+
"original": "FocusEvent",
|
|
354
|
+
"resolved": "FocusEvent",
|
|
355
|
+
"references": {
|
|
356
|
+
"FocusEvent": {
|
|
357
|
+
"location": "global"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}]; }
|
|
362
|
+
static get methods() { return {
|
|
363
|
+
"setFocus": {
|
|
364
|
+
"complexType": {
|
|
365
|
+
"signature": "(options?: FocusOptions | undefined) => Promise<void>",
|
|
366
|
+
"parameters": [{
|
|
367
|
+
"tags": [{
|
|
368
|
+
"name": "param",
|
|
369
|
+
"text": "options An optional object providing options to control aspects of\nthe focusing process."
|
|
370
|
+
}],
|
|
371
|
+
"text": "An optional object providing options to control aspects of\nthe focusing process."
|
|
372
|
+
}],
|
|
373
|
+
"references": {
|
|
374
|
+
"Promise": {
|
|
375
|
+
"location": "global"
|
|
376
|
+
},
|
|
377
|
+
"FocusOptions": {
|
|
378
|
+
"location": "global"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"return": "Promise<void>"
|
|
382
|
+
},
|
|
383
|
+
"docs": {
|
|
384
|
+
"text": "Sets focus on the textarea. Use this method instead of `textarea.focus()`.",
|
|
385
|
+
"tags": [{
|
|
386
|
+
"name": "param",
|
|
387
|
+
"text": "options An optional object providing options to control aspects of\nthe focusing process."
|
|
388
|
+
}]
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}; }
|
|
392
|
+
}
|
|
393
|
+
//# sourceMappingURL=cat-textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cat-textarea.js","sourceRoot":"","sources":["../../../src/components/cat-textarea/cat-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,Q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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport log from 'loglevel';\nimport autosize from 'autosize';\n\nlet nextUniqueId = 0;\n\n/**\n * Textarea specifies a control that allows user to write text over multiple\n * rows. Used when the expected user input is long. For shorter input, use the\n * input component.\n *\n * @part label - The label content.\n */\n@Component({\n tag: 'cat-textarea',\n styleUrl: 'cat-textarea.scss',\n shadow: true\n})\nexport class CatTextarea {\n private readonly id = `cat-textarea-${nextUniqueId++}`;\n private textarea!: HTMLTextAreaElement;\n\n /**\n * Whether the textarea is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text to be displayed with the textarea.\n */\n @Prop() hint?: string;\n\n /**\n * The label for the textarea.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * A minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name = '';\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Specifies the initial number of lines in the textarea.\n */\n @Prop() rows = 3;\n\n /**\n * The initial value of the control.\n */\n @Prop() value?: string | number;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the textarea received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the textarea loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentWillRender(): void {\n if (!this.label) {\n log.error('[A11y] Missing ARIA label on textarea', this);\n }\n }\n\n componentDidLoad(): void {\n autosize(this.textarea);\n }\n\n /**\n * Sets focus on the textarea. Use this method instead of `textarea.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async setFocus(options?: FocusOptions): Promise<void> {\n this.textarea.focus(options);\n }\n\n // /**\n // * Clear the input.\n // */\n // @Method()\n // async clear(): Promise<void> {\n // this.inputValue = '';\n // }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label htmlFor={this.id} class={{ hidden: this.labelHidden }}>\n <span part=\"label\">\n {this.label}\n {!this.required && (\n <span class=\"input-optional\" aria-hidden=\"true\">\n (Optional)\n </span>\n )}\n </span>\n </label>\n )}\n <textarea\n ref={el => (this.textarea = el as HTMLTextAreaElement)}\n id={this.id}\n disabled={this.disabled}\n maxlength={this.maxLength}\n minlength={this.minLength}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n rows={this.rows}\n value={this.value}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n ></textarea>\n {this.hint && <p class=\"input-hint\">{this.hint}</p>}\n </Host>\n );\n }\n\n private onInput(event: Event) {\n // this.inputValue = πthis.input.value;\n this.catChange.emit(event);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n"]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated file. Do not edit directly.
|
|
3
|
+
*/
|
|
4
|
+
/* stylelint-disable value-keyword-case */
|
|
5
|
+
/* stylelint-enable value-keyword-case */
|
|
6
|
+
:host {
|
|
7
|
+
display: flex;
|
|
8
|
+
margin-bottom: 1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([hidden]) {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
label {
|
|
16
|
+
flex: 0 1 auto;
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: 0.5rem;
|
|
19
|
+
font-size: 0.9375rem;
|
|
20
|
+
line-height: 1.25rem;
|
|
21
|
+
/* stylelint-disable property-no-vendor-prefix */
|
|
22
|
+
-webkit-user-select: none;
|
|
23
|
+
-ms-user-select: none;
|
|
24
|
+
user-select: none;
|
|
25
|
+
/* stylelint-enable property-no-vendor-prefix */
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
input {
|
|
30
|
+
position: absolute !important;
|
|
31
|
+
width: 1px !important;
|
|
32
|
+
height: 1px !important;
|
|
33
|
+
padding: 0 !important;
|
|
34
|
+
margin: -1px !important;
|
|
35
|
+
overflow: hidden !important;
|
|
36
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
37
|
+
white-space: nowrap !important;
|
|
38
|
+
border: 0 !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.toggle {
|
|
42
|
+
flex: 0 0 auto;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
position: relative;
|
|
47
|
+
width: 2rem;
|
|
48
|
+
height: 1.25rem;
|
|
49
|
+
border-radius: 10rem;
|
|
50
|
+
background-color: #d7dbe0;
|
|
51
|
+
transition: background-color 0.13s ease;
|
|
52
|
+
}
|
|
53
|
+
:checked + .toggle {
|
|
54
|
+
background-color: rgb(var(--cat-primary-bg, 32, 127, 138));
|
|
55
|
+
}
|
|
56
|
+
:focus-visible + .toggle {
|
|
57
|
+
outline: 2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));
|
|
58
|
+
outline-offset: 1px;
|
|
59
|
+
}
|
|
60
|
+
.toggle::after {
|
|
61
|
+
content: "";
|
|
62
|
+
position: absolute;
|
|
63
|
+
width: 1rem;
|
|
64
|
+
height: 1rem;
|
|
65
|
+
background: #fff;
|
|
66
|
+
border-radius: 10rem;
|
|
67
|
+
transform: translateX(calc(2px - 0.5rem));
|
|
68
|
+
transition: transform 0.13s linear;
|
|
69
|
+
box-shadow: 0 1px 4px 0 rgba(16, 29, 48, 0.2);
|
|
70
|
+
}
|
|
71
|
+
:checked + .toggle::after {
|
|
72
|
+
transform: translateX(calc(-2px + 0.5rem));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.label {
|
|
76
|
+
flex: 1 1 auto;
|
|
77
|
+
}
|
|
78
|
+
.is-hidden .label {
|
|
79
|
+
position: absolute !important;
|
|
80
|
+
width: 1px !important;
|
|
81
|
+
height: 1px !important;
|
|
82
|
+
padding: 0 !important;
|
|
83
|
+
margin: -1px !important;
|
|
84
|
+
overflow: hidden !important;
|
|
85
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
86
|
+
white-space: nowrap !important;
|
|
87
|
+
border: 0 !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.is-disabled {
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
color: rgb(var(--cat-font-color-muted, 105, 118, 135));
|
|
93
|
+
}
|