@nuralyui/button 0.0.8 → 0.0.9

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.
@@ -31,7 +31,7 @@ let HyButtonElement = class HyButtonElement extends LitElement {
31
31
  data-type="${this.type}"
32
32
  data-size=${this.size ? this.size : nothing}
33
33
  data-state="${this.loading ? 'loading' : nothing}"
34
- class="${this.dashed ? 'button-dashed' : nothing}"
34
+ .class="${this.dashed ? 'button-dashed' : nothing}"
35
35
  >
36
36
  <span id="container">
37
37
  ${((_a = this.icon) === null || _a === void 0 ? void 0 : _a.length) ? html ` <hy-icon name=${this.icon[0]}></hy-icon>` : nothing}
@@ -59,7 +59,7 @@ __decorate([
59
59
  property({ type: Boolean })
60
60
  ], HyButtonElement.prototype, "dashed", void 0);
61
61
  __decorate([
62
- property({ type: String })
62
+ property({ type: Array })
63
63
  ], HyButtonElement.prototype, "icon", void 0);
64
64
  __decorate([
65
65
  property({ reflect: true })
@@ -1 +1 @@
1
- {"version":3,"file":"hy-button.component.js","sourceRoot":"","sources":["../../../src/components/button/hy-button.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAa,YAAY,EAAe,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAG5C,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,UAAU;IAA/C;;QAEE,aAAQ,GAAG,KAAK,CAAC;QAGjB,YAAO,GAAG,KAAK,CAAC;QAGhB,SAAI,GAAG,YAAY,CAAC;QAGpB,SAAI,GAAG,kCAA4B,CAAC;QAGpC,WAAM,GAAG,KAAK,CAAC;QAMf,iBAAY,kCAAqB;IAoBnC,CAAC;IAlBU,M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e,CAwC3B;SAxCY,eAAe","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport {html, LitElement, nothing} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {ButtonType, EMPTY_STRING, IconPosition} from './hy-button.constants.js';\nimport {styles} from './hy-button.style.js';\n\n@customElement('hy-button')\nexport class HyButtonElement extends LitElement {\n @property({type: Boolean})\n disabled = false;\n\n @property({type: Boolean})\n loading = false;\n\n @property({type: String})\n size = EMPTY_STRING;\n\n @property({type: String})\n type = ButtonType.Default as String;\n\n @property({type: Boolean})\n dashed = false;\n\n @property({type: String})\n icon!: string[];\n\n @property({reflect: true})\n iconPosition = IconPosition.Left;\n\n override render() {\n return html`\n <button\n ?disabled=\"${this.disabled}\"\n data-type=\"${this.type}\"\n data-size=${this.size ? this.size : nothing}\n data-state=\"${this.loading ? 'loading' : nothing}\"\n class=\"${this.dashed ? 'button-dashed' : nothing}\"\n >\n <span id=\"container\">\n ${this.icon?.length ? html` <hy-icon name=${this.icon[0]}></hy-icon>` : nothing}\n <slot id=\"slot\"></slot>\n ${this.icon?.length == 2 ? html` <hy-icon name=${this.icon[1]}></hy-icon>` : nothing}\n </span>\n </button>\n `;\n }\n static override styles = styles;\n}\n"]}
1
+ {"version":3,"file":"hy-button.component.js","sourceRoot":"","sources":["../../../src/components/button/hy-button.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAa,YAAY,EAAe,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAG5C,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,UAAU;IAA/C;;QAEE,aAAQ,GAAG,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Gf;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;6CACR;AAGhB;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;qDACO;AApBtB,eAAe;IAD3B,aAAa,CAAC,WAAW,CAAC;GACd,eAAe,CAwC3B;SAxCY,eAAe","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport {html, LitElement, nothing} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {ButtonType, EMPTY_STRING, IconPosition} from './hy-button.constants.js';\nimport {styles} from './hy-button.style.js';\n\n@customElement('hy-button')\nexport class HyButtonElement extends LitElement {\n @property({type: Boolean})\n disabled = false;\n\n @property({type: Boolean})\n loading = false;\n\n @property({type: String})\n size = EMPTY_STRING;\n\n @property({type: String})\n type = ButtonType.Default as String;\n\n @property({type: Boolean})\n dashed = false;\n\n @property({type: Array})\n icon!: string[];\n\n @property({reflect: true})\n iconPosition = IconPosition.Left;\n\n override render() {\n return html`\n <button\n ?disabled=\"${this.disabled}\"\n data-type=\"${this.type}\"\n data-size=${this.size ? this.size : nothing}\n data-state=\"${this.loading ? 'loading' : nothing}\"\n .class=\"${this.dashed ? 'button-dashed' : nothing}\"\n >\n <span id=\"container\">\n ${this.icon?.length ? html` <hy-icon name=${this.icon[0]}></hy-icon>` : nothing}\n <slot id=\"slot\"></slot>\n ${this.icon?.length == 2 ? html` <hy-icon name=${this.icon[1]}></hy-icon>` : nothing}\n </span>\n </button>\n `;\n }\n static override styles = styles;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuralyui/button",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",