@aquera/nile-elements 0.0.4-6 → 0.0.4-8

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 (46) 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-link/index.d.ts +1 -0
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/index.js +2 -0
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/index.js.map +1 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.d.ts +12 -0
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.js +68 -0
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.js.map +1 -0
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.d.ts +39 -0
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.js +87 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.js.map +1 -0
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/index.cjs.js +1 -1
  15. package/dist/index.esm.js +1 -1
  16. package/dist/index.iife.js +82 -12
  17. package/dist/nile-link/index.cjs.js +2 -0
  18. package/dist/nile-link/index.cjs.js.map +1 -0
  19. package/dist/nile-link/index.esm.js +1 -0
  20. package/dist/nile-link/nile-link.cjs.js +2 -0
  21. package/dist/nile-link/nile-link.cjs.js.map +1 -0
  22. package/dist/nile-link/nile-link.css.cjs.js +2 -0
  23. package/dist/nile-link/nile-link.css.cjs.js.map +1 -0
  24. package/dist/nile-link/nile-link.css.esm.js +56 -0
  25. package/dist/nile-link/nile-link.esm.js +16 -0
  26. package/dist/slot.cjs.js +1 -1
  27. package/dist/slot.cjs.js.map +1 -1
  28. package/dist/slot.esm.js +1 -1
  29. package/dist/src/index.d.ts +1 -0
  30. package/dist/src/index.js +1 -0
  31. package/dist/src/index.js.map +1 -1
  32. package/dist/src/nile-link/index.d.ts +1 -0
  33. package/dist/src/nile-link/index.js +2 -0
  34. package/dist/src/nile-link/index.js.map +1 -0
  35. package/dist/src/nile-link/nile-link.css.d.ts +12 -0
  36. package/dist/src/nile-link/nile-link.css.js +68 -0
  37. package/dist/src/nile-link/nile-link.css.js.map +1 -0
  38. package/dist/src/nile-link/nile-link.d.ts +39 -0
  39. package/dist/src/nile-link/nile-link.js +87 -0
  40. package/dist/src/nile-link/nile-link.js.map +1 -0
  41. package/dist/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +1 -1
  43. package/src/index.ts +1 -0
  44. package/src/nile-link/index.ts +1 -0
  45. package/src/nile-link/nile-link.css.ts +70 -0
  46. package/src/nile-link/nile-link.ts +91 -0
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "0.0.4-6",
6
+ "version": "0.0.4-8",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
package/src/index.ts CHANGED
@@ -29,3 +29,4 @@ export { NileErrorMessage } from './nile-error-message';
29
29
  export { NileFormErrorMessage } from './nile-form-error-message';
30
30
  export { NileFormHelpText } from './nile-form-help-text';
31
31
  export { NileCalendar } from './nile-calendar';
32
+ export { NileLink} from './nile-link';
@@ -0,0 +1 @@
1
+ export { NileLink} from './nile-link';
@@ -0,0 +1,70 @@
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
+
8
+ import { css } from 'lit-element';
9
+
10
+ /**
11
+ * Link CSS
12
+ */
13
+ export const styles = css`
14
+ :host {
15
+ }
16
+
17
+ .link {
18
+ display: inline-flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ text-align: center;
22
+ user-select: none;
23
+ white-space: nowrap;
24
+ padding: 12px;
25
+ gap: 8px;
26
+ height: 38px;
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ .link__label {
31
+ color: #005ea6;
32
+ text-align: center;
33
+ font-family: Colfax-regular;
34
+ font-size: 14px;
35
+ font-style: normal;
36
+ font-weight: 400;
37
+ line-height: 14px;
38
+ letter-spacing: 0.2px;
39
+ }
40
+
41
+ .link--disabled {
42
+ color: rgba(0, 94, 166, 0.5);
43
+ cursor: not-allowed;
44
+ opacity: 0.6;
45
+ }
46
+
47
+ .link:not(.link--disabled):not(.link__button):hover {
48
+ color: #005291;
49
+ text-decoration-line: underline;
50
+ }
51
+
52
+ .link:not(.link--disabled):not(.link__button):active {
53
+ color: #002f53;
54
+ text-decoration-line: underline;
55
+ }
56
+
57
+ .link__button:hover {
58
+ color: #005291;
59
+ border-radius: 4px;
60
+ background: #f5f7f7;
61
+ }
62
+
63
+ .link__button:active {
64
+ color: #002f53;
65
+ border-radius: 4px;
66
+ background: rgba(0, 94, 166, 0.1);
67
+ }
68
+ `;
69
+
70
+ export default [styles];
@@ -0,0 +1,91 @@
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
+
8
+ import {LitElement, html, property, CSSResultArray, TemplateResult} 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
+ import { watch } from '../internal/watch';
16
+
17
+ /**
18
+ * Nile icon component.
19
+ *
20
+ * @tag nile-link
21
+ *
22
+ */
23
+ @customElement('nile-link')
24
+ export class NileLink extends NileElement {
25
+
26
+ /**
27
+ * The styles for Link
28
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
29
+ */
30
+ public static get styles(): CSSResultArray {
31
+ return [styles];
32
+ }
33
+
34
+ private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');
35
+
36
+ @state() private hasFocus = false;
37
+
38
+ /** Disables the button. */
39
+ @property({ type: Boolean, reflect: true }) disabled = false;
40
+
41
+ @property({ type: Boolean }) button = false;
42
+
43
+
44
+ private handleBlur() {
45
+ this.hasFocus = false;
46
+ this.emit('nile-blur');
47
+ }
48
+
49
+ private handleFocus() {
50
+ this.hasFocus = true;
51
+ this.emit('nile-focus');
52
+ }
53
+
54
+ /**
55
+ * Render method
56
+ * @slot This is a slot test
57
+ */
58
+ public render(): TemplateResult {
59
+ return html`
60
+ <div
61
+ part="base"
62
+ class=${classMap({
63
+ link: true,
64
+ 'link--disabled': this.disabled,
65
+ 'link__button': this.button
66
+ })}
67
+ ?disabled=${ifDefined(this.disabled)}
68
+ title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}
69
+ aria-disabled=${this.disabled ? 'true' : 'false'}
70
+ tabindex=${this.disabled ? '-1' : '0'}
71
+ @blur=${this.handleBlur}
72
+ @focus=${this.handleFocus}
73
+ >
74
+ <slot name="prefix" part="prefix" class="link__prefix"></slot>
75
+ <slot part="label" class="link__label"></slot>
76
+ <slot name="suffix" part="suffix" class="link__suffix"></slot>
77
+ </div>
78
+ `;
79
+ }
80
+
81
+
82
+ /* #endregion */
83
+ }
84
+
85
+ export default NileLink;
86
+
87
+ declare global {
88
+ interface HTMLElementTagNameMap {
89
+ 'nile-link': NileLink;
90
+ }
91
+ }