├── .editorconfig ├── .github ├── CONTRIBUTING.md └── ISSUE_TEMPLATE.md ├── .gitignore ├── LICENSE ├── dist ├── collection │ ├── collection-manifest.json │ ├── components │ │ └── gradient-button │ │ │ ├── gradient-button.css │ │ │ ├── gradient-button.js │ │ │ └── gradient-button.scss │ ├── index.js │ └── utils │ │ ├── input-interfaces.js │ │ └── theme.js ├── gradient-button.js ├── gradient-button │ ├── gradient-button.ivlso8l8.js │ ├── gradient-button.licboyut.js │ ├── ugyrbps6.es5.js │ ├── ugyrbps6.js │ ├── ugyrbps6.sc.es5.js │ └── ugyrbps6.sc.js └── types │ ├── components.d.ts │ ├── components │ ├── gradient-button-two │ │ └── gradient-button-two.d.ts │ └── gradient-button │ │ └── gradient-button.d.ts │ ├── index.d.ts │ ├── stencil.core.d.ts │ └── utils │ ├── input-interfaces.d.ts │ └── theme.d.ts ├── package-lock.json ├── package.json ├── readme.md ├── src ├── components.d.ts ├── components │ └── gradient-button │ │ ├── gradient-button.scss │ │ └── gradient-button.tsx ├── globals │ ├── _colors.scss │ ├── _mixins.scss │ └── _variables.scss ├── index.html ├── index.ts └── utils │ ├── input-interfaces.ts │ └── theme.ts ├── stencil.config.js └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.md] 14 | insert_final_newline = false 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Thanks for your interest in contributing to the Stencil Component Starter! :tada: 4 | 5 | 6 | ## Contributing Etiquette 7 | 8 | Please see our [Contributor Code of Conduct](https://github.com/ionic-team/stencil/blob/master/CODE_OF_CONDUCT.md) for information on our rules of conduct. 9 | 10 | 11 | ## Creating an Issue 12 | 13 | * If you have a question about using Stencil, please ask in the [Stencil Worldwide Slack](https://join.slack.com/t/stencil-worldwide/shared_invite/enQtMjQ2MzkyMTY0MTk0LTQ4ODgzYjFjNjdkNDY3YWVhMmNlMTljMWQxNTM3Yjg0ZTIyZTM1MmU2YWE5YzNjNzE1MmQ3ZTk2NjQ1YzM5ZDM group. 14 | 15 | * It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable. 16 | 17 | * The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately. 18 | 19 | * Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs reply" and receives no further replies from the author of the issue for more than 5 days, it will be closed. 20 | 21 | * If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/ionic-team/stencil/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution. 22 | 23 | * Next, [create a new issue](https://github.com/ionic-team/stencil-component-starter/issues/new) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue. 24 | 25 | 26 | ## Creating a Pull Request 27 | 28 | * We appreciate you taking the time to contribute! Before submitting a pull request, we ask that you please [create an issue](#creating-an-issue) that explains the bug or feature request and let us know that you plan on creating a pull request for it. If an issue already exists, please comment on that issue letting us know you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort. 29 | 30 | * Looking for an issue to fix? Make sure to look through our issues with the [help wanted](https://github.com/ionic-team/stencil-component-starter/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label! 31 | 32 | ### Setup 33 | 34 | 1. Fork the repo. 35 | 2. Clone your fork. 36 | 3. Make a branch for your change. 37 | 4. Run `npm install` (make sure you have [node](https://nodejs.org/en/) and [npm](http://blog.npmjs.org/post/85484771375/how-to-install-npm) installed first) 38 | 39 | 40 | #### Updates 41 | 42 | 1. Unit test. Unit test. Unit test. Please take a look at how other unit tests are written, and you can't write too many tests. 43 | 2. If there is a `*.spec.ts` file located in the components folder, update it to include a test for your change, if needed. If this file doesn't exist, please notify us. 44 | 3. Run `npm run test` or `npm run test.watch` to make sure all tests are working, regardless if a test was added. 45 | 46 | 47 | ## Commit Message Format 48 | 49 | We have very precise rules over how our git commit messages should be formatted. This leads to readable messages that are easy to follow when looking through the project history. We also use the git commit messages to generate our changelog. (Ok you got us, it's basically Angular's commit message format). 50 | 51 | `type(scope): subject` 52 | 53 | #### Type 54 | Must be one of the following: 55 | 56 | * **feat**: A new feature 57 | * **fix**: A bug fix 58 | * **docs**: Documentation only changes 59 | * **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) 60 | * **refactor**: A code change that neither fixes a bug nor adds a feature 61 | * **perf**: A code change that improves performance 62 | * **test**: Adding missing tests 63 | * **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation 64 | 65 | #### Scope 66 | The scope can be anything specifying place of the commit change. For example `renderer`, `compiler`, etc. 67 | 68 | #### Subject 69 | The subject contains succinct description of the change: 70 | 71 | * use the imperative, present tense: "change" not "changed" nor "changes" 72 | * do not capitalize first letter 73 | * do not place a period `.` at the end 74 | * entire length of the commit message must not go over 50 characters 75 | * describe what the commit does, not what issue it relates to or fixes 76 | * **be brief, yet descriptive** - we should have a good understanding of what the commit does by reading the subject 77 | 78 | 79 | #### Adding Documentation 80 | 81 | Please see the [stencil-site](https://github.com/ionic-team/stencil-site) repo to update documentation. 82 | 83 | 84 | ## License 85 | 86 | By contributing your code to the ionic-team/stencil GitHub Repository, you agree to license your contribution under the MIT license. 87 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Resources:** 2 | Before submitting an issue, please consult our [docs](https://stenciljs.com/). 3 | 4 | **Stencil version:** (run `npm list @stencil/core` from a terminal/cmd prompt and paste output below): 5 | 6 | ``` 7 | insert the output from npm list @stencil/core here 8 | ``` 9 | 10 | **I'm submitting a ...** (check one with "x") 11 | [ ] bug report 12 | [ ] feature request 13 | [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com 14 | 15 | **Current behavior:** 16 | 17 | 18 | **Expected behavior:** 19 | 20 | 21 | **Steps to reproduce:** 22 | 24 | 25 | **Related code:** 26 | 27 | ``` 28 | insert any relevant code here 29 | ``` 30 | 31 | **Other information:** 32 | 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | www/ 2 | 3 | *~ 4 | *.sw[mnpcod] 5 | *.log 6 | *.lock 7 | *.tmp 8 | *.tmp.* 9 | log.txt 10 | *.sublime-project 11 | *.sublime-workspace 12 | 13 | .idea/ 14 | .vscode/ 15 | .sass-cache/ 16 | .versions/ 17 | node_modules/ 18 | $RECYCLE.BIN/ 19 | 20 | .DS_Store 21 | Thumbs.db 22 | UserInterfaceState.xcuserstate 23 | .env 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Ionic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /dist/collection/collection-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "components": [ 3 | { 4 | "tag": "codext-gradient-button", 5 | "dependencies": [], 6 | "componentClass": "GradientButton", 7 | "componentPath": "components/gradient-button/gradient-button.js", 8 | "styles": { 9 | "$": { 10 | "stylePaths": [ 11 | "components/gradient-button/gradient-button.scss" 12 | ] 13 | } 14 | }, 15 | "props": [ 16 | { 17 | "name": "color", 18 | "type": "String" 19 | }, 20 | { 21 | "name": "disabled", 22 | "type": "Boolean" 23 | }, 24 | { 25 | "name": "expand" 26 | }, 27 | { 28 | "name": "fill" 29 | }, 30 | { 31 | "name": "href", 32 | "type": "String" 33 | }, 34 | { 35 | "name": "round", 36 | "type": "Boolean" 37 | }, 38 | { 39 | "name": "size" 40 | }, 41 | { 42 | "name": "strong", 43 | "type": "Boolean" 44 | }, 45 | { 46 | "name": "type", 47 | "type": "String" 48 | } 49 | ], 50 | "states": [ 51 | { 52 | "name": "keyFocus" 53 | } 54 | ], 55 | "hostElement": { 56 | "name": "el" 57 | }, 58 | "events": [ 59 | { 60 | "event": "ionBlur" 61 | }, 62 | { 63 | "event": "ionFocus" 64 | } 65 | ], 66 | "shadow": true 67 | } 68 | ], 69 | "collections": [], 70 | "compiler": { 71 | "name": "@stencil/core", 72 | "version": "0.6.18", 73 | "typescriptVersion": "2.7.2" 74 | }, 75 | "bundles": [] 76 | } -------------------------------------------------------------------------------- /dist/collection/components/gradient-button/gradient-button.css: -------------------------------------------------------------------------------- 1 | /* Ripple Out */ 2 | @-webkit-keyframes gradient-button-ripple-out { 3 | 100% { 4 | top: -12px; 5 | right: -12px; 6 | bottom: -12px; 7 | left: -12px; 8 | opacity: 0; } } 9 | 10 | @keyframes gradient-button-ripple-out { 11 | 100% { 12 | top: -12px; 13 | right: -12px; 14 | bottom: -12px; 15 | left: -12px; 16 | opacity: 0; } } 17 | 18 | .gradient-button { 19 | text-align: center; 20 | -moz-appearance: none; 21 | -ms-appearance: none; 22 | -webkit-appearance: none; 23 | appearance: none; 24 | position: relative; 25 | display: inline-block; 26 | border: 0; 27 | cursor: pointer; 28 | vertical-align: top; 29 | vertical-align: -webkit-baseline-middle; 30 | transition: background-color, opacity 100ms linear; 31 | font-kerning: none; 32 | user-select: none; 33 | font-smoothing: antialiased; 34 | -webkit-font-smoothing: antialiased; 35 | font-size: 13px; 36 | font-weight: 700; 37 | text-transform: uppercase; 38 | line-height: 1; 39 | text-decoration: none; 40 | text-overflow: ellipsis; 41 | white-space: nowrap; 42 | margin: 0 0 15px; 43 | padding: 15px 20px; 44 | transition: all linear 0.1s; 45 | color: white; 46 | text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); 47 | border-radius: 7px; 48 | background: linear-gradient(to right, #2b4b62, #4b7078); 49 | transform-style: preserve-3d; 50 | -webkit-tap-highlight-color: transparent; 51 | -webkit-tap-highlight-color: transparent; } 52 | .gradient-button .button-inner { 53 | display: flex; 54 | flex-flow: row nowrap; 55 | flex-shrink: 0; 56 | align-items: center; 57 | justify-content: center; 58 | width: 100%; 59 | height: 100%; } 60 | .gradient-button[disabled] { 61 | cursor: default; 62 | pointer-events: none; 63 | opacity: .6; } 64 | .gradient-button[disabled] > .gradient-button--shadow { 65 | display: none; } 66 | .gradient-button:focus { 67 | outline: none; } 68 | .gradient-button:active { 69 | outline: none; 70 | transform: translateY(3px); } 71 | .gradient-button:active > .gradient-button--shadow { 72 | transform: perspective(100px) rotateX(60deg) translateY(-5px); } 73 | .gradient-button:hover { 74 | box-shadow: inset 0 0 0 50px rgba(0, 0, 0, 0.1); } 75 | .gradient-button .gradient-button--shadow { 76 | border-radius: 5px; 77 | transition: all ease 0.2s; 78 | position: absolute; 79 | left: 15px; 80 | bottom: -10px; 81 | margin: 0 auto; 82 | height: 20px; 83 | width: calc(100% - 30px); 84 | z-index: -1; 85 | filter: blur(8px); 86 | transform: perspective(100px) rotateX(60deg); 87 | background: linear-gradient(to right, #2b4b62, #4b7078); } 88 | .gradient-button.large { 89 | padding: 5px 20px; 90 | height: 2.8em; 91 | font-size: 20px; } 92 | .gradient-button.small { 93 | height: 2.1em; 94 | font-size: 13px; } 95 | .gradient-button.block { 96 | display: block; 97 | clear: both; 98 | width: 100%; } 99 | .gradient-button.block::after { 100 | clear: both; } 101 | .gradient-button.full { 102 | display: block; 103 | width: 100%; } 104 | .gradient-button.full .gradient-button--shadow { 105 | transform: perspective(500px) rotateX(45deg); } 106 | .gradient-button.full:active { 107 | outline: none; 108 | transform: translateY(3px); } 109 | .gradient-button.full:active > .gradient-button--shadow { 110 | transform: perspective(500px) rotateX(45deg) translateY(-5px); } 111 | .gradient-button .button-full.button-outline { 112 | border-radius: 0; 113 | border-right-width: 0; 114 | border-left-width: 0; } 115 | .gradient-button ion-icon { 116 | font-size: 1.4em; 117 | pointer-events: none; } 118 | .gradient-button ion-icon[slot="start"] { 119 | margin: 0 -0.3em 0 0.3em; } 120 | .gradient-button ion-icon[slot="end"] { 121 | margin: 0 0.3em 0 -0.2em; } 122 | .gradient-button ion-icon[slot="icon-only"] { 123 | font-size: 1.8em; } 124 | .gradient-button.strong { 125 | font-weight: bold; 126 | text-transform: uppercase; } 127 | .gradient-button.round { 128 | border-radius: 50vw; } 129 | -------------------------------------------------------------------------------- /dist/collection/components/gradient-button/gradient-button.js: -------------------------------------------------------------------------------- 1 | import { getElementClassMap, openURL } from '../../utils/theme'; 2 | export class GradientButton { 3 | constructor() { 4 | /** 5 | * The type of the button. 6 | * Possible values are: `"submit"`, `"reset"` and `"button"`. 7 | * Default value is: `"button"` 8 | */ 9 | this.type = 'button'; 10 | /** 11 | * If true, the user cannot interact with the button. Defaults to `false`. 12 | */ 13 | this.disabled = false; 14 | /** 15 | * Set to `"clear"` for a transparent button, to `"outline"` for a transparent 16 | * button with a border, or to `"solid"`. The default style is `"solid"` except inside of 17 | * a toolbar, where the default is `"clear"`. 18 | */ 19 | this.fill = 'default'; 20 | /** 21 | * If true, activates a button with rounded corners. 22 | */ 23 | this.round = false; 24 | /** 25 | * If true, activates a button with a heavier font weight. 26 | */ 27 | this.strong = false; 28 | // Default Colors 29 | this.darkblue = { start: '#2b4b62', end: '#4b7078' }; 30 | this.green = { start: '#3dab64', end: '#8ed67d' }; 31 | this.pink = { start: '#f96b90', end: '#f67cb5' }; 32 | this.blue = { start: '#43afce', end: '#48c3d3' }; 33 | } 34 | onFocus() { 35 | this.ionFocus.emit(); 36 | } 37 | onKeyUp() { 38 | this.keyFocus = true; 39 | } 40 | onBlur() { 41 | this.keyFocus = false; 42 | this.ionBlur.emit(); 43 | } 44 | componentWillLoad() { 45 | if (this.color == 'darkblue') { 46 | this.selectedColor = this.darkblue; 47 | } 48 | else if (this.color == 'green') { 49 | this.selectedColor = this.green; 50 | } 51 | else if (this.color == 'pink') { 52 | this.selectedColor = this.pink; 53 | } 54 | else if (this.color == 'blue') { 55 | this.selectedColor = this.blue; 56 | } 57 | this.backgroundColor = { 58 | background: 'linear-gradient(to right, ' + this.selectedColor.start + ', ' + this.selectedColor.end + ')' 59 | }; 60 | } 61 | render() { 62 | const { expand, round, size, strong } = this; 63 | const TagType = this.href ? 'a' : 'button'; 64 | const buttonClasses = Object.assign({}, getButtonTypeClassMap(expand), getButtonTypeClassMap(size), getButtonTypeClassMap(round ? 'round' : null), getButtonTypeClassMap(strong ? 'strong' : null), { 'gradient-button': true }, getElementClassMap(this.el.classList), { 'focused': this.keyFocus }); 65 | const attrs = (TagType === 'button') 66 | ? { type: this.type } 67 | : { href: this.href }; 68 | return (h(TagType, Object.assign({}, attrs, { class: buttonClasses, disabled: this.disabled, onFocus: this.onFocus.bind(this), onKeyUp: this.onKeyUp.bind(this), onClick: (ev) => openURL(this.href, ev), onBlur: this.onBlur.bind(this), style: this.backgroundColor }), 69 | h("div", { class: "gradient-button--shadow", style: this.backgroundColor }), 70 | h("span", { class: 'button-inner' }, 71 | h("slot", { name: 'icon-only' }), 72 | h("slot", { name: 'start' }), 73 | h("span", { class: 'button-text' }, 74 | h("slot", null)), 75 | h("slot", { name: 'end' })))); 76 | } 77 | static get is() { return "codext-gradient-button"; } 78 | static get encapsulation() { return "shadow"; } 79 | static get properties() { return { "color": { "type": String, "attr": "color" }, "disabled": { "type": Boolean, "attr": "disabled" }, "el": { "elementRef": true }, "expand": { "type": "Any", "attr": "expand" }, "fill": { "type": "Any", "attr": "fill" }, "href": { "type": String, "attr": "href" }, "keyFocus": { "state": true }, "round": { "type": Boolean, "attr": "round" }, "size": { "type": "Any", "attr": "size" }, "strong": { "type": Boolean, "attr": "strong" }, "type": { "type": String, "attr": "type" } }; } 80 | static get events() { return [{ "name": "ionFocus", "method": "ionFocus", "bubbles": true, "cancelable": true, "composed": true }, { "name": "ionBlur", "method": "ionBlur", "bubbles": true, "cancelable": true, "composed": true }]; } 81 | static get style() { return "/**style-placeholder:codext-gradient-button:**/"; } 82 | } 83 | /** 84 | * Get the classes based on the type 85 | * e.g. block, full, round, large 86 | */ 87 | function getButtonTypeClassMap(type) { 88 | if (!type) { 89 | return {}; 90 | } 91 | type = type.toLocaleLowerCase(); 92 | return { 93 | [`${type}`]: true 94 | }; 95 | } 96 | -------------------------------------------------------------------------------- /dist/collection/components/gradient-button/gradient-button.scss: -------------------------------------------------------------------------------- 1 | .gradient-button { 2 | @include text-align(center); 3 | @include appearance(none); 4 | position: relative; 5 | display: inline-block; 6 | border: 0; 7 | cursor: pointer; 8 | vertical-align: top; 9 | vertical-align: -webkit-baseline-middle; 10 | transition: background-color, opacity 100ms linear; 11 | font-kerning: none; 12 | user-select: none; 13 | font-smoothing: antialiased; 14 | -webkit-font-smoothing: antialiased; 15 | 16 | 17 | font-size: 13px; 18 | font-weight: 700; 19 | text-transform: uppercase; 20 | line-height: 1; 21 | text-decoration: none; 22 | text-overflow: ellipsis; 23 | 24 | 25 | white-space: nowrap; 26 | margin: 0 0 15px; 27 | padding: 15px 20px; 28 | transition: all linear 0.1s; 29 | color: white; 30 | text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); 31 | border-radius: 7px; 32 | background: linear-gradient(to right, #2b4b62, #4b7078); 33 | transform-style: preserve-3d; 34 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 35 | -webkit-tap-highlight-color: transparent; 36 | .button-inner { 37 | display: flex; 38 | flex-flow: row nowrap; 39 | flex-shrink: 0; 40 | align-items: center; 41 | justify-content: center; 42 | width: 100%; 43 | height: 100%; 44 | } 45 | &[disabled] { 46 | cursor: default; 47 | pointer-events: none; 48 | opacity: .6; 49 | >.gradient-button--shadow { 50 | display: none; 51 | } 52 | } 53 | &:focus { 54 | outline: none; 55 | } 56 | &:active { 57 | outline: none; 58 | transform: translateY(3px); 59 | >.gradient-button--shadow { 60 | transform: perspective( 100px) rotateX( 60deg) translateY(-5px); 61 | } 62 | } 63 | &:hover { 64 | box-shadow: inset 0 0 0 50px rgba(0, 0, 0, 0.1); 65 | } 66 | .gradient-button--shadow { 67 | border-radius: 5px; 68 | transition: all ease 0.2s; 69 | position: absolute; 70 | left: 15px; 71 | bottom: -10px; 72 | margin: 0 auto; 73 | height: 20px; 74 | width: calc(100% - 30px); 75 | z-index: -1; 76 | filter: blur(8px); 77 | transform: perspective( 100px) rotateX( 60deg); 78 | background: linear-gradient(to right, #2b4b62, #4b7078); 79 | } 80 | 81 | // Button Sizes 82 | // -------------------------------------------------- 83 | &.large { 84 | padding: 5px 20px; 85 | height: 2.8em; 86 | font-size: 20px; 87 | } 88 | &.small { 89 | height: 2.1em; 90 | font-size: 13px; 91 | } 92 | 93 | // Block Button 94 | // -------------------------------------------------- 95 | &.block { 96 | display: block; 97 | clear: both; 98 | width: 100%; 99 | } 100 | &.block::after { 101 | clear: both; 102 | } 103 | 104 | // Full Button 105 | // -------------------------------------------------- 106 | &.full { 107 | display: block; 108 | width: 100%; 109 | .gradient-button--shadow { 110 | transform: perspective(500px) rotateX(45deg); 111 | } 112 | &:active { 113 | outline: none; 114 | transform: translateY(3px); 115 | >.gradient-button--shadow { 116 | transform: perspective(500px) rotateX(45deg) translateY(-5px); 117 | } 118 | } 119 | } 120 | 121 | // Full Outline Button 122 | // -------------------------------------------------- 123 | .button-full.button-outline { 124 | @include border-radius(0); 125 | border-right-width: 0; 126 | border-left-width: 0; 127 | } 128 | 129 | // Button Icons 130 | // -------------------------------------------------- 131 | & ion-icon { 132 | font-size: 1.4em; 133 | pointer-events: none; 134 | } 135 | & ion-icon[slot="start"] { 136 | @include margin(0, .3em, 0, -.3em); 137 | } 138 | & ion-icon[slot="end"] { 139 | @include margin(0, -.2em, 0, .3em); 140 | } 141 | & ion-icon[slot="icon-only"] { 142 | font-size: 1.8em; 143 | } 144 | 145 | // Strong 146 | &.strong { 147 | font-weight: bold; 148 | text-transform: uppercase; 149 | } 150 | 151 | // Roung 152 | &.round { 153 | border-radius: 50vw; 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /dist/collection/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codextde/stencil-components/129aac7d3fefd4a1d7fca140f629c6530ff05b54/dist/collection/index.js -------------------------------------------------------------------------------- /dist/collection/utils/input-interfaces.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codextde/stencil-components/129aac7d3fefd4a1d7fca140f629c6530ff05b54/dist/collection/utils/input-interfaces.js -------------------------------------------------------------------------------- /dist/collection/utils/theme.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Create the mode and color classes for the component based on the classes passed in 3 | */ 4 | export function createThemedClasses(mode, color, classes) { 5 | const classObj = {}; 6 | return classes.split(' ') 7 | .reduce((classObj, classString) => { 8 | classObj[classString] = true; 9 | if (mode) { 10 | classObj[`${classString}-${mode}`] = true; 11 | if (color) { 12 | classObj[`${classString}-${color}`] = true; 13 | classObj[`${classString}-${mode}-${color}`] = true; 14 | } 15 | } 16 | return classObj; 17 | }, classObj); 18 | } 19 | /** 20 | * Get the classes from a class list and return them as an object 21 | */ 22 | export function getElementClassMap(classList) { 23 | const classObj = {}; 24 | for (let i = 0; i < classList.length; i++) { 25 | classObj[classList[i]] = true; 26 | } 27 | return classObj; 28 | } 29 | /** 30 | * Get the classes based on the button type 31 | * e.g. alert-button, action-sheet-button 32 | */ 33 | export function getButtonClassMap(buttonType, mode) { 34 | if (!buttonType) { 35 | return {}; 36 | } 37 | return { 38 | [buttonType]: true, 39 | [`${buttonType}-${mode}`]: true 40 | }; 41 | } 42 | export function getClassMap(classes) { 43 | const map = {}; 44 | if (classes) { 45 | classes 46 | .split(' ') 47 | .filter(c => c.trim() !== '') 48 | .forEach(c => map[c] = true); 49 | } 50 | return map; 51 | } 52 | export function openURL(url, ev, isPop = false) { 53 | if (url && url[0] !== '#' && url.indexOf('://') === -1) { 54 | const router = document.querySelector('ion-router'); 55 | if (router) { 56 | ev && ev.preventDefault(); 57 | return router.componentOnReady().then(() => router.push(url, isPop)); 58 | } 59 | } 60 | return Promise.resolve(); 61 | } 62 | -------------------------------------------------------------------------------- /dist/gradient-button.js: -------------------------------------------------------------------------------- 1 | /*! Built with http://stenciljs.com */ 2 | !function(t,e,n,i,r,o,s,u,c,d,a){!function(t,e,n,i,r,o,s,u,c,d,a,l,p){(t.GradientButton=t.GradientButton||{}).components=a,(p=a.filter(function(t){return t[2]}).map(function(t){return t[0]})).length&&((l=e.createElement("style")).innerHTML=p.join()+"{visibility:hidden}.hydrated{visibility:inherit}",l.setAttribute("data-styles",""),e.head.insertBefore(l,e.head.firstChild)),(l=n[n.length-1])&&l.src&&(o=(p=l.src.split("/").slice(0,-1)).join("/")+(p.length?"/":"")+"gradient-button/"),(l=e.createElement("script")).src=o+(function(t,e,n,i){return e.search.indexOf("core=es5")>-1||"file:"===e.protocol||!t.customElements||!t.fetch||!(t.CSS&&t.CSS.supports&&t.CSS.supports("color","var(--c)"))||!("noModule"in n)||function(t){try{return new Function('import("")'),!1}catch(t){}return!0}()}(t,t.location,l)?"gradient-button.ivlso8l8.js":"gradient-button.licboyut.js"),l.setAttribute("data-path",o),l.setAttribute("data-namespace","gradient-button"),e.head.appendChild(l)}(t,e,e.scripts,0,0,"/build/gradient-button/",0,0,0,0,[["codext-gradient-button","ugyrbps6",1,[["color",1,1,2],["disabled",1,1,3],["el",7],["expand",1],["fill",1],["href",1,1,2],["keyFocus",5],["round",1,1,3],["size",1],["strong",1,1,3],["type",1,1,2]],1]],void 0)}(window,document); -------------------------------------------------------------------------------- /dist/gradient-button/gradient-button.ivlso8l8.js: -------------------------------------------------------------------------------- 1 | /*! 2 | template 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | (function(){var e="undefined"===typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var a=Document.prototype.importNode;Document.prototype.importNode=function(){var c=a.apply(this,arguments);if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var f=this.createDocumentFragment();f.appendChild(c);return f}return c}}();var g=Node.prototype.cloneNode,t=Document.prototype.createElement,u=Document.prototype.importNode,l=function(){if(!e){var a=document.createElement("template"),c=document.createElement("template"); 11 | c.content.appendChild(document.createElement("div"));a.content.appendChild(c);a=a.cloneNode(!0);return 0===a.content.childNodes.length||0===a.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}(),b=function(){};if(e){var d=document.implementation.createHTMLDocument("template"),m=!0,n=document.createElement("style");n.textContent="template{display:none;}";var p=document.head;p.insertBefore(n,p.firstElementChild);b.prototype=Object.create(HTMLElement.prototype); 12 | var v=!document.createElement("div").hasOwnProperty("innerHTML");b.decorate=function(a){if(!a.content){a.content=d.createDocumentFragment();for(var c;c=a.firstChild;)a.content.appendChild(c);if(v)a.__proto__=b.prototype;else if(a.cloneNode=function(a){return b._cloneNode(this,a)},m)try{q(a),r(a)}catch(f){m=!1}b.bootstrap(a.content)}};var q=function(a){Object.defineProperty(a,"innerHTML",{get:function(){for(var a="",b=this.content.firstChild;b;b=b.nextSibling)a+=b.outerHTML||b.data.replace(w,x);return a}, 13 | set:function(a){d.body.innerHTML=a;for(b.bootstrap(d);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;d.body.firstChild;)this.content.appendChild(d.body.firstChild)},configurable:!0})},r=function(a){Object.defineProperty(a,"outerHTML",{get:function(){return""},set:function(a){if(this.parentNode){d.body.innerHTML=a;for(a=document.createDocumentFragment();d.body.firstChild;)a.appendChild(d.body.firstChild);this.parentNode.replaceChild(a, 14 | this)}else throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");},configurable:!0})};q(b.prototype);r(b.prototype);b.bootstrap=function(a){a=a.querySelectorAll("template");for(var c=0,f=a.length,d;c]/g, 15 | x=function(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case "\u00a0":return" "}}}if(e||l)b._cloneNode=function(a,b){var c=g.call(a,!1);this.decorate&&this.decorate(c);b&&(c.content.appendChild(g.call(a.content,!0)),this.fixClonedDom(c.content,a.content));return c},b.prototype.cloneNode=function(a){return b._cloneNode(this,a)},b.fixClonedDom=function(a,b){if(b.querySelectorAll)for(var c=b.querySelectorAll("template"),d=a.querySelectorAll("template"),e=0,g=d.length, 16 | h,k;e1)&&Zt(this)}}}),ot(u,h,{value:function(e){-1<_.call(a,e)&&o[h].apply(this,arguments)}}),o[d]&&ot(u,p,{value:o[d]}),o[v]&&ot(u,g,{value:o[v]}),i&&(f[c]=i),e=e.toUpperCase(),G[e]={constructor:t,create:i?[i,et(e)]:[e]},Z.set(t,e),n[s](e.toLowerCase(),f),en(e),Y[e].r()}function Gt(e){var t=G[e.toUpperCase()];return t&&t.constructor}function Yt(e){return typeof e=="string"?e:e&&e.is||""}function Zt(e){var t=e[h],n=t?e.attributes:j,r=n.length,i;while(r--)i=n[r],t.call(e,i.name||i.nodeName,null,i.value||i.nodeValue)}function en(e){return e=e.toUpperCase(),e in Y||(Y[e]={},Y[e].p=new K(function(t){Y[e].r=t})),Y[e].p}function tn(){X&&delete e.customElements,B(e,"customElements",{configurable:!0,value:new Kt}),B(e,"CustomElementRegistry",{configurable:!0,value:Kt});for(var t=function(t){var r=e[t];if(r){e[t]=function(t){var i,s;return t||(t=this),t[W]||(Q=!0,i=G[Z.get(t.constructor)],s=V&&i.create.length===1,t=s?Reflect.construct(r,j,i.constructor):n.createElement.apply(n,i.create),t[W]=!0,Q=!1,s||Zt(t)),t},e[t].prototype=r.prototype;try{r.prototype.constructor=e[t]}catch(i){z=!0,B(r,W,{value:e[t]})}}},r=i.get(/^HTML[A-Z]*[a-z]/),o=r.length;o--;t(r[o]));n.createElement=function(e,t){var n=Yt(t);return n?gt.call(this,e,et(n)):gt.call(this,e)},St||(Tt=!0,n[s](""))}var n=e.document,r=e.Object,i=function(e){var t=/^[A-Z]+[a-z]/,n=function(e){var t=[],n;for(n in s)e.test(n)&&t.push(n);return t},i=function(e,t){t=t.toLowerCase(),t in s||(s[e]=(s[e]||[]).concat(t),s[t]=s[t.toUpperCase()]=e)},s=(r.create||r)(null),o={},u,a,f,l;for(a in e)for(l in e[a]){f=e[a][l],s[l]=f;for(u=0;u>0),u="addEventListener",a="attached",f="Callback",l="detached",c="extends",h="attributeChanged"+f,p=a+f,d="connected"+f,v="disconnected"+f,m="created"+f,g=l+f,y="ADDITION",b="MODIFICATION",w="REMOVAL",E="DOMAttrModified",S="DOMContentLoaded",x="DOMSubtreeModified",T="<",N="=",C=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,k=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],L=[],A=[],O="",M=n.documentElement,_=L.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},D=r.prototype,P=D.hasOwnProperty,H=D.isPrototypeOf,B=r.defineProperty,j=[],F=r.getOwnPropertyDescriptor,I=r.getOwnPropertyNames,q=r.getPrototypeOf,R=r.setPrototypeOf,U=!!r.__proto__,z=!1,W="__dreCEv1",X=e.customElements,V=!/^force/.test(t.type)&&!!(X&&X.define&&X.get&&X.whenDefined),$=r.create||r,J=e.Map||function(){var t=[],n=[],r;return{get:function(e){return n[_.call(t,e)]},set:function(e,i){r=_.call(t,e),r<0?n[t.push(e)-1]=i:n[r]=i}}},K=e.Promise||function(e){function i(e){n=!0;while(t.length)t.shift()(e)}var t=[],n=!1,r={"catch":function(){return r},then:function(e){return t.push(e),n&&setTimeout(i,1),r}};return e(i),r},Q=!1,G=$(null),Y=$(null),Z=new J,et=function(e){return e.toLowerCase()},tt=r.create||function sn(e){return e?(sn.prototype=e,new sn):this},nt=R||(U?function(e,t){return e.__proto__=t,e}:I&&F?function(){function e(e,t){for(var n,r=I(t),i=0,s=r.length;i>>0;if("function"!==typeof c)throw new TypeError("predicate must be a function");for(var a=0;a>>0;if(0===n)return!1;var i,o,a=0|e,u=Math.max(0<=a?a:n-Math.abs(a),0);for(;ua?0:+a,b.length)===b}}); 38 | /*! 39 | String.prototype.endsWith 40 | */ 41 | String.prototype.endsWith||(String.prototype.endsWith=function(b,a){if(void 0===a||a>this.length)a=this.length;return this.substring(a-b.length,a)===b}); 42 | /*! 43 | * @overview es6-promise - a tiny implementation of Promises/A+. 44 | * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) 45 | * @license Licensed under MIT license 46 | * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE 47 | * @version 4.1.0+f046478d 48 | */ 49 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;tthis.status;this.statusText="statusText"in b?b.statusText:"OK";this.headers=new d(b.headers);this.url=b.url||"";this._initBody(a)}if(!e.fetch){var D="Symbol"in e&&"iterator"in Symbol,m;if(m="FileReader"in e&&"Blob"in e)try{new Blob,m=!0}catch(a){m=!1}var g={searchParams:"URLSearchParams"in e,iterable:D, 62 | blob:m,formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(g.arrayBuffer){var E="[object Int8Array];[object Uint8Array];[object Uint8ClampedArray];[object Int16Array];[object Uint16Array];[object Int32Array];[object Uint32Array];[object Float32Array];[object Float64Array]".split(";");var y=function(a){return a&&DataView.prototype.isPrototypeOf(a)};var z=ArrayBuffer.isView||function(a){return a&&-1-1&&r.splice(e,1),!r.length&&i.$initLoad()),n.u.delete(t))}function c(n,t,e){for(var r,i=!1,o=!1,u=arguments.length;u-- >2;)R.push(arguments[u]);for(;R.length;)if((e=R.pop())&&void 0!==e.pop)for(u=e.length;u--;)R.push(e[u]);else"boolean"==typeof e&&(e=null),(o="function"!=typeof n)&&(null==e?e="":"number"==typeof e?e=String(e):"string"!=typeof e&&(o=!1)),o&&i?r[r.length-1].f+=e:void 0===r?r=[o?a(e):e]:r.push(o?a(e):e),i=o;var f=new q;if(f.c=n,f.a=r,t&&(f.s=t,f.l=t.v,f.p=t.ref,t.className&&(t.class=t.className),"object"==typeof t.class)){for(u in t.class)t.class[u]&&R.push(u);t.class=R.join(" "),R.length=0}return f}function a(n){var t=new q;return t.f=n,t}function s(n,t){n.d.has(t)||(n.d.set(t,!0),n.m.add(function(){(function n(t,e,r,i,o){if(t.d.delete(e),!t.y.has(e)){i=t.b.get(e);var u=void 0;if(r=!i){if((o=t.u.get(e))&&!o.$rendered)return void(o.$onRender=o.$onRender||[]).push(function(){n(t,e)});i=function f(n,t,e,r,i,o){try{(function u(n,t,e,r,i,o){for(o in n.w.set(r,e),n.M.has(e)||n.M.set(e,{}),(i=Object.assign({color:{type:String}},t.properties)).mode={type:String},i)v(n,i[o],e,r,o)})(n,r=n.k(t).g,t,e=new r),function f(n,t,e){if(t){var r=n.w.get(e);t.forEach(function(t){e[t.method]={emit:function(e){n.j(r,t.name,{bubbles:t.bubbles,composed:t.composed,cancelable:t.cancelable,detail:e})}}})}}(n,r.events,e)}catch(r){e={},n.O(r,7,t,!0)}return n.b.set(t,e),e}(t,e);try{i.componentWillLoad&&(u=i.componentWillLoad())}catch(n){t.O(n,3,e)}}u&&u.then?u.then(function(){return l(t,e,i,r)}):l(t,e,i,r)}})(n,t)},n.C?1:3))}function l(n,t,e,r){(function i(n,t,e,r,o){try{var u=t.g.host;if(r.render||r.hostData||u){n.W=!0;var f=r.render&&r.render();n.W=!1;var a=n.N.get(e)||new q;a.T=e,n.N.set(e,n.render(a,c(null,void 0,f),o,n.S.get(e),n.x.get(e),t.g.encapsulation))}n.A(n,n.P,t,r.mode,e),e.$rendered=!0,e.$onRender&&(e.$onRender.forEach(function(n){return n()}),e.$onRender=null)}catch(t){n.W=!1,n.O(t,8,e,!0)}})(n,n.k(t),t,e,!r);try{r?t.$initLoad():w(n.N.get(t))}catch(e){n.O(e,6,t,!0)}}function v(n,t,e,r,i){if(t.type||t.state){var o=n.M.get(e);if(!t.state){if(t.attr&&(void 0===o[i]||""===o[i])){var f=n.P.L(e,t.attr);null!=f&&(o[i]=u(t.type,f))}e.hasOwnProperty(i)&&(void 0===o[i]&&(o[i]=e[i]),delete e[i])}r.hasOwnProperty(i)&&void 0===o[i]&&(o[i]=r[i]),t.watchCallbacks&&(o[B+i]=t.watchCallbacks.slice()),d(r,i,function c(t){return(t=n.M.get(n.w.get(this)))&&t[i]},function a(e,r){(r=n.w.get(this))&&(t.state||t.mutable)&&h(n,r,i,e)})}else t.elementRef&&p(r,i,e)}function h(n,t,e,r,i,o,u){(i=n.M.get(t))||n.M.set(t,i={}),r!==i[e]&&(i[e]=r,n.b.get(t)&&(i[B+e],!n.W&&t.$rendered&&s(n,t)))}function p(n,t,e){Object.defineProperty(n,t,{configurable:!0,value:e})}function d(n,t,e,r){Object.defineProperty(n,t,{configurable:!0,get:e,set:r})}function m(n,t,e,r,i){var o=11===e.T.nodeType&&e.T.host?e.T.host:e.T,u=t&&t.s||T,f=e.s||T;for(i in u)f&&null!=f[i]||null==u[i]||y(n,o,i,u[i],void 0,r);for(i in f)i in u&&f[i]===("value"===i||"checked"===i?o[i]:u[i])||y(n,o,i,u[i],f[i],r)}function y(n,t,e,r,i,o,u,f){if("class"!==e||o)if("style"===e){for(u in r=r||T,i=i||T,r)i[u]||(t.style[u]="");for(u in i)i[u]!==r[u]&&(t.style[u]=i[u])}else if("o"!==e[0]||"n"!==e[1]||e in t)if("list"!==e&&"type"!==e&&!o&&(e in t||-1!==["object","function"].indexOf(typeof i)&&null!==i)){var c=n.k(t);c&&c._&&c._[e]?b(t,e,i):"ref"!==e&&(b(t,e,null==i?"":i),null!=i&&!1!==i||t.removeAttribute(e))}else null!=i&&(u=e!==(e=e.replace(/^xlink\:?/,"")),1!==D[e]||i&&"false"!==i?"function"!=typeof i&&(u?t.setAttributeNS(I,L(e),i):t.setAttribute(e,i)):u?t.removeAttributeNS(I,L(e)):t.removeAttribute(e));else e=L(e.substring(2)),i?i!==r&&n.P.H(t,e,i):n.P.R(t,e);else if(r!==i){var a=null==r||""===r?S:r.trim().split(/\s+/),s=null==i||""===i?S:i.trim().split(/\s+/),l=null==t.className||""===t.className?S:t.className.trim().split(/\s+/);for(u=0,f=a.length;u-1||r.indexOf("var(")>-1){var i=n.createElement("style");return i.innerHTML=r,e.parentNode.insertBefore(i,e),t.rn(i).then(function(){e.parentNode.removeChild(e)})}return Promise.resolve()}).catch(function(n){})}var W="data-ssrv",E="data-ssrc",N="$",T={},S=[],x={enter:13,escape:27,space:32,tab:9,left:37,up:38,right:39,down:40},A=function(n){return void 0!==n&&null!==n},P=function(n){return void 0===n||null===n},L=function(n){return n.toLowerCase()},_=function(n){return L(n.replace(/([A-Z])/g,function(n){return" "+n[0]}).trim().replace(/ /g,"-"))},H=function(){},R=[],q=function q(){},B="wc-",D={allowfullscreen:1,async:1,autofocus:1,autoplay:1,checked:1,controls:1,disabled:1,enabled:1,formnovalidate:1,hidden:1,multiple:1,noresize:1,readonly:1,required:1,selected:1,spellcheck:1},I="http://www.w3.org/1999/xlink",F=!1,z=function z(){this.tn=null,this.Q=0,this.U=0,this.J=null,this.K=null,this.Z="",this.G="",this.V="",this.Y=!1,this.X="",this.type=0,this.nn=""},Q=function(){function n(n){this.in=n||null,this.on=null}return n.get=function(n){return n?n[rn]:null},n.set=function(n,t){return n[rn]=t,t},n}(),U="{",Z="}",G=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,J=/@import[^;]*;/gim,K=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,V=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,X=/^@[^\s]*keyframes/,Y=/\s+/g,nn="--",tn="@media",en="@",rn="__styleInfo",on=/@media\s(.*)/,un=function(){function n(n){var t;this.un=n,this.matchesSelector=(t=n.Element.prototype).matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.webkitMatchesSelector}return n.prototype.fn=function(n){if(n.cn)return n.cn;var t={},e={};return this.an(n,e)&&(t.properties=e,n.tn=null),t.G=n.Z,n.cn=t,t},n.prototype.an=function(n,t){var e=n.cn;if(!e){for(var r=void 0,i=n.Z,o=void 0,u=void 0;r=fn.exec(i);)"inherit"===(o=(r[2]||r[3]).trim())&&"unset"===o||(t[r[1].trim()]=o),u=!0;return u}if(e.properties)return Object.assign(t,e.properties),!0},n.prototype.sn=function(n){for(var t=Object.getOwnPropertyNames(n),e=0,r=void 0;e=0?this.vn(n,t):function n(t,e){var r=t.indexOf("var(");if(-1===r)return e(t,"","","");var i=function o(n,t){for(var e=0,r=t,i=n.length;r1&&(v=i.Kn(t,s[0]),e=s[1]),v){var p=o;(s=e.split(".")).length>1&&(e=s[0],p=function(n){n.keyCode===x[s[1]]&&o(n)}),a=i.Rn?{capture:!!u,passive:!!f}:!!u,n.Ln(v,e,p,a),h||r.set(t,h={}),h[l]=function(){v&&n._n(v,e,p,a),h[l]=null}}},R:function(n,t){var e=r.get(n);e&&(t?e[t]&&e[t]():Object.keys(e).forEach(function(n){e[n]&&e[n]()}))},Xn:function(n,t){return n.attachShadow(t)}};i.xn=!!i.Hn.attachShadow,"function"!=typeof t.CustomEvent&&(t.CustomEvent=function(n,t,r){return(r=e.createEvent("CustomEvent")).initCustomEvent(n,t.bubbles,t.cancelable,t.detail),r},t.CustomEvent.prototype=t.Event.prototype),i.Yn=function(n,e,r){return n&&n.dispatchEvent(new t.CustomEvent(e,r))};try{t.addEventListener("e",null,Object.defineProperty({},"passive",{get:function(){return i.Rn=!0}}))}catch(n){}return i.Vn=function(n,t){return(t=i.zn(n))&&11===i.q(t)?t.host:t},i}(T,r,i);e.isServer=e.isPrerender=!(e.isClient=!0),e.window=r,e.location=r.location,e.document=i,e.publicPath=a,e.emit=function(n,t,r){return S.Yn(n,e.eventNameFn?e.eventNameFn(t):t,r)},T.h=c,T.Context=e;var B=r.$definedCmps=r.$definedCmps||{},D={nt:function I(n,t){t.mode||(t.mode=S.L(t,"mode")||e.mode),S.L(t,W)||function r(n,t){return n&&1===t.encapsulation}(S.xn,n)||function i(n,t,e,r,o,u,f,c,a){for(e.$defaultHolder||t.In(e,e.$defaultHolder=t.Dn(""),r[0]),a=0;a0;)s.shift()();r=!1}function u(n){for(n=c(),o();l.length>0&&c()-n<40;)l.shift()();(i=l.length>0)&&t.raf(f)}function f(n){for(o(),n=4+c();l.length>0&&c()0)&&t.raf(u)}var c=function(){return e.performance.now()},a=Promise.resolve(),s=[],l=[];return t.raf||(t.raf=n.requestAnimationFrame.bind(n)),{add:function(n,e){3===e?(s.push(n),r||(r=!0,a.then(o))):(l.push(n),i||(i=!0,t.raf(u)))}}}(T,r),u:new WeakMap,pt:new WeakMap,S:new WeakMap,rt:new WeakMap,ct:new WeakMap,ot:new WeakMap,w:new WeakMap,b:new WeakMap,y:new WeakMap,d:new WeakMap,x:new WeakMap,at:new WeakMap,dt:new WeakMap,N:new WeakMap,M:new WeakMap};D.render=function Z(n,t){function e(r,i,u,f,c,a,p,d,y){if("function"==typeof r.c&&(r=r.c(Object.assign({},r.s,{mt:r.a}))),!v&&"slot"===r.c){if((s||l)&&(h&&t.Zn(i,h+"-slot",""),p=r.s&&r.s.name,d=A(p)?l&&l[p]:s,A(d))){for(n.ft=!0,f=0;fm?r(n,null==a[w+1]?null:a[w+1].T,a,d,w):d>w&&i(o,p,m)}function u(n,t){return n.c===t.c&&n.l===t.l}function f(n,t,e){var r,i,o={};for(r=t;r<=e;++r)null!=(i=n[r])&&void 0!==i.l&&(o.bt=r);return o}function c(e,u){var f,c=u.T=e.T,a=e.a,s=u.a;if(P(u.f))"slot"!==u.c&&m(n,e,u,F),A(a)&&A(s)?o(c,a,s):A(s)?(A(e.f)&&t.Un(c,""),r(c,null,s,0,s.length-1)):A(a)&&i(a,0,a.length-1);else if(f=n.S.get(c)){var l=f[0].parentElement;t.Un(l,u.f),n.S.set(c,[l.childNodes[0]])}else e.f!==u.f&&t.Un(c,u.f)}var a,s,l,v,h;return function n(e,r,i,o,u,f,p){return a=i,s=o,l=u,h="scoped"===f||"shadow"===f&&!t.xn?"data-"+t.B(e.T):null,v="shadow"===f&&t.xn,a||(v?e.T=t.Xn(e.T,{mode:"open"}):h&&t.Zn(e.T,h+"-host","")),c(e,r),r}}(D,S);var G,J=S.Hn;J.$rendered=!0,J.$activeLoading=[],J.$initLoad=function(){D.ot.set(J,T.loaded=D.C=!0),S.Yn(r,"appload",{detail:{namespace:t}})},function K(n,t,e){var r,i,o,u,f,c,a=e.querySelectorAll("["+W+"]"),s=a.length;if(s>0)for(n.ot.set(e,!0),u=0;u-1;n--){var t=k[n],e=t[0],r=t[1],i=t[2];r.every(function(n){return j[n]})&&!j[e]&&v(e,r,i)}}()};var V=[];G=new cn(r,i),function X(n,t,e,r){e.Mn?r():n.requestAnimationFrame(function(){for(var n=[],i=t.querySelectorAll('link[rel="stylesheet"][href]'),o=0;o-1&&o.splice(t,1),!o.length&&i.$initLoad()),n.p.delete(e))}function r(n,e,t){let o,i=!1,c=!1;for(var l=arguments.length;l-- >2;)A.push(arguments[l]);for(;A.length;)if((t=A.pop())&&void 0!==t.pop)for(l=t.length;l--;)A.push(t[l]);else"boolean"==typeof t&&(t=null),(c="function"!=typeof n)&&(null==t?t="":"number"==typeof t?t=String(t):"string"!=typeof t&&(c=!1)),c&&i?o[o.length-1].d+=t:void 0===o?o=[c?s(t):t]:o.push(c?s(t):t),i=c;const f=new L;if(f.m=n,f.y=o,e&&(f.b=e,f.w=e.v,f.M=e.ref,e.className&&(e.class=e.className),"object"==typeof e.class)){for(l in e.class)e.class[l]&&A.push(l);e.class=A.join(" "),A.length=0}return f}function s(n){const e=new L;return e.d=n,e}function a(n,e){n.k.has(e)||(n.k.set(e,!0),n.g.add(()=>{(function n(e,t,o,i,c){if(e.k.delete(t),!e.C.has(t)){let l;if(i=e.W.get(t),o=!i){if((c=e.p.get(t))&&!c.$rendered)return void(c.$onRender=c.$onRender||[]).push(()=>{n(e,t)});i=function l(n,e,t,o,i,c){try{(function l(n,e,t,o,i,c){for(c in n.N.set(o,t),n.j.has(t)||n.j.set(t,{}),(i=Object.assign({color:{type:String}},e.properties)).mode={type:String},i)d(n,i[c],t,o,c)})(n,o=n.S(e).O,e,t=new o),function f(n,e,t){if(e){const o=n.N.get(t);e.forEach(e=>{t[e.method]={emit:t=>{n.x(o,e.name,{bubbles:e.bubbles,composed:e.composed,cancelable:e.cancelable,detail:t})}}})}}(n,o.events,t)}catch(o){t={},n.T(o,7,e,!0)}return n.W.set(e,t),t}(e,t);try{i.componentWillLoad&&(l=i.componentWillLoad())}catch(n){e.T(n,3,t)}}l&&l.then?l.then(()=>p(e,t,i,o)):p(e,t,i,o)}})(n,e)},n.A?1:3))}function p(n,e,t,o){(function i(n,e,t,o,c){try{const i=e.O.host;if(o.render||o.hostData||i){n.L=!0;const i=o.render&&o.render();let l;n.L=!1;const f=n.P.get(t)||new L;f.R=t,n.P.set(t,n.render(f,r(null,l,i),c,n.q.get(t),n.B.get(t),e.O.encapsulation))}n.D(n,n.H,e,o.mode,t),t.$rendered=!0,t.$onRender&&(t.$onRender.forEach(n=>n()),t.$onRender=null)}catch(e){n.L=!1,n.T(e,8,t,!0)}})(n,n.S(e),e,t,!o);try{o?e.$initLoad():M(n.P.get(e))}catch(t){n.T(t,6,e,!0)}}function d(n,e,t,o,i){if(e.type||e.state){const c=n.j.get(t);if(!e.state){if(e.attr&&(void 0===c[i]||""===c[i])){const o=n.H.F(t,e.attr);null!=o&&(c[i]=f(e.type,o))}t.hasOwnProperty(i)&&(void 0===c[i]&&(c[i]=t[i]),delete t[i])}o.hasOwnProperty(i)&&void 0===c[i]&&(c[i]=o[i]),e.watchCallbacks&&(c[P+i]=e.watchCallbacks.slice()),y(o,i,function c(e){return(e=n.j.get(n.N.get(this)))&&e[i]},function l(t,o){(o=n.N.get(this))&&(e.state||e.mutable)&&m(n,o,i,t)})}else e.elementRef&&h(o,i,t)}function m(n,e,t,o,i,c,l){(i=n.j.get(e))||n.j.set(e,i={}),o!==i[t]&&(i[t]=o,n.W.get(e)&&(i[P+t],!n.L&&e.$rendered&&a(n,e)))}function h(n,e,t){Object.defineProperty(n,e,{configurable:!0,value:t})}function y(n,e,t,o){Object.defineProperty(n,e,{configurable:!0,get:t,set:o})}function b(n,e,t,o,i){const c=11===t.R.nodeType&&t.R.host?t.R.host:t.R,l=e&&e.b||E,f=t.b||E;for(i in l)f&&null!=f[i]||null==l[i]||w(n,c,i,l[i],void 0,o);for(i in f)i in l&&f[i]===("value"===i||"checked"===i?c[i]:l[i])||w(n,c,i,l[i],f[i],o)}function w(n,e,t,o,i,c,l,f){if("class"!==t||c)if("style"===t){for(l in o=o||E,i=i||E,o)i[l]||(e.style[l]="");for(l in i)i[l]!==o[l]&&(e.style[l]=i[l])}else if("o"!==t[0]||"n"!==t[1]||t in e)if("list"!==t&&"type"!==t&&!c&&(t in e||-1!==["object","function"].indexOf(typeof i)&&null!==i)){const o=n.S(e);o&&o.z&&o.z[t]?v(e,t,i):"ref"!==t&&(v(e,t,null==i?"":i),null!=i&&!1!==i||e.removeAttribute(t))}else null!=i&&(l=t!==(t=t.replace(/^xlink\:?/,"")),1!==R[t]||i&&"false"!==i?"function"!=typeof i&&(l?e.setAttributeNS(q,x(t),i):e.setAttribute(t,i)):l?e.removeAttributeNS(q,x(t)):e.removeAttribute(t));else t=x(t.substring(2)),i?i!==o&&n.H.I(e,t,i):n.H.Q(e,t);else if(o!==i){const n=null==o||""===o?N:o.trim().split(/\s+/),t=null==i||""===i?N:i.trim().split(/\s+/);let c=null==e.className||""===e.className?N:e.className.trim().split(/\s+/);for(l=0,f=n.length;le!==n[l]));for(l=0,f=t.length;l{M(n,e)}))}function $(n,e,t,o,i){const c=n.U(e);let l,f,u,r;if(i&&1===c){(f=n.F(e,C))&&(u=f.split("."))[0]===o&&((r=new L).m=n.G(r.R=e),t.y||(t.y=[]),t.y[u[1]]=r,t=r,i=""!==u[2]);for(let c=0;c{let i=e[t];i||(i=n.K.querySelector(t)),i||(i=e[t]=n.V(t),n.X(n.K,i)),i.componentOnReady(o)})}(n,e,t).then(n=>n[o].apply(n,i))}}const g="data-ssrv",C="data-ssrc",W="$",E={},N=[],j={enter:13,escape:27,space:32,tab:9,left:37,up:38,right:39,down:40},O=n=>void 0!==n&&null!==n,S=n=>void 0===n||null===n,x=n=>n.toLowerCase(),T=()=>{},A=[];class L{}const P="wc-",R={allowfullscreen:1,async:1,autofocus:1,autoplay:1,checked:1,controls:1,disabled:1,enabled:1,formnovalidate:1,hidden:1,multiple:1,noresize:1,readonly:1,required:1,selected:1,spellcheck:1},q="http://www.w3.org/1999/xlink";let B=!1;(function D(e,t,o,i,s,p){const d={html:{}},w={},v=o[e]=o[e]||{},C=function E(n,e,t){n.Y||(n.Y=((n,e,t,o)=>n.addEventListener(e,t,o)),n.Z=((n,e,t,o)=>n.removeEventListener(e,t,o)));const o=new WeakMap,i={_:t.documentElement,e:t.head,K:t.body,nn:!1,U:n=>n.nodeType,V:n=>t.createElement(n),en:(n,e)=>t.createElementNS(n,e),tn:n=>t.createTextNode(n),on:n=>t.createComment(n),c:(n,e,t)=>n.insertBefore(e,t),in:n=>n.remove(),X:(n,e)=>n.appendChild(e),cn:n=>n.childNodes,o:n=>n.parentNode,ln:n=>n.nextSibling,G:n=>x(n.tagName),J:n=>n.textContent,fn:(n,e)=>n.textContent=e,F:(n,e)=>n.getAttribute(e),un:(n,e,t)=>n.setAttribute(e,t),rn:(n,e,t,o)=>n.setAttributeNS(e,t,o),sn:(n,e)=>n.removeAttribute(e),an:(n,o)=>"child"===o?n.firstElementChild:"parent"===o?i.pn(n):"body"===o?i.K:"document"===o?t:"window"===o?e:n,I:(e,t,c,l,f,u,r,s)=>{const a=t;let p=e,d=o.get(e);if(d&&d[a]&&d[a](),"string"==typeof u?p=i.an(e,u):"object"==typeof u?p=u:(s=t.split(":")).length>1&&(p=i.an(e,s[0]),t=s[1]),!p)return;let m=c;(s=t.split(".")).length>1&&(t=s[0],m=(n=>{n.keyCode===j[s[1]]&&c(n)})),r=i.nn?{capture:!!l,passive:!!f}:!!l,n.Y(p,t,m,r),d||o.set(e,d={}),d[a]=(()=>{p&&n.Z(p,t,m,r),d[a]=null})},Q:(n,e)=>{const t=o.get(n);t&&(e?t[e]&&t[e]():Object.keys(t).forEach(n=>{t[n]&&t[n]()}))},dn:(n,e)=>n.attachShadow(e)};i.t=!!i._.attachShadow,i.mn=((n,t,o)=>n&&n.dispatchEvent(new e.CustomEvent(t,o)));try{e.addEventListener("e",null,Object.defineProperty({},"passive",{get:()=>i.nn=!0}))}catch(n){}return i.pn=((n,e)=>(e=i.o(n))&&11===i.U(e)?e.host:e),i}(v,o,i);t.isServer=t.isPrerender=!(t.isClient=!0),t.window=o,t.location=o.location,t.document=i,t.publicPath=s,t.emit=((n,e,o)=>C.mn(n,t.eventNameFn?t.eventNameFn(e):e,o)),v.h=r,v.Context=t;const N=o.$definedCmps=o.$definedCmps||{},A={hn:function P(n,e){e.mode||(e.mode=C.F(e,"mode")||t.mode),C.F(e,g)||function o(n,e){return n&&1===e.encapsulation}(C.t,n)||function i(n,e,t,o,c,l,f,u,r){for(t.$defaultHolder||e.c(t,t.$defaultHolder=e.on(""),o[0]),r=0;r{n.hn(e,o),n.loadBundle(e,o.mode,()=>a(n,o))},3))})(n,e,this)},o.attributeChangedCallback=function(n,t,o){(function i(n,e,t,o,c,l){if(o!==c&&n)for(l in t=x(t),n)if(n[l].Mn===t){e[l]=f(n[l].$n,c);break}})(e.z,this,n,t,o)},o.disconnectedCallback=function(){(function e(n,t,o){!n.kn&&function i(n,e){for(;e;){if(!n.o(e))return 9!==n.U(e);e=n.o(e)}}(n.H,t)&&(n.C.set(t,!0),u(n,t),M(n.P.get(t),!0),n.H.Q(t),n.gn.delete(t))})(n,this)},o.componentOnReady=function(e,t){return e||(t=new Promise(n=>e=n)),function o(n,e,t,i){n.C.has(e)||(n.vn.has(e)?t(e):((i=n.Cn.get(e)||[]).push(t),n.Cn.set(e,i)))}(n,this,e),t},o.$initLoad=function(){(function e(n,t,o,i,c){if(!n.vn.has(t)&&n.W.get(t)&&!n.C.has(t)&&(!t.$activeLoading||!t.$activeLoading.length)){delete t.$activeLoading,n.vn.set(t,!0);try{M(n.P.get(t)),(c=n.Cn.get(t))&&(c.forEach(n=>n(t)),n.Cn.delete(t))}catch(e){n.T(e,4,t)}t.classList.add(o),u(n,t)}})(n,this,i)},o.forceUpdate=function(){a(n,this)},function c(n,e,t){e&&Object.keys(e).forEach(o=>{const i=e[o].Wn;1===i||2===i?y(t,o,function e(){return(n.j.get(this)||{})[o]},function e(t){m(n,this,o,t)}):6===i&&h(t,o,T)})}(n,e.z,o)}(A,n,e.prototype,p);{const t=[];for(const e in n.z)n.z[e].Mn&&t.push(n.z[e].Mn);e.observedAttributes=t}o.customElements.define(n.n,e)}},x:t.emit,S:n=>d[C.G(n)],En:n=>t[n],isClient:!0,wn:n=>!(!N[C.G(n)]&&!A.S(n)),loadBundle:function q(n,e,t){if(n.O)t();else{const o="string"==typeof n.Nn?n.Nn:n.Nn[e],i=s+o+(function o(n,e){return 2===e.encapsulation||1===e.encapsulation&&!n}(C.t,n)?".sc":"")+".js";import(i).then(e=>{try{n.O=e[(n=>x(n).split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(""))(n.n)],function o(n,e,t){const o=t.style;if(o){const i=t.is+(t.styleMode||W);if(!e[i]){const t=n.V("template");e[i]=t,t.innerHTML=``,n.X(n.e,t)}}}(C,n,n.O)}catch(e){n.O=class{}}t()}).catch(n=>void 0)}},T:(n,e,t)=>void 0,jn:n=>(function e(n,t,o){return{create:k(n,t,o,"create"),componentOnReady:k(n,t,o,"componentOnReady")}})(C,w,n),g:function D(e,t,o,i){function c(){for(;s.length>0;)s.shift()();o=!1}function l(n){for(n=u(),c();a.length>0&&u()-n<40;)a.shift()();(i=a.length>0)&&e.raf(f)}function f(n){for(c(),n=4+u();a.length>0&&u()0)&&e.raf(l)}const u=()=>t.performance.now(),r=Promise.resolve(),s=[],a=[];return e.raf||(e.raf=n.requestAnimationFrame.bind(n)),{add:(n,t)=>{3===t?(s.push(n),o||(o=!0,r.then(c))):(a.push(n),i||(i=!0,e.raf(l)))}}}(v,o),p:new WeakMap,i:new WeakMap,q:new WeakMap,bn:new WeakMap,gn:new WeakMap,vn:new WeakMap,N:new WeakMap,W:new WeakMap,C:new WeakMap,k:new WeakMap,B:new WeakMap,Cn:new WeakMap,On:new WeakMap,P:new WeakMap,j:new WeakMap};A.render=function H(n,e){function t(o,i,l,f,u,r,m,h,y){if("function"==typeof o.m&&(o=o.m(Object.assign({},o.b,{Sn:o.y}))),!p&&"slot"===o.m){if((s||a)&&(d&&e.un(i,d+"-slot",""),m=o.b&&o.b.name,h=O(m)?a&&a[m]:s,O(h))){for(n.kn=!0,f=0;fy?o(n,null==r[v+1]?null:r[v+1].R,r,h,v):h>v&&i(c,m,y)}function l(n,e){return n.m===e.m&&n.w===e.w}function f(n,e,t){const o={};let i,c,l;for(i=e;i<=t;++i)null!=(l=n[i])&&void 0!==(c=l.w)&&(o.Tn=i);return o}function u(t,l){const f=l.R=t.R,u=t.y,r=l.y;let s;if(S(l.d))"slot"!==l.m&&b(n,t,l,B),O(u)&&O(r)?c(f,u,r):O(r)?(O(t.d)&&e.fn(f,""),o(f,null,r,0,r.length-1)):O(u)&&i(u,0,u.length-1);else if(s=n.q.get(f)){const t=s[0].parentElement;e.fn(t,l.d),n.q.set(f,[t.childNodes[0]])}else t.d!==l.d&&e.fn(f,l.d)}let r,s,a,p,d;return function n(t,o,i,c,l,f,m){return r=i,s=c,a=l,d="scoped"===f||"shadow"===f&&!e.t?"data-"+e.G(t.R):null,p="shadow"===f&&e.t,r||(p?t.R=e.dn(t.R,{mode:"open"}):d&&e.un(t.R,d+"-host","")),u(t,o),o}}(A,C);const F=C._;F.$rendered=!0,F.$activeLoading=[],F.$initLoad=(()=>{A.vn.set(F,v.loaded=A.A=!0),C.mn(o,"appload",{detail:{namespace:e}})}),function z(n,e,t){const o=t.querySelectorAll(`[${g}]`),i=o.length;let c,l,f,u,r,s;if(i>0)for(n.vn.set(t,!0),u=0;u(function e(n,t,o,i){const c={n:n[0],z:{color:{Mn:"color"}}};c.Nn=n[1];const f=n[3];if(f)for(o=0;oA.yn(n,class extends HTMLElement{})),v.initialized=!0,C.mn(n,"appinit",{detail:{namespace:e}})})(o,t,n,e,i,hydratedCssClass)})(window,document,Context,appNamespace,publicPath); 5 | })({},"GradientButton","hydrated","/build/gradient-button/"); -------------------------------------------------------------------------------- /dist/gradient-button/ugyrbps6.es5.js: -------------------------------------------------------------------------------- 1 | /*! Built with http://stenciljs.com */ 2 | GradientButton.loadBundle("ugyrbps6",["exports"],function(t){var e=window.GradientButton.h,n=function(){function t(){this.type="button",this.disabled=!1,this.fill="default",this.round=!1,this.strong=!1,this.darkblue={start:"#2b4b62",end:"#4b7078"},this.green={start:"#3dab64",end:"#8ed67d"},this.pink={start:"#f96b90",end:"#f67cb5"},this.blue={start:"#43afce",end:"#48c3d3"}}return t.prototype.onFocus=function(){this.ionFocus.emit()},t.prototype.onKeyUp=function(){this.keyFocus=!0},t.prototype.onBlur=function(){this.keyFocus=!1,this.ionBlur.emit()},t.prototype.componentWillLoad=function(){"darkblue"==this.color?this.selectedColor=this.darkblue:"green"==this.color?this.selectedColor=this.green:"pink"==this.color?this.selectedColor=this.pink:"blue"==this.color&&(this.selectedColor=this.blue),this.backgroundColor={background:"linear-gradient(to right, "+this.selectedColor.start+", "+this.selectedColor.end+")"}},t.prototype.render=function(){var t=this,n=this.expand,r=this.round,i=this.size,s=this.strong,l=this.href?"a":"button",u=Object.assign({},o(n),o(i),o(r?"round":null),o(s?"strong":null),{"gradient-button":!0},function(t){for(var e={},n=0;n.gradient-button--shadow{display:none}.gradient-button:focus{outline:0}.gradient-button:active{outline:0;transform:translateY(3px)}.gradient-button:active>.gradient-button--shadow{transform:perspective(100px) rotateX(60deg) translateY(-5px)}.gradient-button:hover{box-shadow:inset 0 0 0 50px rgba(0,0,0,.1)}.gradient-button .gradient-button--shadow{border-radius:5px;transition:all ease .2s;position:absolute;left:15px;bottom:-10px;margin:0 auto;height:20px;width:calc(100% - 30px);z-index:-1;filter:blur(8px);transform:perspective(100px) rotateX(60deg);background:linear-gradient(to right,#2b4b62,#4b7078)}.gradient-button.large{padding:5px 20px;height:2.8em;font-size:20px}.gradient-button.small{height:2.1em;font-size:13px}.gradient-button.block{display:block;clear:both;width:100%}.gradient-button.block::after{clear:both}.gradient-button.full{display:block;width:100%}.gradient-button.full .gradient-button--shadow{transform:perspective(500px) rotateX(45deg)}.gradient-button.full:active{outline:0;transform:translateY(3px)}.gradient-button.full:active>.gradient-button--shadow{transform:perspective(500px) rotateX(45deg) translateY(-5px)}.gradient-button .button-full.button-outline{border-radius:0;border-right-width:0;border-left-width:0}.gradient-button ion-icon{font-size:1.4em;pointer-events:none}.gradient-button ion-icon[slot=start]{margin:0 -.3em 0 .3em}.gradient-button ion-icon[slot=end]{margin:0 .3em 0 -.2em}.gradient-button ion-icon[slot=icon-only]{font-size:1.8em}.gradient-button.strong{font-weight:700;text-transform:uppercase}.gradient-button.round{border-radius:50vw}"},enumerable:!0,configurable:!0}),t}();function o(t){return t?((e={})[""+(t=t.toLocaleLowerCase())]=!0,e):{};var e}t.CodextGradientButton=n,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /dist/gradient-button/ugyrbps6.js: -------------------------------------------------------------------------------- 1 | /*! Built with http://stenciljs.com */ 2 | const{h:t}=window.GradientButton;class e{constructor(){this.type="button",this.disabled=!1,this.fill="default",this.round=!1,this.strong=!1,this.darkblue={start:"#2b4b62",end:"#4b7078"},this.green={start:"#3dab64",end:"#8ed67d"},this.pink={start:"#f96b90",end:"#f67cb5"},this.blue={start:"#43afce",end:"#48c3d3"}}onFocus(){this.ionFocus.emit()}onKeyUp(){this.keyFocus=!0}onBlur(){this.keyFocus=!1,this.ionBlur.emit()}componentWillLoad(){"darkblue"==this.color?this.selectedColor=this.darkblue:"green"==this.color?this.selectedColor=this.green:"pink"==this.color?this.selectedColor=this.pink:"blue"==this.color&&(this.selectedColor=this.blue),this.backgroundColor={background:"linear-gradient(to right, "+this.selectedColor.start+", "+this.selectedColor.end+")"}}render(){const{expand:e,round:s,size:n,strong:r}=this,i=this.href?"a":"button",l=Object.assign({},o(e),o(n),o(s?"round":null),o(r?"strong":null),{"gradient-button":!0},function(t){const e={};for(let o=0;o(function(t,e,o=!1){if(t&&"#"!==t[0]&&-1===t.indexOf("://")){const s=document.querySelector("ion-router");if(s)return e&&e.preventDefault(),s.componentOnReady().then(()=>s.push(t,o))}return Promise.resolve()})(this.href,t),onBlur:this.onBlur.bind(this),style:this.backgroundColor}),t("div",{class:"gradient-button--shadow",style:this.backgroundColor}),t("span",{class:"button-inner"},t("slot",{name:"icon-only"}),t("slot",{name:"start"}),t("span",{class:"button-text"},t("slot",null)),t("slot",{name:"end"})))}static get is(){return"codext-gradient-button"}static get encapsulation(){return"shadow"}static get properties(){return{color:{type:String,attr:"color"},disabled:{type:Boolean,attr:"disabled"},el:{elementRef:!0},expand:{type:"Any",attr:"expand"},fill:{type:"Any",attr:"fill"},href:{type:String,attr:"href"},keyFocus:{state:!0},round:{type:Boolean,attr:"round"},size:{type:"Any",attr:"size"},strong:{type:Boolean,attr:"strong"},type:{type:String,attr:"type"}}}static get events(){return[{name:"ionFocus",method:"ionFocus",bubbles:!0,cancelable:!0,composed:!0},{name:"ionBlur",method:"ionBlur",bubbles:!0,cancelable:!0,composed:!0}]}static get style(){return"\@-webkit-keyframes gradient-button-ripple-out{100%{top:-12px;right:-12px;bottom:-12px;left:-12px;opacity:0}}\@keyframes gradient-button-ripple-out{100%{top:-12px;right:-12px;bottom:-12px;left:-12px;opacity:0}}.gradient-button{text-align:center;-moz-appearance:none;-ms-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:inline-block;border:0;cursor:pointer;vertical-align:top;vertical-align:-webkit-baseline-middle;transition:background-color,opacity .1s linear;font-kerning:none;user-select:none;font-smoothing:antialiased;-webkit-font-smoothing:antialiased;font-size:13px;font-weight:700;text-transform:uppercase;line-height:1;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;margin:0 0 15px;padding:15px 20px;transition:all linear .1s;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.3);border-radius:7px;background:linear-gradient(to right,#2b4b62,#4b7078);transform-style:preserve-3d;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}.gradient-button .button-inner{display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%}.gradient-button[disabled]{cursor:default;pointer-events:none;opacity:.6}.gradient-button[disabled]>.gradient-button--shadow{display:none}.gradient-button:focus{outline:0}.gradient-button:active{outline:0;transform:translateY(3px)}.gradient-button:active>.gradient-button--shadow{transform:perspective(100px) rotateX(60deg) translateY(-5px)}.gradient-button:hover{box-shadow:inset 0 0 0 50px rgba(0,0,0,.1)}.gradient-button .gradient-button--shadow{border-radius:5px;transition:all ease .2s;position:absolute;left:15px;bottom:-10px;margin:0 auto;height:20px;width:calc(100% - 30px);z-index:-1;filter:blur(8px);transform:perspective(100px) rotateX(60deg);background:linear-gradient(to right,#2b4b62,#4b7078)}.gradient-button.large{padding:5px 20px;height:2.8em;font-size:20px}.gradient-button.small{height:2.1em;font-size:13px}.gradient-button.block{display:block;clear:both;width:100%}.gradient-button.block::after{clear:both}.gradient-button.full{display:block;width:100%}.gradient-button.full .gradient-button--shadow{transform:perspective(500px) rotateX(45deg)}.gradient-button.full:active{outline:0;transform:translateY(3px)}.gradient-button.full:active>.gradient-button--shadow{transform:perspective(500px) rotateX(45deg) translateY(-5px)}.gradient-button .button-full.button-outline{border-radius:0;border-right-width:0;border-left-width:0}.gradient-button ion-icon{font-size:1.4em;pointer-events:none}.gradient-button ion-icon[slot=start]{margin:0 -.3em 0 .3em}.gradient-button ion-icon[slot=end]{margin:0 .3em 0 -.2em}.gradient-button ion-icon[slot=icon-only]{font-size:1.8em}.gradient-button.strong{font-weight:700;text-transform:uppercase}.gradient-button.round{border-radius:50vw}"}}function o(t){return t?{[`${t=t.toLocaleLowerCase()}`]:!0}:{}}export{e as CodextGradientButton}; -------------------------------------------------------------------------------- /dist/gradient-button/ugyrbps6.sc.es5.js: -------------------------------------------------------------------------------- 1 | /*! Built with http://stenciljs.com */ 2 | GradientButton.loadBundle("ugyrbps6",["exports"],function(t){var e=window.GradientButton.h,n=function(){function t(){this.type="button",this.disabled=!1,this.fill="default",this.round=!1,this.strong=!1,this.darkblue={start:"#2b4b62",end:"#4b7078"},this.green={start:"#3dab64",end:"#8ed67d"},this.pink={start:"#f96b90",end:"#f67cb5"},this.blue={start:"#43afce",end:"#48c3d3"}}return t.prototype.onFocus=function(){this.ionFocus.emit()},t.prototype.onKeyUp=function(){this.keyFocus=!0},t.prototype.onBlur=function(){this.keyFocus=!1,this.ionBlur.emit()},t.prototype.componentWillLoad=function(){"darkblue"==this.color?this.selectedColor=this.darkblue:"green"==this.color?this.selectedColor=this.green:"pink"==this.color?this.selectedColor=this.pink:"blue"==this.color&&(this.selectedColor=this.blue),this.backgroundColor={background:"linear-gradient(to right, "+this.selectedColor.start+", "+this.selectedColor.end+")"}},t.prototype.render=function(){var t=this,n=this.expand,r=this.round,i=this.size,s=this.strong,l=this.href?"a":"button",u=Object.assign({},o(n),o(i),o(r?"round":null),o(s?"strong":null),{"gradient-button":!0},function(t){for(var e={},n=0;n .gradient-button--shadow[data-codext-gradient-button]{display:none}.gradient-button[data-codext-gradient-button]:focus{outline:0}.gradient-button[data-codext-gradient-button]:active{outline:0;transform:translateY(3px)}.gradient-button[data-codext-gradient-button]:active > .gradient-button--shadow[data-codext-gradient-button]{transform:perspective(100px) rotateX(60deg) translateY(-5px)}.gradient-button[data-codext-gradient-button]:hover{box-shadow:inset 0 0 0 50px rgba(0,0,0,.1)}.gradient-button[data-codext-gradient-button] .gradient-button--shadow[data-codext-gradient-button]{border-radius:5px;transition:all ease .2s;position:absolute;left:15px;bottom:-10px;margin:0 auto;height:20px;width:calc(100% - 30px);z-index:-1;filter:blur(8px);transform:perspective(100px) rotateX(60deg);background:linear-gradient(to right,#2b4b62,#4b7078)}.gradient-button.large[data-codext-gradient-button]{padding:5px 20px;height:2.8em;font-size:20px}.gradient-button.small[data-codext-gradient-button]{height:2.1em;font-size:13px}.gradient-button.block[data-codext-gradient-button]{display:block;clear:both;width:100%}.gradient-button.block[data-codext-gradient-button]::after{clear:both}.gradient-button.full[data-codext-gradient-button]{display:block;width:100%}.gradient-button.full[data-codext-gradient-button] .gradient-button--shadow[data-codext-gradient-button]{transform:perspective(500px) rotateX(45deg)}.gradient-button.full[data-codext-gradient-button]:active{outline:0;transform:translateY(3px)}.gradient-button.full[data-codext-gradient-button]:active > .gradient-button--shadow[data-codext-gradient-button]{transform:perspective(500px) rotateX(45deg) translateY(-5px)}.gradient-button[data-codext-gradient-button] .button-full.button-outline[data-codext-gradient-button]{border-radius:0;border-right-width:0;border-left-width:0}.gradient-button[data-codext-gradient-button] ion-icon[data-codext-gradient-button]{font-size:1.4em;pointer-events:none}.gradient-button[data-codext-gradient-button] ion-icon[slot=start][data-codext-gradient-button]{margin:0 -.3em 0 .3em}.gradient-button[data-codext-gradient-button] ion-icon[slot=end][data-codext-gradient-button]{margin:0 .3em 0 -.2em}.gradient-button[data-codext-gradient-button] ion-icon[slot=icon-only][data-codext-gradient-button]{font-size:1.8em}.gradient-button.strong[data-codext-gradient-button]{font-weight:700;text-transform:uppercase}.gradient-button.round[data-codext-gradient-button]{border-radius:50vw}"},enumerable:!0,configurable:!0}),t}();function o(t){return t?((e={})[""+(t=t.toLocaleLowerCase())]=!0,e):{};var e}t.CodextGradientButton=n,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /dist/gradient-button/ugyrbps6.sc.js: -------------------------------------------------------------------------------- 1 | /*! Built with http://stenciljs.com */ 2 | const{h:t}=window.GradientButton;class e{constructor(){this.type="button",this.disabled=!1,this.fill="default",this.round=!1,this.strong=!1,this.darkblue={start:"#2b4b62",end:"#4b7078"},this.green={start:"#3dab64",end:"#8ed67d"},this.pink={start:"#f96b90",end:"#f67cb5"},this.blue={start:"#43afce",end:"#48c3d3"}}onFocus(){this.ionFocus.emit()}onKeyUp(){this.keyFocus=!0}onBlur(){this.keyFocus=!1,this.ionBlur.emit()}componentWillLoad(){"darkblue"==this.color?this.selectedColor=this.darkblue:"green"==this.color?this.selectedColor=this.green:"pink"==this.color?this.selectedColor=this.pink:"blue"==this.color&&(this.selectedColor=this.blue),this.backgroundColor={background:"linear-gradient(to right, "+this.selectedColor.start+", "+this.selectedColor.end+")"}}render(){const{expand:e,round:s,size:n,strong:r}=this,i=this.href?"a":"button",l=Object.assign({},o(e),o(n),o(s?"round":null),o(r?"strong":null),{"gradient-button":!0},function(t){const e={};for(let o=0;o(function(t,e,o=!1){if(t&&"#"!==t[0]&&-1===t.indexOf("://")){const s=document.querySelector("ion-router");if(s)return e&&e.preventDefault(),s.componentOnReady().then(()=>s.push(t,o))}return Promise.resolve()})(this.href,t),onBlur:this.onBlur.bind(this),style:this.backgroundColor}),t("div",{class:"gradient-button--shadow",style:this.backgroundColor}),t("span",{class:"button-inner"},t("slot",{name:"icon-only"}),t("slot",{name:"start"}),t("span",{class:"button-text"},t("slot",null)),t("slot",{name:"end"})))}static get is(){return"codext-gradient-button"}static get encapsulation(){return"shadow"}static get properties(){return{color:{type:String,attr:"color"},disabled:{type:Boolean,attr:"disabled"},el:{elementRef:!0},expand:{type:"Any",attr:"expand"},fill:{type:"Any",attr:"fill"},href:{type:String,attr:"href"},keyFocus:{state:!0},round:{type:Boolean,attr:"round"},size:{type:"Any",attr:"size"},strong:{type:Boolean,attr:"strong"},type:{type:String,attr:"type"}}}static get events(){return[{name:"ionFocus",method:"ionFocus",bubbles:!0,cancelable:!0,composed:!0},{name:"ionBlur",method:"ionBlur",bubbles:!0,cancelable:!0,composed:!0}]}static get style(){return"\@-webkit-keyframes gradient-button-ripple-out{100%{top:-12px;right:-12px;bottom:-12px;left:-12px;opacity:0}}\@keyframes gradient-button-ripple-out{100%{top:-12px;right:-12px;bottom:-12px;left:-12px;opacity:0}}.gradient-button[data-codext-gradient-button]{text-align:center;-moz-appearance:none;-ms-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:inline-block;border:0;cursor:pointer;vertical-align:top;vertical-align:-webkit-baseline-middle;transition:background-color,opacity .1s linear;font-kerning:none;user-select:none;font-smoothing:antialiased;-webkit-font-smoothing:antialiased;font-size:13px;font-weight:700;text-transform:uppercase;line-height:1;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;margin:0 0 15px;padding:15px 20px;transition:all linear .1s;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.3);border-radius:7px;background:linear-gradient(to right,#2b4b62,#4b7078);transform-style:preserve-3d;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}.gradient-button[data-codext-gradient-button] .button-inner[data-codext-gradient-button]{display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%}.gradient-button[disabled][data-codext-gradient-button]{cursor:default;pointer-events:none;opacity:.6}.gradient-button[disabled][data-codext-gradient-button] > .gradient-button--shadow[data-codext-gradient-button]{display:none}.gradient-button[data-codext-gradient-button]:focus{outline:0}.gradient-button[data-codext-gradient-button]:active{outline:0;transform:translateY(3px)}.gradient-button[data-codext-gradient-button]:active > .gradient-button--shadow[data-codext-gradient-button]{transform:perspective(100px) rotateX(60deg) translateY(-5px)}.gradient-button[data-codext-gradient-button]:hover{box-shadow:inset 0 0 0 50px rgba(0,0,0,.1)}.gradient-button[data-codext-gradient-button] .gradient-button--shadow[data-codext-gradient-button]{border-radius:5px;transition:all ease .2s;position:absolute;left:15px;bottom:-10px;margin:0 auto;height:20px;width:calc(100% - 30px);z-index:-1;filter:blur(8px);transform:perspective(100px) rotateX(60deg);background:linear-gradient(to right,#2b4b62,#4b7078)}.gradient-button.large[data-codext-gradient-button]{padding:5px 20px;height:2.8em;font-size:20px}.gradient-button.small[data-codext-gradient-button]{height:2.1em;font-size:13px}.gradient-button.block[data-codext-gradient-button]{display:block;clear:both;width:100%}.gradient-button.block[data-codext-gradient-button]::after{clear:both}.gradient-button.full[data-codext-gradient-button]{display:block;width:100%}.gradient-button.full[data-codext-gradient-button] .gradient-button--shadow[data-codext-gradient-button]{transform:perspective(500px) rotateX(45deg)}.gradient-button.full[data-codext-gradient-button]:active{outline:0;transform:translateY(3px)}.gradient-button.full[data-codext-gradient-button]:active > .gradient-button--shadow[data-codext-gradient-button]{transform:perspective(500px) rotateX(45deg) translateY(-5px)}.gradient-button[data-codext-gradient-button] .button-full.button-outline[data-codext-gradient-button]{border-radius:0;border-right-width:0;border-left-width:0}.gradient-button[data-codext-gradient-button] ion-icon[data-codext-gradient-button]{font-size:1.4em;pointer-events:none}.gradient-button[data-codext-gradient-button] ion-icon[slot=start][data-codext-gradient-button]{margin:0 -.3em 0 .3em}.gradient-button[data-codext-gradient-button] ion-icon[slot=end][data-codext-gradient-button]{margin:0 .3em 0 -.2em}.gradient-button[data-codext-gradient-button] ion-icon[slot=icon-only][data-codext-gradient-button]{font-size:1.8em}.gradient-button.strong[data-codext-gradient-button]{font-weight:700;text-transform:uppercase}.gradient-button.round[data-codext-gradient-button]{border-radius:50vw}"}}function o(t){return t?{[`${t=t.toLocaleLowerCase()}`]:!0}:{}}export{e as CodextGradientButton}; -------------------------------------------------------------------------------- /dist/types/components.d.ts: -------------------------------------------------------------------------------- 1 | import './stencil.core'; 2 | /** 3 | * This is an autogenerated file created by the Stencil build process. 4 | * It contains typing information for all components that exist in this project 5 | * and imports for stencil collections that might be configured in your stencil.config.js file 6 | */ 7 | declare global { 8 | namespace JSX { 9 | interface Element {} 10 | export interface IntrinsicElements {} 11 | } 12 | namespace JSXElements {} 13 | 14 | interface HTMLStencilElement extends HTMLElement { 15 | componentOnReady(): Promise; 16 | componentOnReady(done: (ele?: this) => void): void; 17 | } 18 | 19 | interface HTMLAttributes {} 20 | } 21 | 22 | 23 | import { 24 | GradientButton as CodextGradientButton 25 | } from './components/gradient-button/gradient-button'; 26 | 27 | declare global { 28 | interface HTMLCodextGradientButtonElement extends CodextGradientButton, HTMLStencilElement { 29 | } 30 | var HTMLCodextGradientButtonElement: { 31 | prototype: HTMLCodextGradientButtonElement; 32 | new (): HTMLCodextGradientButtonElement; 33 | }; 34 | interface HTMLElementTagNameMap { 35 | "codext-gradient-button": HTMLCodextGradientButtonElement; 36 | } 37 | interface ElementTagNameMap { 38 | "codext-gradient-button": HTMLCodextGradientButtonElement; 39 | } 40 | namespace JSX { 41 | interface IntrinsicElements { 42 | "codext-gradient-button": JSXElements.CodextGradientButtonAttributes; 43 | } 44 | } 45 | namespace JSXElements { 46 | export interface CodextGradientButtonAttributes extends HTMLAttributes { 47 | color?: string; 48 | disabled?: boolean; 49 | expand?: 'full' | 'block'; 50 | fill?: 'clear' | 'outline' | 'solid' | 'default'; 51 | href?: string; 52 | round?: boolean; 53 | size?: 'small' | 'default' | 'large'; 54 | strong?: boolean; 55 | type?: string; 56 | } 57 | } 58 | } 59 | 60 | declare global { namespace JSX { interface StencilJSX {} } } 61 | -------------------------------------------------------------------------------- /dist/types/components/gradient-button-two/gradient-button-two.d.ts: -------------------------------------------------------------------------------- 1 | import '../../stencil.core'; 2 | import '../../stencil.core'; 3 | import '../../stencil.core'; 4 | import '../../stencil.core'; 5 | import '../../stencil.core'; 6 | import '../../stencil.core'; 7 | import '../../stencil.core'; 8 | import '../../stencil.core'; 9 | import '../../stencil.core'; 10 | import '../../stencil.core'; 11 | import '../../stencil.core'; 12 | import '../../stencil.core'; 13 | import '../../stencil.core'; 14 | import '../../stencil.core'; 15 | import '../../stencil.core'; 16 | import '../../stencil.core'; 17 | import '../../stencil.core'; 18 | import '../../stencil.core'; 19 | import '../../stencil.core'; 20 | import '../../stencil.core'; 21 | import '../../stencil.core'; 22 | import '../../stencil.core'; 23 | import '../../stencil.core'; 24 | import '../../stencil.core'; 25 | import '../../stencil.core'; 26 | import '../../stencil.core'; 27 | import '../../stencil.core'; 28 | import '../../stencil.core'; 29 | import '../../stencil.core'; 30 | import '../../stencil.core'; 31 | import '../../stencil.core'; 32 | import '../../stencil.core'; 33 | import '../../stencil.core'; 34 | import '../../stencil.core'; 35 | import '../../stencil.core'; 36 | import '../../stencil.core'; 37 | import '../../stencil.core'; 38 | import '../../stencil.core'; 39 | import '../../stencil.core'; 40 | import '../../stencil.core'; 41 | import '../../stencil.core'; 42 | import '../../stencil.core'; 43 | import '../../stencil.core'; 44 | import '../../stencil.core'; 45 | import '../../stencil.core'; 46 | import '../../stencil.core'; 47 | import '../../stencil.core'; 48 | import '../../stencil.core'; 49 | import '../../stencil.core'; 50 | import '../../stencil.core'; 51 | import '../../stencil.core'; 52 | import '../../stencil.core'; 53 | import '../../stencil.core'; 54 | import '../../stencil.core'; 55 | import '../../stencil.core'; 56 | import '../../stencil.core'; 57 | import '../../stencil.core'; 58 | import '../../stencil.core'; 59 | import '../../stencil.core'; 60 | import '../../stencil.core'; 61 | import '../../stencil.core'; 62 | import '../../stencil.core'; 63 | import '../../stencil.core'; 64 | import '../../stencil.core'; 65 | import '../../stencil.core'; 66 | import '../../stencil.core'; 67 | import '../../stencil.core'; 68 | import '../../stencil.core'; 69 | import '../../stencil.core'; 70 | import '../../stencil.core'; 71 | import '../../stencil.core'; 72 | import '../../stencil.core'; 73 | import '../../stencil.core'; 74 | import '../../stencil.core'; 75 | import '../../stencil.core'; 76 | import '../../stencil.core'; 77 | import '../../stencil.core'; 78 | import '../../stencil.core'; 79 | import '../../stencil.core'; 80 | import '../../stencil.core'; 81 | import '../../stencil.core'; 82 | import '../../stencil.core'; 83 | import '../../stencil.core'; 84 | import '../../stencil.core'; 85 | import '../../stencil.core'; 86 | import '../../stencil.core'; 87 | import { EventEmitter } from '../../stencil.core'; 88 | import { BlurEvent, FocusEvent } from '../../utils/input-interfaces'; 89 | export interface IColor { 90 | start: string; 91 | end: string; 92 | } 93 | export declare class GradientButtonTwo { 94 | private el; 95 | keyFocus: boolean; 96 | /** 97 | * The type of the button. 98 | * Possible values are: `"submit"`, `"reset"` and `"button"`. 99 | * Default value is: `"button"` 100 | */ 101 | type: string; 102 | /** 103 | * Contains a URL or a URL fragment that the hyperlink points to. 104 | * If this property is set, an anchor tag will be rendered. 105 | */ 106 | href: string; 107 | /** 108 | * The type of button. 109 | * Possible values are: `"button"`, `"bar-button"`. 110 | */ 111 | buttonType: string; 112 | /** 113 | * The button size. 114 | * Possible values are: `"small"`, `"default"`, `"large"`. 115 | */ 116 | size: 'small' | 'default' | 'large'; 117 | /** 118 | * If true, the user cannot interact with the button. Defaults to `false`. 119 | */ 120 | disabled: boolean; 121 | /** 122 | * Set to `"clear"` for a transparent button, to `"outline"` for a transparent 123 | * button with a border, or to `"solid"`. The default style is `"solid"` except inside of 124 | * a toolbar, where the default is `"clear"`. 125 | */ 126 | fill: 'clear' | 'outline' | 'solid' | 'default'; 127 | /** 128 | * If true, activates a button with rounded corners. 129 | */ 130 | round: boolean; 131 | /** 132 | * Set to `"block"` for a full-width button or to `"full"` for a full-width button 133 | * without left and right borders. 134 | */ 135 | expand: 'full' | 'block'; 136 | /** 137 | * If true, activates a button with a heavier font weight. 138 | */ 139 | strong: boolean; 140 | /** 141 | * The color to use from your Sass `$colors` map. 142 | * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. 143 | * For more information, see [Theming your App](/docs/theming/theming-your-app). 144 | */ 145 | color: string; 146 | /** 147 | * Emitted when the button has focus. 148 | */ 149 | ionFocus: EventEmitter; 150 | /** 151 | * Emitted when the button loses focus. 152 | */ 153 | ionBlur: EventEmitter; 154 | onFocus(): void; 155 | onKeyUp(): void; 156 | onBlur(): void; 157 | darkblue: IColor; 158 | green: IColor; 159 | pink: IColor; 160 | blue: IColor; 161 | selectedColor: IColor; 162 | backgroundColor: any; 163 | componentWillLoad(): void; 164 | protected render(): JSX.Element; 165 | } 166 | -------------------------------------------------------------------------------- /dist/types/components/gradient-button/gradient-button.d.ts: -------------------------------------------------------------------------------- 1 | import '../../stencil.core'; 2 | import { EventEmitter } from '../../stencil.core'; 3 | import { BlurEvent, FocusEvent } from '../../utils/input-interfaces'; 4 | export interface IColor { 5 | start: string; 6 | end: string; 7 | } 8 | export declare class GradientButton { 9 | private el; 10 | keyFocus: boolean; 11 | /** 12 | * The type of the button. 13 | * Possible values are: `"submit"`, `"reset"` and `"button"`. 14 | * Default value is: `"button"` 15 | */ 16 | type: string; 17 | /** 18 | * Contains a URL or a URL fragment that the hyperlink points to. 19 | * If this property is set, an anchor tag will be rendered. 20 | */ 21 | href: string; 22 | /** 23 | * The button size. 24 | * Possible values are: `"small"`, `"default"`, `"large"`. 25 | */ 26 | size: 'small' | 'default' | 'large'; 27 | /** 28 | * If true, the user cannot interact with the button. Defaults to `false`. 29 | */ 30 | disabled: boolean; 31 | /** 32 | * Set to `"clear"` for a transparent button, to `"outline"` for a transparent 33 | * button with a border, or to `"solid"`. The default style is `"solid"` except inside of 34 | * a toolbar, where the default is `"clear"`. 35 | */ 36 | fill: 'clear' | 'outline' | 'solid' | 'default'; 37 | /** 38 | * If true, activates a button with rounded corners. 39 | */ 40 | round: boolean; 41 | /** 42 | * Set to `"block"` for a full-width button or to `"full"` for a full-width button 43 | * without left and right borders. 44 | */ 45 | expand: 'full' | 'block'; 46 | /** 47 | * If true, activates a button with a heavier font weight. 48 | */ 49 | strong: boolean; 50 | /** 51 | * Default options are: `"darkblue"`, `"green"`, `"pink"`, `"blue"`. 52 | */ 53 | color: string; 54 | /** 55 | * Emitted when the button has focus. 56 | */ 57 | ionFocus: EventEmitter; 58 | /** 59 | * Emitted when the button loses focus. 60 | */ 61 | ionBlur: EventEmitter; 62 | onFocus(): void; 63 | onKeyUp(): void; 64 | onBlur(): void; 65 | darkblue: IColor; 66 | green: IColor; 67 | pink: IColor; 68 | blue: IColor; 69 | selectedColor: IColor; 70 | backgroundColor: any; 71 | componentWillLoad(): void; 72 | protected render(): JSX.Element; 73 | } 74 | -------------------------------------------------------------------------------- /dist/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export declare type CssClassMap = { 3 | [className: string]: boolean; 4 | }; 5 | -------------------------------------------------------------------------------- /dist/types/stencil.core.d.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface ComponentWillLoad { 3 | componentWillLoad: () => Promise | void; 4 | } 5 | 6 | export interface ComponentDidLoad { 7 | componentDidLoad: () => void; 8 | } 9 | 10 | export interface ComponentWillUpdate { 11 | componentWillUpdate: () => Promise | void; 12 | } 13 | 14 | export interface ComponentDidUpdate { 15 | componentDidUpdate: () => void; 16 | } 17 | 18 | export interface ComponentDidUnload { 19 | componentDidUnload: () => void; 20 | } 21 | 22 | export interface EventEmitter { 23 | emit: (data?: T) => void; 24 | } 25 | 26 | export interface EventListenerEnable { 27 | (instance: any, eventName: string, enabled: boolean, attachTo?: string|Element, passive?: boolean): void; 28 | } 29 | 30 | declare global { 31 | namespace JSX { 32 | interface Element {} 33 | export interface IntrinsicElements {} 34 | } 35 | namespace JSXElements {} 36 | 37 | interface HTMLStencilElement extends HTMLElement { 38 | componentOnReady(): Promise; 39 | componentOnReady(done: (ele?: this) => void): void; 40 | } 41 | 42 | interface HTMLAttributes {} 43 | } 44 | -------------------------------------------------------------------------------- /dist/types/utils/input-interfaces.d.ts: -------------------------------------------------------------------------------- 1 | import { EventEmitter } from '../stencil.core'; 2 | export interface BaseInput { 3 | /** 4 | * Indicates that the user cannot interact with the control. 5 | */ 6 | disabled: boolean; 7 | /** 8 | * Returns / Sets the element's readonly attribute, indicating that 9 | * the user cannot modify the value of the control. HTML5. This is 10 | * ignored if the value of the type attribute is hidden, range, color, 11 | * checkbox, radio, file, or a button type. 12 | */ 13 | readOnly?: boolean; 14 | /** 15 | * Reflects the value of the form control. 16 | */ 17 | value: string; 18 | } 19 | export interface CheckboxInput extends BaseInput { 20 | /** 21 | * Returns / Sets the current state of the element when type is checkbox or radio. 22 | */ 23 | checked: boolean; 24 | name: string; 25 | /** 26 | * The change event is fired when the value of has changed. 27 | */ 28 | ionChange: EventEmitter; 29 | /** 30 | * Removes focus from input; keystrokes will subsequently go nowhere. 31 | */ 32 | ionBlur: EventEmitter; 33 | /** 34 | * Focus on the input element; keystrokes will subsequently go to this element. 35 | */ 36 | ionFocus: EventEmitter; 37 | /** 38 | * Emitted when the styles change. This is useful for parent 39 | * components to know how to style themselves depending on the 40 | * child input. For example, a disabled ion-toggle may give 41 | * its wrapping ion-item a different style. 42 | */ 43 | ionStyle: EventEmitter; 44 | } 45 | export interface RadioButtonInput extends BaseInput { 46 | /** 47 | * Returns / Sets the current state of the element when type is checkbox or radio. 48 | */ 49 | checked: boolean; 50 | name: string; 51 | /** 52 | * A single radio button fires an ionSelect event, whereas 53 | * a radio group fires an ionChange event. It would be more common 54 | * to attach listeners to the radio group, not individual radio buttons. 55 | */ 56 | ionSelect: EventEmitter; 57 | /** 58 | * Removes focus from input; keystrokes will subsequently go nowhere. 59 | */ 60 | ionBlur: EventEmitter; 61 | /** 62 | * Focus on the input element; keystrokes will subsequently go to this element. 63 | */ 64 | ionFocus: EventEmitter; 65 | } 66 | export interface InputChangeEvent { 67 | value: string; 68 | } 69 | export interface CheckedInputChangeEvent extends InputChangeEvent { 70 | checked: boolean; 71 | } 72 | export interface SelectInput extends BaseInput { 73 | /** 74 | * Indicates whether the option is currently selected. 75 | */ 76 | selected: boolean; 77 | /** 78 | * A long reflecting the index of the first selected