@aquera/nile-elements 0.0.4-5 → 0.0.4-7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +1 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +1 -0
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js +1 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/index.d.ts +1 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/index.js +2 -0
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/index.js.map +1 -0
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.d.ts +12 -0
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.js +66 -0
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.js.map +1 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.d.ts +39 -0
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.js +87 -0
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.js.map +1 -0
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  16. package/dist/index.cjs.js +1 -1
  17. package/dist/index.esm.js +1 -1
  18. package/dist/index.iife.js +81 -13
  19. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  20. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  21. package/dist/nile-date-picker/nile-date-picker.esm.js +1 -1
  22. package/dist/nile-link/index.cjs.js +2 -0
  23. package/dist/nile-link/index.cjs.js.map +1 -0
  24. package/dist/nile-link/index.esm.js +1 -0
  25. package/dist/nile-link/nile-link.cjs.js +2 -0
  26. package/dist/nile-link/nile-link.cjs.js.map +1 -0
  27. package/dist/nile-link/nile-link.css.cjs.js +2 -0
  28. package/dist/nile-link/nile-link.css.cjs.js.map +1 -0
  29. package/dist/nile-link/nile-link.css.esm.js +54 -0
  30. package/dist/nile-link/nile-link.esm.js +16 -0
  31. package/dist/slot.cjs.js +1 -1
  32. package/dist/slot.cjs.js.map +1 -1
  33. package/dist/slot.esm.js +1 -1
  34. package/dist/src/index.d.ts +1 -0
  35. package/dist/src/index.js +1 -0
  36. package/dist/src/index.js.map +1 -1
  37. package/dist/src/nile-date-picker/nile-date-picker.js +1 -1
  38. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  39. package/dist/src/nile-link/index.d.ts +1 -0
  40. package/dist/src/nile-link/index.js +2 -0
  41. package/dist/src/nile-link/index.js.map +1 -0
  42. package/dist/src/nile-link/nile-link.css.d.ts +12 -0
  43. package/dist/src/nile-link/nile-link.css.js +66 -0
  44. package/dist/src/nile-link/nile-link.css.js.map +1 -0
  45. package/dist/src/nile-link/nile-link.d.ts +39 -0
  46. package/dist/src/nile-link/nile-link.js +87 -0
  47. package/dist/src/nile-link/nile-link.js.map +1 -0
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +1 -1
  50. package/src/index.ts +1 -0
  51. package/src/nile-date-picker/nile-date-picker.ts +1 -1
  52. package/src/nile-link/index.ts +1 -0
  53. package/src/nile-link/nile-link.css.ts +68 -0
  54. package/src/nile-link/nile-link.ts +91 -0
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { __decorate } from "tslib";
8
+ import { html, property } from 'lit-element';
9
+ import { customElement, state } from 'lit/decorators.js';
10
+ import { styles } from './nile-link.css';
11
+ import { HasSlotController } from '../slot';
12
+ import { ifDefined } from 'lit/directives/if-defined.js';
13
+ import { classMap } from 'lit/directives/class-map.js';
14
+ import NileElement from '../internal/nile-element';
15
+ /**
16
+ * Nile icon component.
17
+ *
18
+ * @tag nile-link
19
+ *
20
+ */
21
+ let NileLink = class NileLink extends NileElement {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');
25
+ this.hasFocus = false;
26
+ /** Disables the button. */
27
+ this.disabled = false;
28
+ this.button = false;
29
+ /* #endregion */
30
+ }
31
+ /**
32
+ * The styles for Link
33
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
34
+ */
35
+ static get styles() {
36
+ return [styles];
37
+ }
38
+ handleBlur() {
39
+ this.hasFocus = false;
40
+ this.emit('nile-blur');
41
+ }
42
+ handleFocus() {
43
+ this.hasFocus = true;
44
+ this.emit('nile-focus');
45
+ }
46
+ /**
47
+ * Render method
48
+ * @slot This is a slot test
49
+ */
50
+ render() {
51
+ return html `
52
+ <div
53
+ part="base"
54
+ class=${classMap({
55
+ link: true,
56
+ 'link--disabled': this.disabled,
57
+ 'link__button': this.button
58
+ })}
59
+ ?disabled=${ifDefined(this.disabled)}
60
+ title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}
61
+ aria-disabled=${this.disabled ? 'true' : 'false'}
62
+ tabindex=${this.disabled ? '-1' : '0'}
63
+ @blur=${this.handleBlur}
64
+ @focus=${this.handleFocus}
65
+ >
66
+ <slot name="prefix" part="prefix" class="link__prefix"></slot>
67
+ <slot part="label" class="link__label"></slot>
68
+ <slot name="suffix" part="suffix" class="link__suffix"></slot>
69
+ </div>
70
+ `;
71
+ }
72
+ };
73
+ __decorate([
74
+ state()
75
+ ], NileLink.prototype, "hasFocus", void 0);
76
+ __decorate([
77
+ property({ type: Boolean, reflect: true })
78
+ ], NileLink.prototype, "disabled", void 0);
79
+ __decorate([
80
+ property({ type: Boolean })
81
+ ], NileLink.prototype, "button", void 0);
82
+ NileLink = __decorate([
83
+ customElement('nile-link')
84
+ ], NileLink);
85
+ export { NileLink };
86
+ export default NileLink;
87
+ //# sourceMappingURL=nile-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-link.js","sourceRoot":"","sources":["../../../src/nile-link/nile-link.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,WAAW;IAAlC;;QAUY,sBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAEjF,aAAQ,GAAG,KAAK,CAAC;QAElC,2BAA2B;QACiB,aAAQ,GAAG,KAAK,CAAC;QAEhC,WAAM,GAAG,KAAK,CAAC;QAyC7C,gBAAgB;IACjB,CAAC;IAzDA;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAYQ,UAAU;QAChB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1B,CAAC;IAEF;;;OAGG;IACI,MAAM;QACV,OAAO,IAAI,CAAA;;;gBAGC,QAAQ,CAAC;YACf,IAAI,EAAE,IAAI;YACV,gBAAgB,EAAE,IAAI,CAAC,QAAQ;YAC/B,cAAc,EAAE,IAAI,CAAC,MAAM;SAC5B,CAAC;oBACU,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC5B,IAAI,CAAC,KAAK,CAAC,iFAAiF;wBACpF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;mBACrC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG;gBAC7B,IAAI,CAAC,UAAU;iBACd,IAAI,CAAC,WAAW;;;;;;KAM5B,CAAC;IACJ,CAAC;CAIF,CAAA;AA/CU;IAAR,KAAK,EAAE;0CAA0B;AAGU;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAkB;AAEhC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAgB;AAjBjC,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA2DpB;SA3DY,QAAQ;AA6DrB,eAAe,QAAQ,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport {styles} from './nile-link.css';\nimport { HasSlotController } from '../slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\n\n/**\n * Nile icon component.\n *\n * @tag nile-link\n *\n */\n@customElement('nile-link')\nexport class NileLink extends NileElement {\n\n\t/**\n\t * The styles for Link\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');\n\n @state() private hasFocus = false;\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: Boolean }) button = false;\n\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n link: true,\n 'link--disabled': this.disabled,\n 'link__button': this.button\n })}\n ?disabled=${ifDefined(this.disabled)}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"link__prefix\"></slot>\n <slot part=\"label\" class=\"link__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"link__suffix\"></slot>\n </div>\n `;\n }\n\n\n\t/* #endregion */\n}\n\nexport default NileLink;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-link': NileLink;\n }\n }\n"]}