@aquera/nile-elements 1.7.8 → 1.7.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.
Files changed (34) hide show
  1. package/README.md +3 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.js +466 -319
  5. package/dist/nile-status-light/index.cjs.js +2 -0
  6. package/dist/nile-status-light/index.cjs.js.map +1 -0
  7. package/dist/nile-status-light/index.esm.js +1 -0
  8. package/dist/nile-status-light/nile-status-light.cjs.js +2 -0
  9. package/dist/nile-status-light/nile-status-light.cjs.js.map +1 -0
  10. package/dist/nile-status-light/nile-status-light.css.cjs.js +2 -0
  11. package/dist/nile-status-light/nile-status-light.css.cjs.js.map +1 -0
  12. package/dist/nile-status-light/nile-status-light.css.esm.js +136 -0
  13. package/dist/nile-status-light/nile-status-light.esm.js +13 -0
  14. package/dist/src/index.d.ts +1 -0
  15. package/dist/src/index.js +1 -0
  16. package/dist/src/index.js.map +1 -1
  17. package/dist/src/nile-status-light/index.d.ts +1 -0
  18. package/dist/src/nile-status-light/index.js +2 -0
  19. package/dist/src/nile-status-light/index.js.map +1 -0
  20. package/dist/src/nile-status-light/nile-status-light.css.d.ts +9 -0
  21. package/dist/src/nile-status-light/nile-status-light.css.js +145 -0
  22. package/dist/src/nile-status-light/nile-status-light.css.js.map +1 -0
  23. package/dist/src/nile-status-light/nile-status-light.d.ts +53 -0
  24. package/dist/src/nile-status-light/nile-status-light.js +108 -0
  25. package/dist/src/nile-status-light/nile-status-light.js.map +1 -0
  26. package/dist/src/version.js +1 -1
  27. package/dist/src/version.js.map +1 -1
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +2 -1
  30. package/src/index.ts +1 -0
  31. package/src/nile-status-light/index.ts +1 -0
  32. package/src/nile-status-light/nile-status-light.css.ts +146 -0
  33. package/src/nile-status-light/nile-status-light.ts +111 -0
  34. package/vscode-html-custom-data.json +58 -0
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Copyright Aquera Inc 2026
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 } from 'lit';
9
+ import { styles } from './nile-status-light.css';
10
+ import { classMap } from 'lit/directives/class-map.js';
11
+ import { customElement, property } from 'lit/decorators.js';
12
+ import NileElement, { setupA11yMetadata } from '../internal/nile-element';
13
+ import { A11yProperty } from '../internal/accessibility/a11y.property.enum';
14
+ import { A11yRole } from '../internal/accessibility/a11y.role.enum';
15
+ import { Role } from '../internal/accessibility/role.enum';
16
+ /**
17
+ * Nile status light component.
18
+ *
19
+ * @tag nile-status-light
20
+ *
21
+ * @summary Status lights describe the status of an object, using a colored dot
22
+ * alongside a text label (e.g. "Active", "Error", "Pending").
23
+ * @status experimental
24
+ *
25
+ * @slot - The status light's text label.
26
+ *
27
+ * @attr {boolean} pulse - Optional pulse animation for active statuses.
28
+ *
29
+ * @csspart base - The component's base wrapper.
30
+ * @csspart indicator - The colored status dot.
31
+ * @csspart label - The status light's text label.
32
+ *
33
+ * @example
34
+ * <!-- Pulse animation for an active status -->
35
+ * <nile-status-light variant="positive" pulse>Active</nile-status-light>
36
+ *
37
+ * @example
38
+ * <!-- Disabled status light with muted colors -->
39
+ * <nile-status-light variant="positive" disabled>Inactive</nile-status-light>
40
+ */
41
+ let NileStatusLight = class NileStatusLight extends NileElement {
42
+ constructor() {
43
+ super(...arguments);
44
+ /** The status light's color variant. */
45
+ this.variant = 'neutral';
46
+ /** The status light's size. */
47
+ this.size = 'medium';
48
+ /** Disables the status light, muting its colors. */
49
+ this.disabled = false;
50
+ /** Draws attention to an active status with a pulsing animation around the dot. */
51
+ this.pulse = false;
52
+ }
53
+ connectedCallback() {
54
+ super.connectedCallback();
55
+ setupA11yMetadata(this, {
56
+ [Role.Role]: A11yRole.Text,
57
+ [A11yProperty.AriaLabel]: this.textContent?.trim() || '',
58
+ });
59
+ }
60
+ render() {
61
+ return html `
62
+ <span
63
+ part="base"
64
+ class=${classMap({
65
+ 'status-light': true,
66
+ 'status-light--positive': this.variant === 'positive',
67
+ 'status-light--negative': this.variant === 'negative',
68
+ 'status-light--notice': this.variant === 'notice',
69
+ 'status-light--informative': this.variant === 'informative',
70
+ 'status-light--neutral': this.variant === 'neutral',
71
+ 'status-light--inactive': this.variant === 'inactive',
72
+ 'status-light--small': this.size === 'small',
73
+ 'status-light--medium': this.size === 'medium',
74
+ 'status-light--large': this.size === 'large',
75
+ 'status-light--x-large': this.size === 'x-large',
76
+ 'status-light--disabled': this.disabled,
77
+ 'status-light--pulse': this.pulse && !this.disabled,
78
+ })}
79
+ >
80
+ <span
81
+ part="indicator"
82
+ class="status-light__dot"
83
+ aria-hidden="true"
84
+ ></span>
85
+ <slot part="label" class="status-light__label"></slot>
86
+ </span>
87
+ `;
88
+ }
89
+ };
90
+ NileStatusLight.styles = styles;
91
+ __decorate([
92
+ property({ reflect: true })
93
+ ], NileStatusLight.prototype, "variant", void 0);
94
+ __decorate([
95
+ property({ reflect: true, attribute: true })
96
+ ], NileStatusLight.prototype, "size", void 0);
97
+ __decorate([
98
+ property({ type: Boolean, reflect: true })
99
+ ], NileStatusLight.prototype, "disabled", void 0);
100
+ __decorate([
101
+ property({ type: Boolean, reflect: true })
102
+ ], NileStatusLight.prototype, "pulse", void 0);
103
+ NileStatusLight = __decorate([
104
+ customElement('nile-status-light')
105
+ ], NileStatusLight);
106
+ export { NileStatusLight };
107
+ export default NileStatusLight;
108
+ //# sourceMappingURL=nile-status-light.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-status-light.js","sourceRoot":"","sources":["../../../src/nile-status-light/nile-status-light.ts"],"names":[],"mappings":"AAAE;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,QAAQ,E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,IAAI,CAAC,OAAO,KAAK,UAAU;YACrD,qBAAqB,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;YAC5C,sBAAsB,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;YAC9C,qBAAqB,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;YAC5C,uBAAuB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;YAChD,wBAAwB,EAAE,IAAI,CAAC,QAAQ;YACvC,qBAAqB,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ;SACpD,CAAC;;;;;;;;;OASL,CAAC;IACJ,CAAC;;AAzDM,sBAAM,GAAmB,MAAM,AAAzB,CAA0B;AAWV;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAMD;AAGmB;IAA7C,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;6CAClC;AAGiC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAkB;AAGjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAe;AA5B/C,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA2D3B;;AAED,eAAe,eAAe,CAAC","sourcesContent":[" /**\n * Copyright Aquera Inc 2026\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\n import { html, TemplateResult } from 'lit';\n import { styles } from './nile-status-light.css';\n import { classMap } from 'lit/directives/class-map.js';\n import { customElement, property } from 'lit/decorators.js';\n import NileElement, { setupA11yMetadata } from '../internal/nile-element';\n import type { CSSResultGroup } from 'lit';\n import { A11yProperty } from '../internal/accessibility/a11y.property.enum';\n import { A11yRole } from '../internal/accessibility/a11y.role.enum';\n import { Role } from '../internal/accessibility/role.enum';\n\n /**\n * Nile status light component.\n *\n * @tag nile-status-light\n *\n * @summary Status lights describe the status of an object, using a colored dot\n * alongside a text label (e.g. \"Active\", \"Error\", \"Pending\").\n * @status experimental\n *\n * @slot - The status light's text label.\n *\n * @attr {boolean} pulse - Optional pulse animation for active statuses.\n *\n * @csspart base - The component's base wrapper.\n * @csspart indicator - The colored status dot.\n * @csspart label - The status light's text label.\n *\n * @example\n * <!-- Pulse animation for an active status -->\n * <nile-status-light variant=\"positive\" pulse>Active</nile-status-light>\n *\n * @example\n * <!-- Disabled status light with muted colors -->\n * <nile-status-light variant=\"positive\" disabled>Inactive</nile-status-light>\n */\n @customElement('nile-status-light')\n export class NileStatusLight extends NileElement {\n static styles: CSSResultGroup = styles;\n\n connectedCallback(): void {\n super.connectedCallback();\n setupA11yMetadata(this, {\n [Role.Role]: A11yRole.Text,\n [A11yProperty.AriaLabel]: this.textContent?.trim() || '',\n });\n }\n\n /** The status light's color variant. */\n @property({ reflect: true }) variant:\n | 'positive'\n | 'negative'\n | 'notice'\n | 'informative'\n | 'neutral'\n | 'inactive' = 'neutral';\n\n /** The status light's size. */\n @property({ reflect: true, attribute: true }) size: 'small' | 'medium' | 'large' | 'x-large' =\n 'medium';\n\n /** Disables the status light, muting its colors. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws attention to an active status with a pulsing animation around the dot. */\n @property({ type: Boolean, reflect: true }) pulse = false;\n\n render(): TemplateResult {\n return html`\n <span\n part=\"base\"\n class=${classMap({\n 'status-light': true,\n 'status-light--positive': this.variant === 'positive',\n 'status-light--negative': this.variant === 'negative',\n 'status-light--notice': this.variant === 'notice',\n 'status-light--informative': this.variant === 'informative',\n 'status-light--neutral': this.variant === 'neutral',\n 'status-light--inactive': this.variant === 'inactive',\n 'status-light--small': this.size === 'small',\n 'status-light--medium': this.size === 'medium',\n 'status-light--large': this.size === 'large',\n 'status-light--x-large': this.size === 'x-large',\n 'status-light--disabled': this.disabled,\n 'status-light--pulse': this.pulse && !this.disabled,\n })}\n >\n <span\n part=\"indicator\"\n class=\"status-light__dot\"\n aria-hidden=\"true\"\n ></span>\n <slot part=\"label\" class=\"status-light__label\"></slot>\n </span>\n `;\n }\n }\n\n export default NileStatusLight;\n\n declare global {\n interface HTMLElementTagNameMap {\n 'nile-status-light': NileStatusLight;\n }\n }\n"]}
@@ -1,5 +1,5 @@
1
1
  // Version utility - placeholders will be replaced during build
2
- export const NILE_ELEMENTS_VERSION = '1.7.8';
2
+ export const NILE_ELEMENTS_VERSION = '1.7.9';
3
3
  export const NILE_VERSION = '1.2.6';
4
4
  // Set global versions for runtime access
5
5
  if (typeof window !== 'undefined') {
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAE/C,yCAAyC;AACzC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IACjC,MAAc,CAAC,mBAAmB,GAAG,qBAAqB,CAAC;IAC3D,MAAc,CAAC,WAAW,GAAG,YAAY,CAAC;IAC3C,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,CAAC;AACzE,CAAC","sourcesContent":["// Version utility - placeholders will be replaced during build\nexport const NILE_ELEMENTS_VERSION = '1.7.8';\nexport const NILE_VERSION = '1.2.6';\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n (window as any).nileVersion = NILE_VERSION;\n window.process = window.process || { env: { NODE_ENV: 'production' } };\n}\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAE/C,yCAAyC;AACzC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IACjC,MAAc,CAAC,mBAAmB,GAAG,qBAAqB,CAAC;IAC3D,MAAc,CAAC,WAAW,GAAG,YAAY,CAAC;IAC3C,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,CAAC;AACzE,CAAC","sourcesContent":["// Version utility - placeholders will be replaced during build\nexport const NILE_ELEMENTS_VERSION = '1.7.9';\nexport const NILE_VERSION = '1.2.6';\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n (window as any).nileVersion = NILE_VERSION;\n window.process = window.process || { env: { NODE_ENV: 'production' } };\n}\n"]}